x402
Sign a payment for a forwarded 402. (pay access required)
Signs a payment for a forwarded 402 using a managed EVM wallet, debited against the caller's usage credits when the key is usage limited. Returns the X-PAYMENT header for the caller to send with its own retried request; this service never fetches the resource itself.
post/x402/pay
Request
- Base URL: ./../api/v1/ (relative, and the document was published on a file host, not at the API’s origin)
- URL: ./../api/v1/x402/pay
- Auth: API key in header token
Request body
Example request
{
"evmWalletId": "clmanagedwallet0001",
"paymentRequired": {
"x402Version": 1,
"resource": {
"url": "https://api.example-agent.com/run"
},
"accepts": [
{
"scheme": "exact",
"network": "eip155:8453",
"asset": "0x833589fcd6edb6e08f4c7c32d4f71b54bda02913",
"amount": "1000000",
"payTo": "0x2222222222222222222222222222222222222222",
"maxTimeoutSeconds": 300
}
]
}
}Response
Signed x402 payment
Example response
{
"status": "success",
"data": {
"attemptId": "clx402attempt0001",
"payer": "0x1111111111111111111111111111111111111111",
"caip2Network": "eip155:8453",
"asset": "0x833589fcd6edb6e08f4c7c32d4f71b54bda02913",
"amount": "1000000",
"payTo": "0x2222222222222222222222222222222222222222",
"xPaymentHeader": "eyJ4NDAyVmVyc2lvbiI6MSwicGF5bG9hZCI6eyJzaWduYXR1cmUiOiIweC4uLiJ9fQ==",
"paymentPayload": {
"x402Version": 1,
"accepted": {
"scheme": "exact",
"network": "eip155:8453",
"asset": "0x833589fcd6edb6e08f4c7c32d4f71b54bda02913",
"amount": "1000000",
"payTo": "0x2222222222222222222222222222222222222222",
"maxTimeoutSeconds": 300
},
"payload": {
"signature": "0x..."
}
},
"paymentPayloadHash": "b3f1c2a4d5e6f70819203a4b5c6d7e8f90a1b2c3d4e5f60718293a4b5c6d7e8f",
"paymentIdentifier": null
}
}Changes
No recorded changes to this operation across all 50 revisions of this API.