Skip to main content
POST
/
gateway
/
v1
/
x402
/
verify
Verify an x402 payment payload
curl --request POST \
  --url https://gateway-api-testnet.circle.com/gateway/v1/x402/verify \
  --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": {}
  }
}
'
{
  "isValid": true,
  "invalidReason": "<string>",
  "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

Verification result

isValid
boolean

Whether the payment payload passed all validation checks.

invalidReason
string

Reason for validation failure. Present when isValid is false.

payer
string

The payer address extracted from the payment payload.