What is x402?
How an HTTP 402 payment challenge, client authorization and verification can enable paid resources. Costs, assets, networks and access terms depend on the implementation.
TL;DR
x402 uses HTTP 402 to communicate payment requirements. A client prepares an accepted payment payload and the server verifies/settles it, directly or through a facilitator, before returning the resource. Provider, asset and network terms still apply.
Key Takeaways
- ✓The server communicates payment requirements through HTTP 402.
- ✓The client must review and authorize the actual payment payload.
- ✓Verification and settlement can use a facilitator or a server’s implementation.
- ✓Accepted assets, total cost, timing and access terms are implementation-specific.
What x402 does
x402 is an open payment standard built around HTTP 402 Payment Required. It lets a service communicate payment requirements for a resource through an HTTP interaction. It can support usage-based APIs and content without requiring a traditional subscription design, but the provider can still impose authentication, legal, account or geographic requirements. Official x402 documentation describes the current standard and implementations.
x402 service references
Browse selected service references. Check each provider’s current x402 implementation, terms and quote.
A typical request and payment flow
A client requests a resource. If payment is required, the server returns a 402 response with payment instructions. The client prepares an accepted payment payload and submits it with a new request. The server verifies and settles the payment itself or uses a facilitator. Once the required payment is accepted under that implementation, the server returns the resource. Exact schemas, headers and settlement mechanisms depend on the protocol version and payment scheme. See the current client/server and facilitator documentation for implementation details.
Assets and networks are part of the challenge
The client must inspect the actual accepted asset, network, amount and recipient. USDC is used in many examples, but a USDC-oriented publication is not a specification for every deployment. Check the current server challenge, SDK, wallet and facilitator support. USDC has a dollar target, while market price, issuer controls and redemption eligibility remain separate considerations.
Costs and receipt depend on the implementation
A resource price is set by its provider. Network resources, account setup, facilitator or service charges and payout stages can also matter. A protocol’s fee policy does not guarantee that the complete payment route is free, costs a fraction of a cent or completes in a fixed time. Obtain the actual quote and understand when the resource and funds become available.
Practical verification and security
Verify the server, challenge, accepted asset/network, recipient, amount and spending limits before authorizing a payment. A valid payment does not prove that the resource meets your needs or remove issuer, contract, custody or service risks. Handle errors and repeated requests carefully, and consult the current implementation documentation rather than assuming every payment scheme works identically.
Frequently asked questions
What is the x402 payment protocol?
How does x402 work?
Why do examples use USDC?
Does x402 remove account or jurisdiction requirements?
What does an x402 payment cost?
Keep reading
Cite this page
USDC.org. "What is x402." USDC.org. https://usdc.org/guides/what-is-x402.