Resources / Checkouts

Checkouts

How a ticket the buyer pays for is sold: hold the seats for ten minutes and send the buyer to checkout_url, CocoScout's own checkout page, where they pay. Card numbers never pass through the API. Open the link in a new tab, or over your own page with CocoScout.checkout(checkout_token) from embed.js.

The object

status string
holding, then paid (or expired).
expires_at string or null
When the hold ends.
checkout_url string or null
Where the buyer pays, while holding.
checkout_token string
For CocoScout.checkout() on your page.
…
And everything an order has.
The checkout object
{  "id": 99120,  "code": "K7Q2",  "status": "holding",  "show_id": 4812,  "channel": "online",  "paid_where": "cocoscout",  "buyer": {    "name": "Jordan Lee",    "email": "jordan@example.com",    "follows": true  },  "subtotal_cents": 4000,  "discount_cents": 500,  "tax_cents": 0,  "fees_cents": 650,  "total_cents": 4150,  "refunded_cents": 0,  "discount_code": "SKETCH5",  "sold_through_api": true,  "paid_at": null,  "created_at": "2026-12-01T14:00:02-06:00",  "url": "https://cocoscout.com/tickets/orders/…",  "tickets": [    {      "code": "T9XK2M",      "status": "valid",      "ticket_type": {        "id": 912,        "name": "General"      },      "show_id": 4812,      "holder_name": "Jordan Lee",      "price_cents": 2000,      "url": "https://cocoscout.com/tickets/v/T9XK2M"    }  ],  "expires_at": "2026-12-01T14:10:02-06:00",  "checkout_token": "k3F9…",  "checkout_url": "https://cocoscout.com/tickets/checkout/k3F9…"}

Start a checkout

POST /v1/checkouts Read-and-write key

Holds the seats and prices everything: discount, tax, and fees.

Body

show_id integer required
Which date.
tickets array required
Each with ticket_type_id and quantity.
discount_code string
A code to apply.
buyer object
name and email, to fill in the checkout page.
curl
curl -X POST https://api.cocoscout.com/v1/checkouts \  -H "Authorization: Bearer cs_live_…" \  -H "Content-Type: application/json" \  -H "Idempotency-Key: $(uuidgen)" \  -d '{    "show_id": 4812,    "tickets": [      {        "ticket_type_id": 912,        "quantity": 2      }    ]  }'
Response 201
{  "id": 99120,  "code": "K7Q2",  "status": "holding",  "show_id": 4812,  "channel": "online",  "paid_where": "cocoscout",  "buyer": {    "name": "Jordan Lee",    "email": "jordan@example.com",    "follows": true  },  "subtotal_cents": 4000,  "discount_cents": 500,  "tax_cents": 0,  "fees_cents": 650,  "total_cents": 4150,  "refunded_cents": 0,  "discount_code": "SKETCH5",  "sold_through_api": true,  "paid_at": null,  "created_at": "2026-12-01T14:00:02-06:00",  "url": "https://cocoscout.com/tickets/orders/…",  "tickets": [    {      "code": "T9XK2M",      "status": "valid",      "ticket_type": {        "id": 912,        "name": "General"      },      "show_id": 4812,      "holder_name": "Jordan Lee",      "price_cents": 2000,      "url": "https://cocoscout.com/tickets/v/T9XK2M"    }  ],  "expires_at": "2026-12-01T14:10:02-06:00",  "checkout_token": "k3F9…",  "checkout_url": "https://cocoscout.com/tickets/checkout/k3F9…"}

Get a checkout

GET /v1/checkouts/{id}

Whether it's still holding, paid, or expired. Or listen for order.paid.

curl
curl https://api.cocoscout.com/v1/checkouts/4812 \  -H "Authorization: Bearer cs_live_…"