What is the x402 payment protocol?

x402 is an open payment protocol that revives the long-dormant HTTP 402 "Payment Required" status code so software — especially AI agents — can pay for APIs per request, in crypto like USDC, with no accounts, no API keys, and no checkout pages. When a client calls a resource without paying, the server answers 402 with exact machine-readable payment terms; the client signs a payment authorization and retries the same request; the server settles it on-chain and returns the resource with a payment receipt. Launched by Coinbase in 2025 and stewarded by the Linux Foundation.

Live receipt — this is not theory. ScriptMasterLabs runs a production x402 v2 contract you can inspect right now: curl https://squeezeos-api.onrender.com/api/marketplace returns the payment terms: protocol x402-v2, network eip155:8453 (Base), asset USDC, one-time listing fee 0.01 USDC, buyer sends the payment signature in the PAYMENT-SIGNATURE header and gets the settlement receipt in PAYMENT-RESPONSE. Receiver: 0xc29185fa176357612f3194735753e520e91adc46. (Verified live September 22, 2026. Cached page text is never the payment authority — the fresh 402 challenge is.)

The 4-step flow, exactly

#StepWhat actually happens
1RequestClient calls the resource with no payment, like any normal HTTP request.
2402 challengeServer answers 402 Payment Required with an offer: token, chain, amount, payTo address, and expiry. The offer is in a PAYMENT-REQUIRED header or body.
3Sign & retryClient signs a payment authorization (e.g. USDC on Base) and retries the same request with a PAYMENT-SIGNATURE header. No account, no API key, no person approving.
4Settle & deliverA facilitator verifies the authorization, broadcasts the transaction, and pays the network fee. Server returns the resource plus a PAYMENT-RESPONSE receipt with the on-chain transaction reference.

What's new in x402 (September 2026)

Real prices from real endpoints

EndpointPriceNetwork
SML Provider Marketplace listing0.01 USDC, one timeBase (eip155:8453)
ProBlocks demo endpoint0.001 USDC per callBase
Squeeze Wire per-issue x402$0.25, proposed — launching soonTBD

The protocol sets no price — each seller does. Verify the price in the fresh 402 challenge before you sign anything.

Do it yourself

As a buyer (agent or script):

  1. Pick an x402 endpoint. Inspect its terms first — always free: curl https://squeezeos-api.onrender.com/api/marketplace.
  2. Read the offer: price, asset, network, payTo, expiry. Confirm they match what you expected before signing.
  3. Fund a compatible wallet with USDC on Base. Sign the payment authorization with an x402-compatible client and retry with the PAYMENT-SIGNATURE header.
  4. Keep the PAYMENT-RESPONSE receipt — it carries the on-chain transaction reference. Settlement proves value moved; it does not prove the API returned correct, complete data. Verify delivery separately.

As a seller (put a meter on your API):

  1. Place x402 in front of your API — from zero-code proxying to full control of the payment flow.
  2. Set your per-call price (cost-based, usage-based, or outcome-based).
  3. Get discovered: list in Coinbase's Bazaar catalogue or on the SML Provider Marketplace (one-time 0.01 USDC x402 listing; discovery is free).

Before you sign anything: verify price, asset, network, recipient, expiry, and resource binding in the challenge; cap amounts; restrict destinations. Settlement and accepted delivery are separate evidence stages.

Where ScriptMasterLabs fits

Sources

SCRIPTMASTERLABS · Truth First. Proof Always. Pay Only for Accepted Delivery.