Skip to main content
POST
/
gateway
/
v1
/
x402
/
settle
Settle an x402 payment
curl --request POST \
  --url https://gateway-api-testnet.circle.com/gateway/v1/x402/settle \
  --header 'Content-Type: application/json' \
  --data '
{
  "paymentPayload": {
    "x402Version": 1,
    "accepted": {
      "scheme": "exact",
      "network": "base-sepolia",
      "asset": "0x036CbD53842c5426634e7929541eC2318f3dCF7e",
      "amount": "1000000",
      "payTo": "0x1234567890abcdef1234567890abcdef12345678",
      "maxTimeoutSeconds": 3600,
      "extra": {}
    },
    "payload": {},
    "resource": {
      "url": "<string>",
      "description": "<string>",
      "mimeType": "<string>"
    },
    "extensions": {}
  },
  "paymentRequirements": {
    "scheme": "exact",
    "network": "base-sepolia",
    "asset": "0x036CbD53842c5426634e7929541eC2318f3dCF7e",
    "amount": "1000000",
    "payTo": "0x1234567890abcdef1234567890abcdef12345678",
    "maxTimeoutSeconds": 3600,
    "extra": {}
  }
}
'
{
  "success": true,
  "transaction": "<string>",
  "network": "<string>",
  "errorReason": "unsupported_scheme",
  "payer": "<string>"
}

Body

application/json
paymentPayload
object
required

x402 payment payload containing the payment authorization and metadata.

paymentRequirements
object
required

Defines an acceptable way to pay for a resource using the x402 protocol.

Response

Settlement result. Check the success field for outcome.

success
boolean
required

Whether the settlement was successful.

transaction
string
required

Transaction UUID on success, empty string on failure.

network
string
required

CAIP-2 network identifier.

errorReason
enum<string>

Error code. Present when success is false.

Available options:
unsupported_scheme,
unsupported_network,
unsupported_asset,
invalid_payload,
address_mismatch,
amount_mismatch,
invalid_signature,
authorization_not_yet_valid,
authorization_expired,
authorization_validity_too_short,
self_transfer,
insufficient_balance,
nonce_already_used,
unsupported_domain,
wallet_not_found
payer
string

The sender address (present on success or when identifiable).