Verify payment
Changed onVerify an x402 protocol payment with a specific scheme and network.
Request
- Base URLhttps://api.cdp.coinbase.com/platform
- AuthHTTP bearer
Request body
The version of the x402 protocol.
The x402 protocol payment payload that the client attaches to x402-paid API requests to the resource server in the PAYMENT-SIGNATURE header. For EVM networks, smart account signatures can be longer than 65 bytes.
The x402 protocol payment requirements that the resource server expects the client's payment payload to meet.
Example request
{
"x402Version": 2,
"paymentPayload": {
"x402Version": 2,
"accepted": {
"scheme": "exact",
"network": "eip155:84532",
"asset": "0x036CbD53842c5426634e7929541eC2318f3dCF7e",
"amount": "1000",
"payTo": "0x122F8Fcaf2152420445Aa424E1D8C0306935B5c9",
"maxTimeoutSeconds": 60,
"extra": {
"name": "USDC",
"version": "2"
}
},
"payload": {
"signature": "0xf3746613c2d920b5fdabc0856f2aeb2d4f88ee6037b8cc5d04a71a4462f134801234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef1b",
"authorization": {
"from": "0x742d35Cc6634C0532925a3b844Bc454e4438f44e",
"to": "0x742d35Cc6634C0532925a3b844Bc454e4438f44e",
"value": "1000000000000000000",
"validAfter": "1716150000",
"validBefore": "1716150000",
"nonce": "0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef"
}
},
"resource": {
"url": "https://api.example.com/premium/resource/123",
"description": "Premium API access for data analysis.",
"mimeType": "application/json"
}
},
"paymentRequirements": {
"scheme": "exact",
"network": "eip155:8453",
"asset": "0x742d35Cc6634C0532925a3b844Bc454e4438f44e",
"amount": "1000000",
"payTo": "0x742d35Cc6634C0532925a3b844Bc454e4438f44e",
"maxTimeoutSeconds": 10,
"extra": {
"name": "USDC",
"version": "2"
}
}
}Response
Successfully verified payment on the x402 protocol.
Indicates whether the payment is valid.
The reason the payment is invalid on the x402 protocol.
The message describing the invalid reason.
The onchain address of the client that is paying for the resource.
For EVM networks, the payer will be a 0x-prefixed, checksum EVM address.
For Solana-based networks, the payer will be a base58-encoded Solana address.
Optional scheme-specific verify metadata returned by the facilitator.
Example response
{
"invalidReason": "insufficient_funds",
"invalidMessage": "Insufficient funds",
"payer": "0x742d35Cc6634C0532925a3b844Bc454e4438f44e",
"extra": {}
}Changes
- warning
added the new
policy_not_applicableenum value to theerrorTyperesponse property for the response status - warning
added the new
policy_not_applicableenum value to theerrorTyperesponse property for the response status - warning
added the new
policy_not_applicableenum value to theerrorTyperesponse property for the response status
- warning