Checkout Sessions
A checkout session is an open charge. Hosted: redirect to pay.noderails.com. Headless: noderails.headlessCheckout on the same session.
Hosted payment page
Create a checkout session
/checkout-sessionsCreates a new checkout session. Returns a session object with line items.
Request body
| Parameter | Type | Required | Description |
|---|---|---|---|
appId | string | Yes | Your app UUID |
successUrl | string | Yes | URL to redirect on successful payment |
cancelUrl | string | Yes | URL to redirect on cancellation |
items | CheckoutItem[] | Yes | Line items (min 1) |
customerAccountId | string | No | Existing customer UUID |
mode | "PAYMENT" | "SUBSCRIPTION" | No | Checkout mode (default: PAYMENT) |
expiresInMinutes | number | No | Auto-expire in 1-1440 minutes |
metadata | object | No | Arbitrary key-value metadata |
CheckoutItem
| Field | Type | Required | Description |
|---|---|---|---|
name | string | Yes | Item name (1-255 chars) |
amount | string | No | Price in fiat (decimal string) |
currency | string | No | Currency code (max 10 chars) |
quantity | number | No | Item quantity (positive integer) |
description | string | No | Item description (max 500) |
productPlanId | string | No | Link to a product plan |
productPlanPriceId | string | No | Specific price option |
isPriceOption | boolean | No | Whether to use price option |
List checkout sessions
/checkout-sessionsQuery parameters
| Parameter | Type | Description |
|---|---|---|
appId | string | Filter by app UUID |
status | "OPEN" | "COMPLETE" | "EXPIRED" | Filter by status |
page | number | Page number (default: 1) |
pageSize | number | Items per page (1-100) |
Retrieve a checkout session
/checkout-sessions/:idExpire a checkout session
/checkout-sessions/:id/expireManually expires an open checkout session, preventing any further payments.
Headless payment options
/checkout-sessions/:id/payment-optionsSecret key. Session must be OPEN. Returns accepted chains and tokens with a spot quote per token. Exact signed amount is on prepare. See Headless Checkout.
Headless prepare
/checkout-sessions/:id/prepare| Parameter | Type | Required | Description |
|---|---|---|---|
tokenKey | string | Yes | Accepted token key |
chainId | number | Yes | Accepted chain id |
walletAddress | string | Yes | Customer wallet |
Headless confirm
/checkout-sessions/:id/confirmSecret key. Calls the same authorize path as hosted checkout. ERC-20 returns CAPTURING. Native, Solana, and Sui one-time pays return AWAITING_USER_TX plus captureData.
| Parameter | Type | Required | Description |
|---|---|---|---|
walletAddress | string | Yes | Customer wallet |
chainId | number | Yes | Chain used on prepare |
tokenKey | string | Yes | Token used on prepare |
customerEmail | string | Yes | Buyer email |
cryptoAmount | string | Yes | Charge amount from prepare (raw units) |
exchangeRate | string | Yes | Rate from prepare |
quoteId | string | No | Required when conversion is on |
permitSignature | object | No | amount, deadline, v, r, s after permit |
approvalTxHash | string | No | Approve tx hash |
customerName | string | No | Required when billing details are required |
billingAddress | string | No | Required when billing details are required |
billingCity | string | No | Required when billing details are required |
billingState | string | No | Required when billing details are required |
billingCountry | string | No | Required when billing details are required |
billingPostalCode | string | No | Required when billing details are required |
Headless submit user tx
/checkout-sessions/:id/submit-user-txSecret key. Report the capture hash after confirm returns AWAITING_USER_TX.
| Parameter | Type | Required | Description |
|---|---|---|---|
intentId | string | Yes | Payment intent from confirm |
txHash | string | No* | Capture hash (EVM, Solana, or Sui) |
suiSponsored | object | No* | Sponsored Sui payload. *Send txHash or suiSponsored |
Create from payment link
/checkout-sessions/from-linkCreates a checkout session from a payment link slug. This is a public endpoint, no authentication required.
| Parameter | Type | Required | Description |
|---|---|---|---|
slug | string | Yes | Payment link slug (1-100 chars) |
Create from invoice
/checkout-sessions/from-invoiceCreates a checkout session from an invoice ID. This is a public endpoint, no authentication required.
| Parameter | Type | Required | Description |
|---|---|---|---|
invoiceId | string | Yes | Invoice UUID |
Response object
All responses are wrapped in { "success": true, "data": ... }. List endpoints add pagination with total, page, pageSize, and totalPages.
CheckoutSession fields
idstringUnique checkout session UUIDappIdstringApp this session belongs tocustomerAccountIdstring | nullLinked customer UUID, if anypaymentIntentIdstring | nullAssociated payment intent UUID once payment beginsmodestringPAYMENT or SUBSCRIPTIONstatusstringOPEN, COMPLETE, or EXPIREDsourceTypestringOrigin type: CHECKOUT, PAYMENT_LINK, INVOICE, or SUBSCRIPTIONsourceIdstring | nullID of the originating resource (payment link, invoice, etc.)amountstringTotal payment amount as a decimal stringcurrencystringFiat currency code (e.g. USD)subtotalstringAmount before taxtaxAmountstringCalculated tax amounttaxDescriptionstring | nullTax label shown to customer (e.g. 'VAT 20%')allowedChains'ALL' | number[]Permitted chain IDs (EVM + Solana e.g. 103)allowedTokens'ALL' | string[]Permitted token identifierssuccessUrlstringRedirect URL after successful paymentcancelUrlstringRedirect URL on cancellationselectedPriceIdstring | nullSelected product plan price UUIDrequireBillingDetailsbooleanWhether billing details are required at checkoutmetadataobjectArbitrary key-value pairsexpiresAtstringISO 8601 expiration timestampcompletedAtstring | nullISO 8601 timestamp when session completedcreatedAtstringISO 8601 creation timestampupdatedAtstringISO 8601 last-update timestampitemsCheckoutSessionItem[]Line items in this sessionCheckoutSessionItem fields
idstringItem UUIDcheckoutSessionIdstringParent checkout session UUIDproductPlanIdstring | nullLinked product plan UUIDproductPlanPriceIdstring | nullLinked price UUIDnamestringItem display namedescriptionstring | nullItem descriptionamountstringPrice per unit as decimal stringcurrencystringCurrency codequantitynumberItem quantityisPriceOptionbooleanWhether this item uses a price optioncreatedAtstringISO 8601 creation timestampRetrieve response
app (full app record), paymentIntent (full payment intent), and each item includes productPlan and productPlanPrice when linked.