Skip to content

Checkout Sessions

A checkout session is a short-lived, single-use URL that hosts the payment page. You create it on your server, redirect the customer to it, and verify the result on return. The customer's card data never touches your servers.

Create a Checkout Session

http
POST /api/v1/checkout-sessions

Request body

FieldTypeRequiredDescription
amountintegerYesAmount in the smallest currency unit (e.g., 1000 = $10.00)
currencystringYesISO 4217: USD, JMD, TTD, BBD, EUR, GYD
success_urlstringYesRedirect URL after successful payment
failure_urlstringYesRedirect URL after failed payment
cancel_urlstringNoRedirect URL for the cancel button
descriptionstringNoShown on the checkout page and the receipt
customerobjectNo{name, email}
line_itemsarrayNoItemized order details — see Line Items, Tax & Order Details
subtotalintegerNoSubtotal before tax (cents)
tax_namestringNoTax label (GCT, VAT, Sales Tax)
tax_ratenumberNoDecimal rate (0.15 = 15%)
tax_amountintegerNoTax amount in cents
metadataobjectNoArbitrary data (returned in webhooks and on retrieve)
gatewaystringNoPreferred gateway slug (e.g., powertranz_direct)
expires_in_minutesintegerNo1–1440. Defaults to 30.

Response

json
{
  "id": "cs_abc123def456",
  "status": "open",
  "amount": 2500,
  "currency": "USD",
  "checkout_url": "https://app.geniuscheckout.com/checkout/cs_abc123def456",
  "expires_at": "2026-05-05T12:30:00+00:00"
}

Redirect the customer to checkout_url. They'll see the payment page with your branding, order summary, and card entry form.

Retrieve a Checkout Session

http
GET /api/v1/checkout-sessions/{id}

Verify before fulfilling

Use this endpoint to confirm payment status after the customer is redirected back. Never trust URL parameters — the redirect URLs do not contain payment data, only the session ID.

Response

json
{
  "id": "cs_abc123def456",
  "status": "completed",
  "amount": 2500,
  "currency": "USD",
  "description": "Order #1042",
  "completed_at": "2026-05-05T12:15:00+00:00",
  "transaction": {
    "id": "txn_789xyz",
    "receipt_number": "RCT-000042",
    "status": "captured",
    "card_brand": "Visa",
    "card_last4": "0071",
    "gateway_transaction_id": "5ABCABEC-4867-410B-B76C-E85721CF859B",
    "token_id": "tok_abc123"
  }
}

Session statuses

StatusMeaning
openCustomer has not completed checkout yet
completedPayment captured
failedPayment was attempted and declined
expiredSession passed its expires_at without completion
cancelledCustomer used the cancel button

Next

Released under the proprietary Genius Checkout license.