What is X402?
X402 is an open payment standard built around the HTTP402 Payment Required status code. It enables services to charge for access to their APIs and content directly over HTTP, allowing clients to programmatically pay for resources without accounts, sessions, or credential management. When an agent makes a request to an X402 endpoint, if payment is required, the server responds with 402 Payment Required along with payment instructions. The agent can then sign a payment authorization and retry the request with that authorization. Hyperbrowser verifies it, runs the operation, and settles payment before returning the successful response.
To learn more about X402 and get started, check out the X402 Documentation.
Supported Endpoints
Hyperbrowser provides X402-enabled versions of these API endpoints: All endpoints usePOST on https://api.hyperbrowser.ai.
The browser session guide also covers getting session status and stopping a purchased browser without another payment.
How It Works
-
Agent makes request: Your AI agent sends a request to an X402 endpoint (e.g.,
https://api.hyperbrowser.ai/x402/web/fetch) -
Payment required response: If payment is needed, Hyperbrowser responds with
402 Payment Requiredand payment instructions in thePAYMENT-REQUIREDheader. Its base64-encoded JSON describes the accepted networks, assets, amount, and recipient. - Agent authorizes payment: The agent uses its X402 client and wallet to generate a signed payment authorization from those requirements
-
Request retry: The agent retries the original request with the authorization in the
PAYMENT-SIGNATUREheader -
Service delivered: Hyperbrowser verifies the authorization, processes the request, and settles payment before returning the results. The
PAYMENT-RESPONSEheader contains settlement information.
Benefits for Agentic Workflows
- Autonomous operation: Agents can pay for services without human intervention
- No accounts or credentials: Access paid services without account creation or API key management
- Cost transparency: Agents know the exact cost before committing
- Programmable budgets: Agents can be configured with spending limits
Getting Started
To integrate X402 into your agentic workflows:- Review the X402 protocol documentation
- Implement X402 client functionality in your agent
- Use Hyperbrowser’s X402 endpoints instead of standard API endpoints
- Configure your agent with a crypto wallet and spending parameters