POST
/
v2
/
x402
/
verify
Verify a payment
curl --request POST \
  --url https://api.cdp.coinbase.com/platform/v2/x402/verify \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "x402Version": 1,
  "paymentPayload": {
    "x402Version": 1,
    "scheme": "exact",
    "network": "base",
    "payload": {
      "signature": "0xf3746613c2d920b5fdabc0856f2aeb2d4f88ee6037b8cc5d04a71a4462f13480",
      "authorization": {
        "from": "0x742d35Cc6634C0532925a3b844Bc454e4438f44e",
        "to": "0x742d35Cc6634C0532925a3b844Bc454e4438f44e",
        "value": "1000000000000000000",
        "validAfter": "1716150000",
        "validBefore": "1716150000",
        "nonce": "0x1234567890abcdef1234567890abcdef12345678"
      }
    }
  },
  "paymentRequirements": {
    "scheme": "exact",
    "network": "base",
    "maxAmountRequired": "1000000",
    "resource": "https://api.example.com/premium/resource/123",
    "description": "Premium API access for data analysis",
    "mimeType": "application/json",
    "outputSchema": {
      "data": "string"
    },
    "payTo": "0x742d35Cc6634C0532925a3b844Bc454e4438f44e",
    "maxTimeoutSeconds": 10,
    "asset": "0x742d35Cc6634C0532925a3b844Bc454e4438f44e",
    "extra": {
      "gasLimit": "1000000"
    }
  }
}'
{
  "isValid": false,
  "invalidReason": "insufficient_funds",
  "payer": "0x742d35Cc6634C0532925a3b844Bc454e4438f44e"
}

Authorizations

Authorization
string
header
required

A JWT signed using your CDP API Key Secret, encoded in base64. Refer to the Generate Bearer Token section of our Authentication docs for information on how to generate your Bearer Token.

Body

application/json

Response

200
application/json

Successfully verified payment on the x402 protocol.

The response is of type object.