Reference
What is x402?
x402 is an open standard for internet-native payments over HTTP. It brings back the original intent of the HTTP 402 Payment Required status code, enabling any HTTP resource to require a micro-payment before delivering its response.
The protocol is designed to be stateless and works for both traditional applications and autonomous AI agents. The payment flow follows six steps:
The client requests a paid resource.
The server responds with
402 Payment Requiredand aPaymentRequirementsobject describing the accepted network, scheme, asset, and amount.The client builds a signed
PaymentPayloadand replays the request with aPAYMENT-SIGNATUREheader.The server forwards the payload to a facilitator for verification and settlement.
The facilitator validates the payload and submits the payment on-chain.
The server delivers the protected resource upon confirmation.
What is a facilitator?
A facilitator is a service that handles the verification and on-chain settlement of x402 payments on behalf of resource servers. It operates as an independent layer between clients, resource servers, and blockchain networks.
The facilitator's three core responsibilities are:
Verification — Confirms that a client's signed payment payload satisfies the server's declared payment requirements without yet submitting anything on-chain.
Settlement — Validates the payload and then submits the payment transaction to the blockchain, monitoring it until confirmation.
Abstraction — Allows resource servers to accept blockchain payments without maintaining direct node connectivity or building their own verification logic.
The facilitator does not hold funds or act as a custodian. It only executes on-chain transactions based on signed payment authorizations provided by clients.
CSPR.cloud x402 Facilitator
CSPR.cloud provides an x402 facilitator for the Casper Network. It supports the exact payment scheme using CEP-18 tokens authorized via EIP-712 typed-data signatures.
Endpoints
Mainnet and Testnet
All endpoints require authorization. Learn how to obtain an access token here.
Supported networks and schemes
The CSPR.cloud facilitator supports the exact scheme on Casper networks:
casper:casper
Casper Mainnet
casper:casper-test
Casper Testnet
Network identifiers follow the CAIP-2 format.
API endpoints
The facilitator exposes three endpoints:
Examples
The github.com/make-software/casper-x402 repository contains end-to-end examples to build a complete x402 payment flow.
Last updated
