/v0/checkout/{invoiceId}/agentPay an invoice over standard x402
The same resource as POST …/agent, for standard x402 clients, which GET a resource first (SPEC-checkout §14). With no payment header it answers 402 with the v2 PAYMENT-REQUIRED header (base64 JSON) listing the exact requirements: USDC on Base or Solana, to the merchant’s address or a deposit address that settles in the merchant’s asset. The JSON body is the same as the POST’s, with the v1 exact entries first.
Retry with PAYMENT-SIGNATURE (v2) or X-PAYMENT (v1) and the payment is verified and settled through the facilitator: 200 with PAYMENT-RESPONSE and a receipt to poll. Add ?payer=<address> to be offered routed requirements, whose refunds go back to that address. A paid invoice answers with its receipt; an expired or cancelled one with 410.
Authentication
Section titled “Authentication”The invoice’s client secret, in the x-client-secret header. It reaches this one invoice’s public endpoints and nothing else, and expires with the invoice.
Parameters
Section titled “Parameters”invoiceIdRequired · pathpayerOptional · queryThe paying wallet. Unlocks routed requirements, whose refunds go back to it
Responses
Section titled “Responses”- 200Paid: the receipt (and
PAYMENT-RESPONSEwhen this request paid it) - 402Payment required:
PAYMENT-REQUIREDheader, and the invoice and what it accepts - 410The invoice expired or was cancelled
Request
Section titled “Request”curl https://api.intents.fi/v0/checkout/inv_3QkR7mVt9zLpXdB2hJn6Yw/agent \ -H 'x-client-secret: $CLIENT_SECRET'const response = await fetch("https://api.intents.fi/v0/checkout/inv_3QkR7mVt9zLpXdB2hJn6Yw/agent", { method: "GET", headers: { "x-client-secret": clientSecret, },});
if (!response.ok) { const { error } = await response.json(); throw new Error(`${error.code}: ${error.message}`);}const data = await response.json();import httpx
response = httpx.get( "https://api.intents.fi/v0/checkout/inv_3QkR7mVt9zLpXdB2hJn6Yw/agent", headers={"x-client-secret": client_secret},)response.raise_for_status()data = response.json()Errors
Section titled “Errors”{ "error": { "code": "INVOICE_EXPIRED", "message": "This invoice has expired" } }Switch on code, not on the message: every code has a page under Error codes. Base URL https://api.intents.fi; the whole reference is on one page.