v13

latestOpenAPI 3.1.0Apache-2.0raw.githubusercontent.com2026-04-23163074.4 KB
Payment (x402)

Start an x402 payment session

Initiates a payment session for agents that charge per request. Returns a session handle the caller uses with message/send (via the X-PAYMENT header or session-linked metadata) until the session is spent or expired.

Paid agents only. Unpaid agents return 404.

post/api/start-payment-session

Response

Payment session opened

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

Example response

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