Payment (x402)

Poll (or long-poll) a payment session

Changed on
get/api/payment-status/{sessionId}

Request

Path parameters

sessionIdstring required

Query parameters

waitboolean

When true, the server blocks up to 60 seconds waiting for the session to transition to a terminal state (completed, failed, expired). Useful to avoid tight-loop polling.

Response

Payment session state

session_idstring required
status'pending' | 'completed' | 'failed' | 'expired' required
amountstring required

Amount as string to avoid float precision

assetstring required
networkstring required
pay_tostring required

Wallet address to pay

created_atstring date-time required
expires_atstring date-time
capture_urlstring uri

Human-facing payment URL

payerstring

Payer wallet address, set on completion.

tx_hashstring

On-chain transaction hash (when status = completed).

completed_atstring date-time

Example response

{
  "asset": "USDC",
  "network": "base-sepolia"
}

Changes

    • breaking

      the response's body type changed from object to no type for status

    • breaking

      removed the media type application/json for the response with the status

    • breaking

      removed the required property from the response with the status

    • breaking

      removed the required property from the response with the status

    • warning

      removed the optional property from the response with the status

    • warning

      removed the optional property from the response with the status

    • info

      api operation id getPaymentStatus removed and replaced with

    • info

      the endpoint scheme security BearerAuth was removed from the API

    • info

      api tag Payment (x402) added

    • info

      api tag Payment removed

    • info

      added the new optional query request parameter wait

    • info

      added subschema #2 to the response body allOf list for the response status

    • info

      removed the non-success response with the status