# Checkout tools

[All tool areas](/docs/tools.md). Each tool acts within your access.

## Checkout

### preview_hold

Preview what a party would pay for these seats right now, without holding anything (what place_hold would charge): each line's price per person, the totals with fees and each tax, and the seats left. The booking card's total for the guest's party comes from here (fees and tax round on the whole order, so a per-person price times the party can be off by cents). Takes place_hold's input (lines as JSON in the query string) and refuses what place_hold would refuse, with the same issues. Seats aren't held, so a hold placed later can still find them gone. A guest who holds seats and hasn't checked out sends the Idempotency-Key header their hold was placed with (at least 16 characters): the preview leaves that hold out, as place_hold's swap (replacesHoldKey) would: its seats in its own session and its add-ons' stock at its location. Prices still count it, as anyone booking now would pay. It takes no promo code: a code goes in through place_hold, apply_promo_code, or checkout. Public.

Reads · No sign-in needed

#### Input

- `organization` — string; required. The organization's slug minLength: 1; maxLength: 48
- `sessionId` — string; required. The session's id, from list_sessions
- `lines` — array; optional. place_hold's lines, as a JSON array in the query string: [{"ticketTypeId":"tkt_…","quantity":2}]; give this or `group` minItems: 1; maxItems: 20
  - `lines[]` — object; optional. 
    - `lines[].ticketTypeId` — string; required. The ticket type's id, from get_product
    - `lines[].quantity` — integer; required.  minimum: 1; maximum: 100
- `group` — object; optional. place_hold's group, as JSON in the query string: {"groupOptionId":"bkm_…","partySize":45}; give one of lines, group, or private
  - `group.groupOptionId` — string; required. A group option from list_availability
  - `group.partySize` — integer; required.  minimum: 1; maximum: 10000
- `private` — object; optional. place_hold's private, as JSON in the query string: {"token":"ses_…","partySize":30}; give one of lines, group, or private
  - `private.token` — string; required. The private booking link's token (get_private_session) minLength: 1; maxLength: 200
  - `private.partySize` — integer; required.  minimum: 1; maximum: 10000
- `addOns` — array; optional. place_hold's addOns, as JSON in the query string: [{"addOnId":"prd_…","quantity":2}] maxItems: 20
  - `addOns[]` — object; optional. 
    - `addOns[].addOnId` — string; required. An add-on from list_availability's addOns
    - `addOns[].quantity` — integer; required.  minimum: 1; maximum: 1000
- `menu` — array; optional. place_hold's menu, as JSON in the query string: [{"choiceId":"mch_…","quantity":2}] maxItems: 50
  - `menu[]` — object; optional. 
    - `menu[].choiceId` — string; required. A choice from list_availability's menu
    - `menu[].quantity` — integer; required.  minimum: 0; maximum: 10000
- `preview` — string; optional. A preview link's token (get_product_preview_link): the read is of that product's sessions whatever its status. place_hold refuses any hold that carries one minLength: 1; maxLength: 600

#### Output

- `sessionId` — string; required. 
- `partySize` — integer; required.  minimum: -9007199254740991; maximum: 9007199254740991
- `wholeSession` — boolean; optional. A whole-session group option: the session would be the party's alone
- `seatsLeft` — integer or null; required. Seats left in the session when read, before this party; null when capacity doesn't limit guests minimum: -9007199254740991; maximum: 9007199254740991
- `pricesIncludeTax` — boolean; required. Whether `price` includes tax (the organization's or entity's setting). When false, show the tax's name beside it ("+ HST")
- `taxNames` — array; required. The taxes charged, by name, for "+ HST" (empty when untaxed)
  - `taxNames[]` — string; optional. 
