Skip to main content
POST
Create a checkout
The REST path is /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).
The create and list responses do not include a plain amount, only amount_override (null unless you passed one). For a link-based checkout, the effective price is the link’s amount. To get a single, ready-to-display price, call Retrieve a checkout, which computes amount for you.

Authorizations

x-api-key
string
header
required

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

Idempotency-Key
string

Alternative to the body's idempotencyKey field. The header wins if both are sent.

Body

application/json

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.

amount
number

Required if no linkId.

Required range: 0.01 <= x <= 1000000
amountOverride
number

With linkId, overrides the link's amount for this checkout only.

Required range: 0.01 <= x <= 1000000
currency
enum<string>

Ignored (inherited from the link) when linkId is set.

Available options:
EUR,
USD,
EURC,
EURe,
USDC
description
string
Maximum string length: 1000
taxRateId
string<uuid>
dueDate
string<date>

YYYY-MM-DD. Presentation only, stamped onto the invoice issued for this checkout.

buyerEmail
string<email>
Maximum string length: 320
buyerName
string
Maximum string length: 200
buyerCompany
string
Maximum string length: 200
buyerCountry
string

ISO 3166-1 alpha-2, e.g. DE. Drives destination-VAT calculation.

Maximum string length: 2
buyerAddress
string
Maximum string length: 500
buyerVat
string
Maximum string length: 20
webhookUrl
string<uri>
Maximum string length: 2048
successUrl
string<uri>
Maximum string length: 2048
cancelUrl
string<uri>
Maximum string length: 2048
expiresIn
integer
default:1800

Seconds until expiry. Sessions eligible for SEPA bank transfer get a 48-hour window regardless of this value.

Required range: 300 <= x <= 86400
metadata
object

Up to 8KB serialized.

supportedNetworks
string[]

CAIP-2 network IDs. Defaults to Base mainnet for crypto-settlement checkouts.

idempotencyKey
string

Also settable via the Idempotency-Key request header (the header wins if both are sent).

Response

Checkout created.

id
string<uuid>
required

Internal checkout UUID.

org_id
string<uuid>
required
session_id
string
required

Public ID, used in the checkout URL and as the path parameter for every other call on this resource.

idempotency_key
string | null
required
amount_override
number | null
required

Set only if you passed amount or amountOverride at create.

currency
string
required
metadata
object
required
webhook_url
string | null
required
success_url
string | null
required
cancel_url
string | null
required
tax_rate_id
string<uuid> | null
required
supported_networks
string[]
required
expires_at
string<date-time>
required
status
enum<string>
required
Available options:
open,
completed,
expired,
cancelled
created_at
string<date-time>
required
updated_at
string<date-time>
required
seller_mode
enum<string>
required
Available options:
mor,
crypto
environment
enum<string>
required
Available options:
test,
live
checkoutUrl
string
required

Send your buyer here. Computed, camelCase.

invoiceId
string<uuid> | null

Set once an invoice has been issued for this session; null until then.

invoiceNumber
string | null