API ReferenceGeneratedX402
Submit signed x402 payment
Public endpoint — no API key required; the on-chain signature is the authorization. Submit the signed x402 payment payload matching the order's challenge (payTo, network, asset, scheme: exact and exact amount must match). Always returns HTTP 200; check success. On success status is settled or credit_pending (quota credited shortly after on-chain confirmation). Error codes: ORDER_NOT_FOUND, ORDER_EXPIRED, PAYLOAD_MISMATCH, SETTLING_IN_PROGRESS, ORDER_ALREADY_SETTLED, SPEND_CAP_EXCEEDED, X402_SETTLE_PENDING.
Path Parameters
orderId*integer
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Signed x402 v2 payment payload (max 1 MiB), e.g. produced by @linkexai/agent-sdk or Binance Agentic Wallet (baw x402-payment sign).
Response Body
application/json
curl -X POST "https://example.com/api/x402/pay/0" \ -H "Content-Type: application/json" \ -d '{}'{ "success": true, "message": "string", "data": { "order_id": 0, "status": "settled", "balance_added": 0, "new_balance": 0 }}