Skip to content

Preview a promo code or gift card against a held deposit

post/api/book/{slug}/reservations/{id}/codes

H12. Never applies or spends anything: what a promo code and/or gift card would do to the deposit or Experience ticket this hold owes, so the payment step can show the discount, the gift card part and what is left before the card is touched. The confirm (PATCH /api/book/{slug}/reservations/{id} with promoCode/giftCardCode) re-resolves the same codes with the guest's customer id and is the only place they are applied, so a once-per-customer or new-customers-only code can still be refused there. Stripe's minimum charge is respected: the card part is either 0 or at least the minimum. Rate-limited on the 'write' guest bucket.

Path Parameters

slug*string

The organization's public booking slug, i.e. the {slug} in /{slug}. Only orgs with status active resolve; anything else is a 404.

id*string

The reservationId returned by the hold.

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/api/book/string/reservations/string/codes" \  -H "Content-Type: application/json" \  -d '{}'
{  "depositCents": 0,  "promoDiscountCents": 0,  "giftCardCents": 0,  "giftCardBalanceCents": 0,  "amountDueCents": 0}