Developers

Carts and Checkout URLs

1 min read

Use public carts to build a guest's cart server-side and hand back a ready-to-use checkout link.

How it works

  1. Create a cart with POST /venues/{venueId}/carts.
  2. Save the returned id and checkoutUrl.
  3. If the guest changes items before paying, call POST /venues/{venueId}/carts again with previousCartId.
  4. Send the same checkoutUrl to the guest.

The checkout URL includes a prospect token in the query string. That token ties checkout requests to the same cart session.

Endpoints

  • POST /venues/{venueId}/carts creates a cart and returns checkoutUrl.
  • GET /venues/{venueId}/carts/{cartId} returns the latest cart state and checkout URL.

All requests require your x-tl-api-key header.

Request shape

Use the same items shape for create requests:

  • inventoryId (required)
  • quantity (required)
  • arrivalTime (optional)
  • guests (optional)

Each cart can only include inventory from one venue and one date. To replace a cart, pass previousCartId in POST /venues/{venueId}/carts.

Related reference pages