Use public carts to build a guest's cart server-side and hand back a ready-to-use checkout link.
How it works
- Create a cart with
POST /venues/{venueId}/carts. - Save the returned
idandcheckoutUrl. - If the guest changes items before paying, call
POST /venues/{venueId}/cartsagain withpreviousCartId. - Send the same
checkoutUrlto 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}/cartscreates a cart and returnscheckoutUrl.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.