Checkout: public page
GET
/v0/checkout/{invoiceId}/attempts/{id}Fetch a payment attempt
Refreshed from the provider when stale, like core GET /v0/orders/{id}. Poll it every 2 s while the page is visible, backing off to 10 s after 5 minutes (§4.5). It carries invoiceStatus too, so one poll drives the whole screen.
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 · pathidRequired · path
Responses
Section titled “Responses”- 200The attempt and the invoice status it implies
Request
Section titled “Request”curl https://api.intents.fi/v0/checkout/inv_3QkR7mVt9zLpXdB2hJn6Yw/attempts/inv_3QkR7mVt9zLpXdB2hJn6Yw \ -H 'x-client-secret: $CLIENT_SECRET'const response = await fetch("https://api.intents.fi/v0/checkout/inv_3QkR7mVt9zLpXdB2hJn6Yw/attempts/inv_3QkR7mVt9zLpXdB2hJn6Yw", { 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/attempts/inv_3QkR7mVt9zLpXdB2hJn6Yw", 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.