Checkout Flow
A CheckoutFlow is a custom checkout your museum builds in the back office under Checkout flows: the steps a guest goes through, such as tickets, an event, a membership, products and a donation, in the order staff set them. Your website opens a flow in the JavaScript SDK's checkout with its id, or links to the flow's own page, checkoutUrl.
Checkout flows are read-only in the API: staff build them and their steps in the back office. Read them with List Checkout Flows and Get Checkout Flow. A test mode API key reads the test mode flows, which are the ones a test mode SDK opens, and a live key reads the live flows.
| Property | Type | Default | Description | Example |
|---|---|---|---|---|
id* | string (UUIDv4) | Unique identifier. It's what the SDK takes as checkoutFlowId, and it stays the same when the flow is renamed | "08b0a9fb-6696-48c9-a9dd-6accd3c7ecaf" | |
name* | string | The flow's name, as staff wrote it in the back office | "School visit" | |
slug* | string | The end of the flow's own page address, set under Slug in the back office. No other flow of your museum and mode has it, but staff can change it, so refer to a flow by its id | "school-visit" | |
checkoutUrl* | string | The flow's own page on your museum's checkout. It changes when staff change the flow's slug in the back office, so store the id and read the address when you need it | "https://acme-museum.membership.loby.io/checkouts/school-visit" | |
createdAt | string | Timestamp when the flow was created | "2026-09-02T08:14:03.120Z" | |
updatedAt | string | Timestamp when the flow or its steps last changed | "2026-11-20T13:40:51.002Z" | |
testMode | boolean | Whether the flow is a test mode flow. Only included when the request is made with a test mode API key | true |
Opening a flow from your website
Let editors pick a flow from List Checkout Flows in your CMS and store its id with the button or link. When a visitor clicks it, open the checkout with the SDK:
await Loby.waitForCheckoutReady() Loby.checkout({ type: 'CHECKOUT_FLOW', checkoutFlowId: '08b0a9fb-6696-48c9-a9dd-6accd3c7ecaf' })
checkoutUrl opens the same checkout as a page of its own, for a plain link.
The list holds every flow staff have made, also a flow with nothing on sale right now, for example when all its events are over. The SDK doesn't open a flow without anything to sell: it logs an error to the console instead.