- `lines` — array; required. 
  - `lines[]` — object; optional. 
    - `lines[].ticketTypeId` — string; required. 
    - `lines[].quantity` — integer; required.  minimum: -9007199254740991; maximum: 9007199254740991
    - `lines[].unitAmount` — integer; required. Per seat, before fees and tax (a group option's: per seat above its included seats) minimum: -9007199254740991; maximum: 9007199254740991
    - `lines[].price` — integer; required. Per person as shown to guests under the operator's setting: the service charge and other fees in, and tax in only when pricesIncludeTax is on. A party's total isn't this times the party: preview_hold gives it
    - `lines[].priceWithTax` — integer; required. Per person with fees and tax
    - `lines[].taxNames` — array; optional. The taxes this ticket type's seats are charged, by name, for "+ HST" beside its price (empty when untaxed): the product's, plus those of the add-ons its package includes with a share of its price (a VIP including a wine pairing in BC: GST and PST, where the dinner alone is GST). Show these beside this price, not the session's taxNames. Always present
      - `lines[].taxNames[]` — string; optional. 
    - `lines[].group` — object; optional. Only on a group option's line: the line is baseAmount plus unitAmount for each seat above includedSeats
      - `lines[].group.baseAmount` — integer; required. The base charge, covering includedSeats, before fees and tax minimum: -9007199254740991; maximum: 9007199254740991
      - `lines[].group.includedSeats` — integer; required.  minimum: -9007199254740991; maximum: 9007199254740991
      - `lines[].group.basePrice` — integer; required. The base charge as shown to guests (fees in; tax in only when pricesIncludeTax) minimum: -9007199254740991; maximum: 9007199254740991
      - `lines[].group.basePriceWithTax` — integer; required. Minor units (cents) minimum: -9007199254740991; maximum: 9007199254740991
- `addOns` — array; optional. Add-ons: the ones the guest chose and the ones its seats include (always present)
  - `addOns[]` — object; optional. 
    - `addOns[].addOnId` — string; required. The add-on (a product, prd_…)
    - `addOns[].name` — string; required. 
    - `addOns[].quantity` — integer; required.  minimum: -9007199254740991; maximum: 9007199254740991
    - `addOns[].unitAmount` — integer; required. Per unit, before fees and tax minimum: -9007199254740991; maximum: 9007199254740991
    - `addOns[].price` — integer; required. Per person as shown to guests under the operator's setting: the service charge and other fees in, and tax in only when pricesIncludeTax is on. A party's total isn't this times the party: preview_hold gives it
    - `addOns[].priceWithTax` — integer; required. Per person with fees and tax
    - `addOns[].includedIn` — string or null; required. The ticket type whose seats include it (a package such as VIP): its price is in theirs, so it's 0 here. Null for an add-on the guest chose
    - `addOns[].menuChoiceId` — string or null; optional. The menu choice it's the supplement of (for the guests who picked it); null otherwise. Always present
- `menuChoices` — array; optional. Menu counts for the party, by course (empty when the product has no menu). Always present
  - `menuChoices[]` — object; optional. 
    - `menuChoices[].courseId` — string; required. 
    - `menuChoices[].course` — string; required. 
    - `menuChoices[].choiceId` — string or null; required. Null: seats left unchosen (the course has no default)
    - `menuChoices[].choice` — string or null; required. 
    - `menuChoices[].quantity` — integer; required.  minimum: -9007199254740991; maximum: 9007199254740991
    - `menuChoices[].defaulted` — boolean; required. The course's default, filling the seats the organizer left
- `totals` — object; required. 
  - `totals.currency` — string; required. 
  - `totals.lines` — array; required. 
    - `totals.lines[]` — one of: object, object, object, object; optional. A booking's tickets, extras, and fees; a gift certificate's order has only its gift_certificate line
      - `totals.lines[] — object option 1` — object; optional. 
        - `totals.lines[] — object option 1.kind` — string; required.  Value: "ticket\_type"
        - `totals.lines[] — object option 1.ticketTypeId` — string; required. 
        - `totals.lines[] — object option 1.name` — string; required. 
        - `totals.lines[] — object option 1.quantity` — integer; required.  minimum: -9007199254740991; maximum: 9007199254740991
        - `totals.lines[] — object option 1.unitAmount` — integer; required. Minor units (cents) minimum: -9007199254740991; maximum: 9007199254740991
        - `totals.lines[] — object option 1.group` — object; optional. Only on a group option's line: the line is baseAmount plus unitAmount for each seat above includedSeats
          - `totals.lines[] — object option 1.group.baseAmount` — integer; required. The base charge, covering includedSeats, before fees and tax minimum: -9007199254740991; maximum: 9007199254740991
          - `totals.lines[] — object option 1.group.includedSeats` — integer; required.  minimum: -9007199254740991; maximum: 9007199254740991
        - `totals.lines[] — object option 1.amount` — integer; required. Minor units (cents) minimum: -9007199254740991; maximum: 9007199254740991
        - `totals.lines[] — object option 1.components` — array; optional. Only on a package whose price is split by tax class (a VIP ticket including a wine pairing): its parts, the ticket's own first, each taxed by its own class. Their amounts add up to the line's. Show them under the line
          - `totals.lines[] — object option 1.components[]` — object; optional. 
            - `totals.lines[] — object option 1.components[].addOnId` — string or null; required. The included add-on (prd_…) this part is; null for the ticket's own part, named for its product
            - `totals.lines[] — object option 1.components[].name` — string; required. 
            - `totals.lines[] — object option 1.components[].quantity` — integer; required. Units for the whole line (seats for the ticket's own part, seats times the units per seat for an add-on) minimum: -9007199254740991; maximum: 9007199254740991
            - `totals.lines[] — object option 1.components[].amount` — integer; required. Its part of the line's amount, after discounts, before tax minimum: -9007199254740991; maximum: 9007199254740991
            - `totals.lines[] — object option 1.components[].taxes` — array; optional. Its own taxes, by the add-on's tax class (the product's for the ticket's own part). Only on refunded lines
              - `totals.lines[] — object option 1.components[].taxes[]` — object; optional. 
                - `totals.lines[] — object option 1.components[].taxes[].name` — string; required. 
                - `totals.lines[] — object option 1.components[].taxes[].ratePpm` — integer; required.  minimum: -9007199254740991; maximum: 9007199254740991
                - `totals.lines[] — object option 1.components[].taxes[].amount` — integer; required. Minor units (cents) minimum: -9007199254740991; maximum: 9007199254740991
      - `totals.lines[] — object option 2` — object; optional. 
        - `totals.lines[] — object option 2.kind` — string; required.  Value: "add\_on"
        - `totals.lines[] — object option 2.addOnId` — string; required. The add-on (a product, prd_…)
        - `totals.lines[] — object option 2.name` — string; required. 
        - `totals.lines[] — object option 2.quantity` — integer; required.  minimum: -9007199254740991; maximum: 9007199254740991
        - `totals.lines[] — object option 2.unitAmount` — integer; required. Minor units (cents) minimum: -9007199254740991; maximum: 9007199254740991
        - `totals.lines[] — object option 2.menuChoiceId` — string or null; optional. The menu choice (mch_…) this line is the supplement of, for the guests who picked it; null for an add-on bought on its own. One add-on can have both lines in one order: label each by this, never by its add-on and quantity. Always present
        - `totals.lines[] — object option 2.amount` — integer; required. Minor units (cents) minimum: -9007199254740991; maximum: 9007199254740991
      - `totals.lines[] — object option 3` — object; optional. 
        - `totals.lines[] — object option 3.kind` — string; required.  Value: "fee"
        - `totals.lines[] — object option 3.feeId` — string; required. 
        - `totals.lines[] — object option 3.name` — string; required. 
        - `totals.lines[] — object option 3.ratePpm` — integer or null; required.  minimum: -9007199254740991; maximum: 9007199254740991
        - `totals.lines[] — object option 3.amount` — integer; required. Minor units (cents) minimum: -9007199254740991; maximum: 9007199254740991
      - `totals.lines[] — object option 4` — object; optional. 
        - `totals.lines[] — object option 4.kind` — string; required.  Value: "gift\_certificate"
        - `totals.lines[] — object option 4.name` — string; required. "Gift certificate", or the preset's name
        - `totals.lines[] — object option 4.amount` — integer; required. Minor units (cents) minimum: -9007199254740991; maximum: 9007199254740991
  - `totals.subtotal` — integer; required. Minor units (cents) minimum: -9007199254740991; maximum: 9007199254740991
  - `totals.fees` — integer; required. Minor units (cents) minimum: -9007199254740991; maximum: 9007199254740991
  - `totals.totalBeforeTax` — integer; required. Subtotal plus fees: the party's total as shown before tax minimum: -9007199254740991; maximum: 9007199254740991
  - `totals.tax` — integer; required. Minor units (cents) minimum: -9007199254740991; maximum: 9007199254740991
  - `totals.total` — integer; required. The total with tax, what the guest pays minimum: -9007199254740991; maximum: 9007199254740991
  - `totals.taxes` — array; required. 
    - `totals.taxes[]` — object; optional. 
      - `totals.taxes[].name` — string; required. 
      - `totals.taxes[].ratePpm` — integer; required.  minimum: -9007199254740991; maximum: 9007199254740991
      - `totals.taxes[].amount` — integer; required. Minor units (cents) minimum: -9007199254740991; maximum: 9007199254740991
      - `totals.taxes[].base` — integer; required. What this tax was charged on: the lines carrying this rate, after discounts, before tax. Less than the subtotal before tax when part of it (a service charge) isn't taxed minimum: -9007199254740991; maximum: 9007199254740991
  - `totals.discount` — object or null; optional. The promo code on this hold or order and what it took off, before tax. Each line's `amount` and `subtotal` are already after it. Null without a code. Always present
    - `totals.discount.code` — string; required. 
    - `totals.discount.kind` — string; required.  Allowed: "amount\_off", "percent\_off", "set\_price", "waive\_service\_charge"
    - `totals.discount.amount` — integer; required. What it took off, before tax: off the tickets and extras, or the fees a waive_service_charge code waived minimum: -9007199254740991; maximum: 9007199254740991
    - `totals.discount.lines` — array; required. What it took off each line: this plus the line's own amount is what the line was before it. A waived fee has no line of its own in `lines` above
      - `totals.discount.lines[]` — one of: object, object, object; optional. 
        - `totals.discount.lines[] — object option 1` — object; optional. 
          - `totals.discount.lines[] — object option 1.kind` — string; required.  Value: "ticket\_type"
          - `totals.discount.lines[] — object option 1.ticketTypeId` — string; required. 
          - `totals.discount.lines[] — object option 1.amount` — integer; required. Minor units (cents) minimum: -9007199254740991; maximum: 9007199254740991
        - `totals.discount.lines[] — object option 2` — object; optional. 
          - `totals.discount.lines[] — object option 2.kind` — string; required.  Value: "add\_on"
          - `totals.discount.lines[] — object option 2.addOnId` — string; required. 
          - `totals.discount.lines[] — object option 2.amount` — integer; required. Minor units (cents) minimum: -9007199254740991; maximum: 9007199254740991
        - `totals.discount.lines[] — object option 3` — object; optional. 
          - `totals.discount.lines[] — object option 3.kind` — string; required.  Value: "fee"
          - `totals.discount.lines[] — object option 3.feeId` — string; required. 
          - `totals.discount.lines[] — object option 3.amount` — integer; required. Minor units (cents) minimum: -9007199254740991; maximum: 9007199254740991
  - `totals.storedValueDiscounts` — array; optional. Free value an order took off before tax, after the promo code, in the order given: a promotional gift certificate, or a goodwill or service recovery credit. Each line's `amount` and `subtotal` are already after it; show each as its own row before the fees and tax, like the promo code's. Never on a hold. Always present: empty when there's none
    - `totals.storedValueDiscounts[]` — object; optional. 
      - `totals.storedValueDiscounts[].source` — string; required.  Allowed: "gift\_certificate", "credit"
      - `totals.storedValueDiscounts[].code` — string; required. Its code masked (•••• and its last 4)
      - `totals.storedValueDiscounts[].amount` — integer; required. What it took off, before tax minimum: -9007199254740991; maximum: 9007199254740991
      - `totals.storedValueDiscounts[].lines` — array; required. What it took off each line: this plus the line's own amount is what the line was before it
        - `totals.storedValueDiscounts[].lines[]` — one of: object, object; optional. 
          - `totals.storedValueDiscounts[].lines[] — object option 1` — object; optional. 
            - `totals.storedValueDiscounts[].lines[] — object option 1.kind` — string; required.  Value: "ticket\_type"
            - `totals.storedValueDiscounts[].lines[] — object option 1.ticketTypeId` — string; required. 
            - `totals.storedValueDiscounts[].lines[] — object option 1.amount` — integer; required. Minor units (cents) minimum: -9007199254740991; maximum: 9007199254740991
          - `totals.storedValueDiscounts[].lines[] — object option 2` — object; optional. 
            - `totals.storedValueDiscounts[].lines[] — object option 2.kind` — string; required.  Value: "add\_on"
            - `totals.storedValueDiscounts[].lines[] — object option 2.addOnId` — string; required. 
            - `totals.storedValueDiscounts[].lines[] — object option 2.amount` — integer; required. Minor units (cents) minimum: -9007199254740991; maximum: 9007199254740991
- `policies` — object; required. The policies, terms, and acknowledgements a hold would lock now, for the booking card: the summary, which terms (their text comes with place_hold, or get_terms), and the statements to tick
  - `policies.summary` — object; required. The policies as guests read them: `lines` by code (refunds, date changes, age, arrival), and `text`, the same in English
    - `policies.summary.lines` — array; required. 
      - `policies.summary.lines[]` — one of: object, object, object, object, object, object, object, object; optional. 
        - `policies.summary.lines[] — object option 1` — object; optional. 
          - `policies.summary.lines[] — object option 1.code` — string; required.  Value: "no\_refunds"
        - `policies.summary.lines[] — object option 2` — object; optional. 
          - `policies.summary.lines[] — object option 2.code` — string; required.  Value: "refund\_until"
          - `policies.summary.lines[] — object option 2.percent` — number; required. 100 is a full refund
          - `policies.summary.lines[] — object option 2.hoursBefore` — integer; required. Hours before the session starts (0: until it starts) minimum: -9007199254740991; maximum: 9007199254740991
          - `policies.summary.lines[] — object option 2.lessFees` — array; optional. The non-refundable fees that apply here, by their own names in lower case ("service charge"): the line says they aren't refunded. Absent when none applies
            - `policies.summary.lines[] — object option 2.lessFees[]` — string; optional. 
        - `policies.summary.lines[] — object option 3` — object; optional. 
          - `policies.summary.lines[] — object option 3.code` — string; required.  Value: "refunds\_as"
          - `policies.summary.lines[] — object option 3.destination` — string; required.  Allowed: "credit", "gift\_certificate"
        - `policies.summary.lines[] — object option 4` — object; optional. 
          - `policies.summary.lines[] — object option 4.code` — string; required.  Value: "no\_changes"
        - `policies.summary.lines[] — object option 5` — object; optional. 
          - `policies.summary.lines[] — object option 5.code` — string; required.  Value: "change\_until"
          - `policies.summary.lines[] — object option 5.hoursBefore` — integer; required. Hours before the session starts (0: until it starts) minimum: -9007199254740991; maximum: 9007199254740991
          - `policies.summary.lines[] — object option 5.times` — integer or null; required. How many times the date can change; null: no limit minimum: -9007199254740991; maximum: 9007199254740991
        - `policies.summary.lines[] — object option 6` — object; optional. 
          - `policies.summary.lines[] — object option 6.code` — string; required.  Value: "minimum\_age"
          - `policies.summary.lines[] — object option 6.age` — integer; required.  minimum: -9007199254740991; maximum: 9007199254740991
          - `policies.summary.lines[] — object option 6.withAdult` — integer or null; required. Younger guests down to this age can come with an adult minimum: -9007199254740991; maximum: 9007199254740991
        - `policies.summary.lines[] — object option 7` — object; optional. 
          - `policies.summary.lines[] — object option 7.code` — string; required.  Value: "arrive\_before"
          - `policies.summary.lines[] — object option 7.minutes` — integer; required.  minimum: -9007199254740991; maximum: 9007199254740991
        - `policies.summary.lines[] — object option 8` — object; optional. 
          - `policies.summary.lines[] — object option 8.code` — string; required.  Value: "no\_entry\_after"
          - `policies.summary.lines[] — object option 8.minutes` — integer; required.  minimum: -9007199254740991; maximum: 9007199254740991
    - `policies.summary.text` — string; required. 
  - `policies.terms` — object or null; required. 
    - `policies.terms.id` — string; required. 
    - `policies.terms.version` — integer; required.  minimum: -9007199254740991; maximum: 9007199254740991
    - `policies.terms.publishedAt` — string; required. When this version was published. Guests are shown this date, never the version number format: "date-time"
  - `policies.acknowledgements` — array; optional. The statements a hold would lock now, which checkout asks the guest to tick: place_hold's are the ones to send. Always present
    - `policies.acknowledgements[]` — object; optional. 
      - `policies.acknowledgements[].id` — string; required. 
      - `policies.acknowledgements[].versionId` — string; required. This version: what checkout's `acknowledgements` takes
      - `policies.acknowledgements[].version` — integer; required.  minimum: -9007199254740991; maximum: 9007199254740991
      - `policies.acknowledgements[].text` — string; required. 
