Inside an On-Chain x402 Settlement on Base
Publishing an HTTP 402 Payment Required challenge is only half of building an autonomous agent microservice. Many first-time x402 sellers deploy a server that returns a valid base64 PAYMENT-REQUIRED header on an unpaid call, accepts the buyer's PAYMENT-SIGNATURE header on retry, and returns HTTP 200—only to discover that zero USDC actually moved on Base.
Here is why that happens, how EIP-3009 transferWithAuthorization settlement works under the hood, and how third-party verifiers like Settled (SettledScout) test whether an endpoint truly settles and delivers as advertised.
sequenceDiagram
participant Buyer as SettledScout / x402 Buyer
participant Seller as Seller x402 Endpoint
participant Fac as Facilitator (/settle)
participant Base as Base Mainnet USDC (0x8335...2913)
Buyer->>Seller: 1. Unpaid GET /forensics/bsc-funder-cluster
Seller-->>Buyer: 2. HTTP 402 + PAYMENT-REQUIRED (EIP-712 USD Coin v2)
Buyer->>Seller: 3. Retry GET + PAYMENT-SIGNATURE (EIP-3009 sig)
Seller->>Fac: 4. POST /settle {paymentPayload, paymentRequirements}
Fac->>Base: 5. transferWithAuthorization(from, to, value, validAfter, validBefore, nonce, v, r, s)
Base-->>Fac: 6. Tx confirmed + AuthorizationUsed event
Fac-->>Seller: 7. {success: true, transaction: "0x..."}
Seller-->>Buyer: 8. HTTP 200 JSON + PAYMENT-RESPONSE header
1. Why the Buyer's PAYMENT-SIGNATURE Does Not Move Funds by Itself
When an x402 v2 buyer (such as @x402/fetch, Coinbase AgentKit, or SettledScout paying from 0xA1d1C0cf717402ff3651aA4873CcF96410B01978) signs an exact payment on Base (eip155:8453), it does not broadcast a transaction to an RPC node. Instead, it signs an off-chain EIP-712 TransferWithAuthorization digest for Circle's FiatTokenV2_2 contract (0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913):
That signed authorization is base64-encoded and attached to the retry HTTP request in the PAYMENT-SIGNATURE header. If the seller's HTTP handler simply checks that the header is non-empty and returns HTTP 200, the authorization is never submitted to Base and expires unused after validBefore.
2. Forwarding the Payload to a Public x402 Facilitator
To execute the USDC transfer without holding ETH for gas on the seller server, the seller forwards the decoded paymentPayload and matching paymentRequirements to an x402 facilitator's /settle endpoint before returning the 200 response:
| Facilitator | Endpoint | Supported Base Schemes | Auth Required |
|---|---|---|---|
| PayAI Network | https://facilitator.payai.network/settle |
x402Version: 2 (eip155:8453 exact), x402Version: 1 (base exact) |
None (Public) |
| UltravioletaDAO | https://facilitator.ultravioletadao.xyz/settle |
eip155:8453 (exact, escrow, commerce) |
None (Public) |
| Dexter | https://x402.dexter.cash/settle |
eip155:8453 (exact, upto, batch-settlement) |
None (Public) |
When /settle succeeds, the facilitator's relayer EOA calls transferWithAuthorization on Base USDC, pays the L2 gas (~$0.0002), and returns:
{
"success": true,
"network": "eip155:8453",
"payer": "0xA1d1C0cf717402ff3651aA4873CcF96410B01978",
"transaction": "0xf2c03670f2e6b38b82c52f8b331808c61b7e8236f08fff0a8c5980d5a660ab81"
}
The seller base64-encodes this JSON receipt into the PAYMENT-RESPONSE header of the HTTP 200 reply.
3. Passing Delivery Verification (as_advertised)
Independent verifiers such as Settled continuously probe x402 endpoints and send SettledScout to purchase from live sellers with real USDC on Base. To earn a delivered / as_advertised badge (as we configured on our claimed seller wallet 0xeBa13671A2f1993Ee26a4E286Db6e491FA5c99Bc):
- Publish a Complete
extensions.bazaar.info.output.example: Every key in your sample output is checked against the live paid response. - Use Real Example Inputs: Never put placeholder strings like
<address>inextensions.bazaar.info.input; automated buyers pass your example input verbatim. - Return Fresh, Non-Static Data: Include live block numbers, timestamps, and computed results so the response is never flagged as a static copy of the listing example.