Core Concept#
What is x402#
x402 is an on-chain payment protocol built on the HTTP 402 Payment Required status code, embedding blockchain payment capabilities into the standard request-response flow. Whether it's a browser, backend service, or AI Agent, any client that speaks x402 can send and receive payments.
No account registration or OAuth configuration required — a single API call is all it takes to complete a token payment. The protocol natively supports multiple settlement models including pay-per-use and subscriptions, with instant on-chain settlement.
Built on open standards and compatible with major blockchains, x402 integrates quickly and scales easily across networks.
Synchronous vs. Asynchronous Settlement#
Once a transaction has been verified, the seller calls the settlement endpoint to submit the payment on-chain. The Payment API offers two settlement modes:
Synchronous Settlement (syncSettle = true)#
The Facilitator submits the transaction and waits for on-chain confirmation before returning the transaction hash. By the time the seller receives the response, the funds have already arrived.
Best for: High-value transactions or scenarios where resources should only be delivered after payment is confirmed.
Asynchronous Settlement (syncSettle = false)#
The Facilitator submits the transaction and returns the transaction hash immediately, without waiting for on-chain confirmation.
Best for: Low-value, high-frequency calls where response speed is the priority.