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.
Response
Payment session opened
Example response
{
"asset": "USDC",
"network": "base-sepolia"
}Changes
Changed in 1 of the 12 revisions of this API.2114
- ▲
removed the required property
paymentRequirementsfrom the response with the200statusresponse-required-property-removed
- ▲
removed the required property
sessionIdfrom the response with the200statusresponse-required-property-removed
- ●
removed the optional property
expiresAtfrom the response with the200statusresponse-optional-property-removed
- ○
api operation id
startPaymentSessionremoved and replaced withapi-operation-id-removed
- ○
the endpoint scheme security
BearerAuthwas removed from the APIapi-security-removed
- ○
api tag
Payment (x402)addedapi-tag-added
- ○
api tag
Paymentremovedapi-tag-removed
- ○
removed the non-success response with the status
401response-non-success-status-removed
- ○
added the optional property
capture_urlto the response with the200statusresponse-optional-property-added
- ○
added the optional property
expires_atto the response with the200statusresponse-optional-property-added
- ○
added the required property
amountto the response with the200statusresponse-required-property-added
- ○
added the required property
assetto the response with the200statusresponse-required-property-added
- ○
added the required property
created_atto the response with the200statusresponse-required-property-added
- ○
added the required property
networkto the response with the200statusresponse-required-property-added
- ○
added the required property
pay_toto the response with the200statusresponse-required-property-added
- ○
added the required property
session_idto the response with the200statusresponse-required-property-added
- ○
added the required property
statusto the response with the200statusresponse-required-property-added
This revision also has 21 changes that name no endpoint, such as unreferenced schemas being removed. See the revision's changelog
- ▲