Ask for an invitation
Menu

API reference

Checkout sessions

A checkout session is one payer's visit to the hosted checkout page for one order. Creating a session creates its order in the same call unless you pass an existing order. You redirect the payer to url; the page lets the payer choose Pay with Orrerie or an asset and network, shows the address and QR code, and sends the payer to success_url once the order is paid. A session is open until its order is paid or overpaid (completed) or the order expires (expired); a session whose order is underpaid stays open and shows the top-up. An order may have several sessions (a payer returns from an email).

Never fulfil from the redirect. The payer's browser reaching success_url proves nothing. Fulfil when you receive order.paid by webhook, or when GET /v1/orders/{id} returns status paid or overpaid.

The checkout_session object

JSON

{
  "id": "cs_z7ek5wj68fyz80j7bz1eq4e0",
  "object": "checkout_session",
  "livemode": true,
  "created": "2026-10-11T14:03:22.418Z",
  "status": "open",
  "mode": "payment",
  "order": "ord_0zymngngvf12b8b2cra7tb8e",
  "url": "https://pay.orrerie.com/c/cs_z7ek5wj68fyz80j7bz1eq4e0",
  "app_url": "https://pay.orrerie.com/o/cs_z7ek5wj68fyz80j7bz1eq4e0",
  "success_url": "https://acme.example/thanks?session={CHECKOUT_SESSION_ID}",
  "cancel_url": "https://acme.example/cart",
  "customer": "cus_8ea07c40qsvv19f7rgmeb8ha",
  "customer_email": "jane@example.com",
  "client_reference_id": "1042",
  "collect": {
    "email": "required",
    "name": "optional",
    "shipping_address": "hidden"
  },
  "collected": {
    "email": null,
    "name": null,
    "shipping_address": null
  },
  "locale": "auto",
  "subscription": null,
  "expires_at": "2026-10-11T15:03:22.418Z",
  "completed_at": null,
  "metadata": {
    "cart_id": "c_7781"
  }
}
Table: The checkout_session object
FieldMeaning
urlThe hosted checkout page. It carries only the session id.
app_urlThe Pay with Orrerie link. Opens the Orrerie app when installed. null when app_pay_allowed is false.
success_urlWhere the payer is sent after the order is paid. {CHECKOUT_SESSION_ID} and {ORDER_ID} are replaced.
client_reference_idYour own reference, echoed back. Up to 200 characters.
statusOne of open, completed, expired.
modeOne of payment, subscription.

Every field

Fields of the checkout_session object

Fields of the checkout_session object
FieldTypeMeaning
idstringUnique identifier: the object prefix, an underscore, 24 lower-case Crockford base32 characters.
objectstringThe type of this object.
livemodebooleantrue for live mode (real money); false for test mode (simulated payments).
createdstring (date-time)When the object was created. RFC 3339, UTC, milliseconds.
statusstringOne of open, completed, expired.
modestringOne of payment, subscription.
orderobjectThe ord_ id of the session's order, or the order object when expanded.
urlstringThe hosted checkout page. It carries only the session id.
app_urlstring or nullThe Pay with Orrerie link. Opens the Orrerie app when installed. null when app_pay_allowed is false.
success_urlstring or nullWhere the payer is sent after the order is paid. {CHECKOUT_SESSION_ID} and {ORDER_ID} are replaced.
cancel_urlstring or nullWhere the page's "Back to shop" link goes; null for none.
customerobjectThe cus_ id given with the session, or the customer object when expanded; null for none.
customer_emailstring or nullThe email given when the session was created, kept encrypted; null when none was given. The checkout shows no email field in this release.
client_reference_idstring or nullYour own reference, echoed back. Up to 200 characters.
collectobjectWhich details the page asks the payer for.
collect.emailstringrequired, optional or hidden.
collect.namestringrequired, optional or hidden.
collect.shipping_addressstringrequired, optional or hidden.
collectedobjectWhat the payer gave on the page.
collected.emailstring or nullThe email the payer gave; null for none.
collected.namestring or nullThe name the payer gave; null for none.
collected.shipping_addressobject or nullThe shipping address the payer typed, as {text}; null for none.
localestringThe page's language: auto or en.
subscriptionstring or nullThe sub_ id the session starts, for a subscription session; null otherwise.
expires_atstring (date-time)When the session's order stops taking new payments.
completed_atstring or nullWhen the order was paid; null until then.
metadataobjectUp to 50 keys of your own data. Key up to 40 characters, value a string up to 500 characters. Never used by Orrerie; never put secrets or personal data here.

Endpoints

Events

Webhook events whose data.object is an object of this page.