curl --request POST \
--url https://connect.laces.run/v1/checkout-sessions \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"event_id": "q3Zk9mVx",
"ui_mode": "redirect",
"on_success_url": "https://shop.example.com/thanks?session={CHECKOUT_SESSION_ID}",
"on_cancel_url": "https://shop.example.com/events/kampala-city-10k",
"client_reference_id": "cart-8841",
"prefill": {
"buyer_name": "Amina Nakato",
"buyer_email": "amina@example.com"
}
}
'{
"code": 201,
"message": "Checkout session created successfully",
"data": {
"id": "LCSCS-EXAMPLESESSN234EXAMPL",
"url": "https://laces.run/checkout/LCSCS-EXAMPLESESSN234EXAMPL",
"expires_at": "2026-10-10T08:14:03.000Z",
"ui_mode": "redirect"
}
}Create a checkout session
Start a Laces-hosted checkout for one event and get the URL to send the buyer to.
curl --request POST \
--url https://connect.laces.run/v1/checkout-sessions \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"event_id": "q3Zk9mVx",
"ui_mode": "redirect",
"on_success_url": "https://shop.example.com/thanks?session={CHECKOUT_SESSION_ID}",
"on_cancel_url": "https://shop.example.com/events/kampala-city-10k",
"client_reference_id": "cart-8841",
"prefill": {
"buyer_name": "Amina Nakato",
"buyer_email": "amina@example.com"
}
}
'{
"code": 201,
"message": "Checkout session created successfully",
"data": {
"id": "LCSCS-EXAMPLESESSN234EXAMPL",
"url": "https://laces.run/checkout/LCSCS-EXAMPLESESSN234EXAMPL",
"expires_at": "2026-10-10T08:14:03.000Z",
"ui_mode": "redirect"
}
}Authorizations
A token from POST /oauth/token, valid 1 hour. Paste it as LCSTOK-…-X (without the word Bearer).
Body
Your organization's event.
"q3Zk9mVx"
redirect (hosted page, the default) or embedded (laces.js modal).
redirect, embedded Required for redirect, optional for embedded. Absolute https URL whose origin exactly matches one of your return URL domains (http://localhost:<port> / http://127.0.0.1:<port> only when registered). {CHECKOUT_SESSION_ID} (or %7BCHECKOUT_SESSION_ID%7D) is replaced with the session id; with no placeholder, session_id=<id> is added as a query parameter, overwriting any existing session_id.
2048"https://shop.example.com/thanks?session={CHECKOUT_SESSION_ID}"
Required for redirect, optional for embedded. Same rules; used as given (no id added).
2048"https://shop.example.com/events/kampala-city-10k"
Embedded sessions created with a bearer token only: the origin (https://host[:port]) of the page that will host the modal. Must be one of your allowed domains (400 invalid_embed_origin otherwise). With a publishable key the request's Origin is used and this field is ignored.
"https://shop.example.com"
Your reference, returned when you read the session. Match it on verification.
256"cart-8841"
Optional values to pre-fill on the checkout form.
Show child attributes
Show child attributes