Skip to main content

x402 Payment Schemes

x402 servers advertise accepted payment schemes in the PAYMENT-REQUIRED header. Each scheme specifies a payment method, network, and amount encoding. Clients select the first scheme they support.

exact

active

The exact payment scheme requires a precise USDC payment on Base. The server specifies the amount, token contract address, and recipient address. The client transfers exactly that amount. The facilitator verifies the on-chain transaction before the server grants access.

The exact scheme is the primary x402 payment scheme supported by the Coinbase facilitator. It encodes a fixed payment requirement: the client must transfer exactly the specified amount of the specified token (USDC) to the specified address on Base L2.

The maxAmountRequired field uses the token's smallest denomination (USDC has 6 decimal places: 1000000 = $1.00 USDC).

The facilitator validates: the transaction hash exists on Base, amounts and addresses match the requirement, the transaction is confirmed, and the hash has not been used before (replay protection).

FieldRequiredDescription
schemeRequiredMust be the string 'exact'
networkRequiredBlockchain network: 'base' (mainnet) or 'base-sepolia' (testnet)
maxAmountRequiredRequiredToken amount in smallest denomination. USDC: 1000000 = $1.00
resourceRequiredURI of the resource being paid for
payToRequiredRecipient wallet address on the network
descriptionOptionalHuman-readable description of what is being purchased
exact – PAYMENT-REQUIRED example
http
// PAYMENT-REQUIRED decoded
{
  "schemes": [{
    "scheme": "exact",
    "network": "base",
    "maxAmountRequired": "10000",
    "resource": "https://api.example.com/api/premium",
    "description": "Premium data API call – $0.01 USDC",
    "payTo": "0x1234567890abcdef1234567890abcdef12345678"
  }]
}

usdcBase

active

The usdcBase payment scheme is an explicit named alias for USDC payments on Base. It carries the same semantics as exact but makes the token and network explicit in the scheme name, simplifying client-side filtering in multi-scheme payment requirements.

usdcBase emerged as an explicit scheme identifier as x402 expanded to multiple tokens and networks. While exact can specify any token on any network, usdcBase makes the token and network explicit in the identifier itself.

This is useful when a server wants to advertise specifically USDC-on-Base support. Clients that only support USDC on Base can filter for usdcBase before decoding the full payment requirement.

The fields are identical to the exact scheme.

FieldRequiredDescription
schemeRequiredMust be the string 'usdcBase'
networkRequiredMust be 'base' or 'base-sepolia'
maxAmountRequiredRequiredUSDC amount in smallest denomination (6 decimals)
resourceRequiredURI of the resource being paid for
payToRequiredRecipient USDC wallet address on Base
usdcBase – PAYMENT-REQUIRED example
http
// Multi-scheme PAYMENT-REQUIRED
{
  "schemes": [
    {
      "scheme": "usdcBase",
      "network": "base",
      "maxAmountRequired": "10000",
      "resource": "https://api.example.com/api/data",
      "payTo": "0xabcdef1234567890abcdef1234567890abcdef12"
    },
    {
      "scheme": "exact",
      "network": "base-sepolia",
      "maxAmountRequired": "10000",
      "resource": "https://api.example.com/api/data",
      "payTo": "0xabcdef1234567890abcdef1234567890abcdef12"
    }
  ]
}

See Also