Create a checkout
Creates a checkout session, standalone or built from a payment link with linkId. The create and list responses do not include a plain amount, only amount_override (null unless you passed one). Call “Retrieve a checkout” for a computed, ready-to-display amount. Accepts an Idempotency-Key header (wins over a body idempotencyKey if both are sent); a repeat call with the same key returns the same checkout instead of creating a second one.
checkout.session.completed fires later, when AgentaOS confirms the buyer’s payment. See Which action fires which event.paymentMethods: ["card"] to make the checkout card-only. Without it, an EUR checkout also offers bank transfer. An impossible list (empty, no card, or bank transfer outside EUR) answers 400 with code: "payment_methods_unavailable". Without buyerEmail, the checkout page asks the buyer for their email./gateway/sessions (the underlying resource is called a “session”); the TypeScript SDK and the CLI both call it a checkout (agentaos.checkouts, agenta pay checkout).
Authorizations
Your secret key, from app.agentaos.ai -> Settings -> Developers -> API Keys. The key's prefix is both its identity and its environment: sk_test_... (sandbox, free, no verification) or sk_live_... (real money, requires business verification). A missing or invalid key returns 401.
Headers
Alternative to the body's idempotencyKey field. The header wins if both are sent.
Body
Either linkId or amount is required (amount is required when creating a standalone checkout with no link).
Payment link UUID to create from. Inherits amount, currency, description, taxRateId, and the seller mode. Omit for a standalone checkout.
Required if no linkId.
0.01 <= x <= 1000000With linkId, overrides the link's amount for this checkout only.
0.01 <= x <= 1000000Ignored (inherited from the link) when linkId is set.
EUR, USD, EURC, EURe, USDC 1000YYYY-MM-DD. Presentation only, stamped onto the invoice issued for this checkout.
320200200ISO 3166-1 alpha-2, e.g. DE. Drives destination-VAT calculation.
250020204820482048Seconds until the checkout expires. Without it: 24 hours for a card checkout, 48 hours for an EUR checkout that offers bank transfer, 30 minutes for a stablecoin checkout. At the deadline a card payment not yet completed is stopped; a bank transfer the buyer chose before it stays valid up to 30 days.
300 <= x <= 86400What the checkout offers. ["card"] makes it card-only. Without it: card, plus bank transfer on EUR. Card must be included; bank transfer is EUR only. An impossible list answers 400 payment_methods_unavailable.
card, bank_transfer Up to 8KB serialized.
CAIP-2 network IDs. Defaults to Base mainnet for crypto-settlement checkouts.
Also settable via the Idempotency-Key request header (the header wins if both are sent).
Response
Checkout created.
Internal checkout UUID.
Public ID, used in the checkout URL and as the path parameter for every other call on this resource.
Set only if you passed amount or amountOverride at create.
open, completed, expired, cancelled mor, crypto test, live Send your buyer here. Computed, camelCase.
The invoice issued with this checkout. Only in the response to POST /gateway/sessions, and absent when no invoice was issued.
That invoice's number. Only in the response to POST /gateway/sessions, and absent when no invoice was issued.
Agent-to-agent payment URL via the x402 protocol. Computed, camelCase. Most integrations can ignore it.
The checkout's own line text, when it was created with one. Otherwise the product's description applies.
The reference the buyer puts on a bank transfer to this checkout. Null until a bank transfer is chosen.
List only (GET /gateway/sessions): the product's amount, currency and description. Null for a checkout with no product.