x402

Verify an inbound x402 payment. (pay access required)

Verifies a buyer x402 payment payload against a registered resource without settling it, so a resource server can check a payment before serving content.

post/x402/verify

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/verify
  • Auth: API key in header token

Request body

supportedPaymentSourceIdstring required

Example request

{
  "supportedPaymentSourceId": "supported_payment_source_id",
  "paymentPayload": {
    "x402Version": 1,
    "resource": {
      "url": "https://api.example-agent.com/run"
    },
    "accepted": {
      "scheme": "exact",
      "network": "eip155:8453",
      "asset": "0x833589fcd6edb6e08f4c7c32d4f71b54bda02913",
      "amount": "1000000",
      "payTo": "0x2222222222222222222222222222222222222222",
      "maxTimeoutSeconds": 300
    },
    "payload": {
      "signature": "0x..."
    }
  }
}

Response

x402 verification result

status'success' required

Example response

{
  "status": "success",
  "data": {
    "attemptId": "clx402attempt0001",
    "paymentPayloadHash": "b3f1c2a4d5e6f70819203a4b5c6d7e8f90a1b2c3d4e5f60718293a4b5c6d7e8f",
    "paymentIdentifier": null,
    "verifyResponse": {
      "isValid": true,
      "payer": "0x3333333333333333333333333333333333333333"
    }
  }
}

Changes

No recorded changes to this operation across all 50 revisions of this API.