---
title: "1. Create a checkout session (PREBOOK)"
method: POST
path: "/rates/prebook"
tags: ["Make bookings"]
---

# 1. Create a checkout session (PREBOOK)

`POST /rates/prebook`

## Overview

**Step 1 of 2** in the booking flow. Create a prebook session to check the availability of a rate and get final pricing before payment. This `prebookId` needed to complete the booking.

## When to Use

- **Before payment** - Always call this before completing a booking
- **Rate confirmation** - Verify final pricing and availability
- **Session creation** - Generate a checkout session for your payment flow

## What You Get

- **Prebook ID** - Required for the next step (completing the booking)
- **Final pricing** - Confirmed rates with all fees and taxes
- **Terms and conditions** - Cancellation policies and booking rules
- **Room details** - Complete information about the selected rooms

## Key Features

- **Live availability check** - Verifies the rate is available before you collect payment
- **Payment SDK support** - Set `usePaymentSdk=true` to use client-side payment forms
- **Reusable** - PrebookId can be used for multiple bookings if needed

## Quick Start

Provide the `offerId` from your hotel rates search and set `usePaymentSdk` (true/false). Returns a `prebookId` to use in the next step.

**Next Step**: Use the `prebookId` with `/rates/book` to complete the booking.

## Query parameters

- `timeout` integer
- `includeCreditBalance` boolean

## Request body

- object
  - `offerId` string, required — The unique identifier of the selected offer from the search results.
  - `usePaymentSdk` boolean, required — Specifies whether the fields needed to call the payment processing SDK are returned. Set to true if using the SDK for payment processing.
  - `voucherCode` string — An optional voucher code to apply discounts to the booking. The vouchers API allows creation of these discounts
  - `addons` object[] — A list of additional services or extras that can be added to the booking. For example, adding an Uber voucher or an esim card. The final booking amount is the sum of the offer's total price and the cost of any addons. Each addon's price is added individually to reflect all extras in the billed total.
    - `addon` string — The type of addon service (e.g., uber, esimply).
    - `value` number — The monetary cost of the addon service
    - `currency` string — The currency in which the addon service is charged
    - `addonDetails` object
      - `package_id` integer — Unique identifier of the addon package
      - `destination_code` string — Short code representing the destination or country (e.g., ES for Spain)
      - `start_date` string — The start date for the add-on service (YYYY-MM-DD format)
      - `end_date` string — The end date for the add-on service (YYYY-MM-DD format)
  - `bedTypeIds` integer[] — An optional array of bed type IDs to specify preferred bed configurations for the rooms being booked. The availability of specific bed types depends on the hotel's inventory.
  - `includeCreditBalance` boolean — Optional flag to include credit line information in the response. When set to true, credit line details will be returned if the user has a credit line available.

## Response `200`

OK

- object
  - `data` object
    - `prebookId` string, required — The pre-booking ID is required to confirm a booking and is reusable for multiple bookings. It's the only required field unless using our payment SDK, which also requires transactionId and secretKey.
    - `offerId` string — The offer ID passed during the prebook call, provided again here for reference.
    - `hotelId` string, required — The unique identifier for the hotel related to this pre-booking. Used along with the hotel content endpoint.
    - `checkin` string, required — The check-in date for the booking in YYYY-MM-DD format.
    - `checkout` string, required — The check-out date for the booking in YYYY-MM-DD format.
    - `currency` string, required — The currency in which prices and fees are displayed.
    - `termsAndConditions` string — The terms and conditions that apply to this booking, provided as a string.
    - `roomTypes` object[], required — An array of objects containing all the requested rooms/rates. This is not the type of room being booked.
      - `rates` object[] — An array of objects detailing the pricing and availability of the selected room rates. There will be a number of rates equal to the occupancies request.
        - `rateId` string — The unique identifier for a specific rate within the offer.
        - `occupancyNumber` integer — The number identifying which guest is associated with each room in a multi-room booking.
        - `name` string — The name of the room type booked, including key attributes.
        - `maxOccupancy` integer — The maximum number of guests allowed in this room.
        - `adultCount` integer — The number of adults included in this booking.
        - `childCount` integer — The number of children included in this booking.
        - `childrenAges` integer[] — A list of ages for each child included in this rate. Empty array if no children.
        - `boardType` string — A short code representing the meal plan included with the booking.
        - `boardName` string — The full name of the meal plan included in the booking.
        - `remarks` string — Any special remarks related to the booking or room type.
        - `priceType` string — Defines how pricing is structured. Only commission currently used. It can be set to 0 for net rates.
        - `commission` object[] — An array of objects specifying commission details for the booking.
          - `amount` number — The amount of commission included in the total price.
          - `currency` string — The currency the commission is in.
        - `retailRate` object — An object containing details of the final price, including taxes and fees.
          - `total` object[] — An array containing the total price due for this room.
            - `amount` number — The total cost amount due to book this room. This is what the end user will pay.
            - `currency` string — The currency the total is in.
          - `suggestedSellingPrice` object[] — This field represents the recommended price at which the booking should be offered.
            - `amount` number — The minmum amount the room can be sold for publicly.
            - `currency` string — The currency the SSP is in.
            - `source` string — The source of the SSP if we have it.
          - `initialPrice` object[] — This object represents the hotel's standard listed price for the room. It is always equal to or higher than the total price. If higher, it indicates a hotel discount is applied.
            - `amount` number — The initial price amount.
            - `currency` string — The currency of the initial price.
          - `taxesAndFees` object[] — Breakdown of taxes and additional charges:
            - `included` boolean — Indicates whether the tax or fee is already included in the total price (true) or if it must be paid separately at check-in (false).
            - `description` string — A brief explanation of the tax or fee (e.g., "Hotel Tax Rate" or "Daily Facilities Fee").
            - `amount` number — The monetary value of the tax or fee.
            - `currency` string — The currency the tax is in.
        - `cancellationPolicies` object — An object containing the cancellation rules and conditions for the booking.
          - `cancelPolicyInfos` object[] — An array of objects detailing specific cancellation penalties and deadlines.
            - `cancelTime` string — The deadline to cancel before incurring a fee (ISO datetime format).
            - `amount` number — The monetary penalty applied if the booking is canceled after the deadline. Can be 0 which means its fully refundable.
            - `currency` string — The currency of the cancellation fee.
            - `type` string — The type of cancellation penalty (e.g., 'amount' for a fixed fee).
            - `timezone` string — The timezone in which the cancellation policy applies. Always GMT, even if not listed.
          - `hotelRemarks` object[] — An array of additional remarks from the hotel regarding cancellations.
          - `refundableTag` string — Indicates whether the booking is refundable, Either 'NRFN' for non-refundable or RFN for refundable.
        - `paymentTypes` string[] — An array of payment types supported for this booking request.
        - `perks` object[] — An array of perks or benefits associated with this rate.
          - `perkId` integer — Unique identifier for the perk.
          - `name` string — The name or description of the perk.
          - `amount` number — The monetary value of the perk.
          - `currency` string — The currency of the perk amount.
          - `level` string — The level or tier of the perk.
    - `suggestedSellingPrice` object — The minimum public selling price for all the rooms combined. This is used for pricing control.
      - `amount` number — The minmum amount the room can be sold for publicly.
      - `currency` string — The currency the suggestedSellingPrice is in.
      - `source` string — The source of the suggestedSellingPrice if we have it. ex: 'expedia.com' or 'providerDirect'.
    - `commission` number — The total commission earned for all rooms being booked.
    - `price` number, required — The final price of the booking for all rooms after applicable calculations.
    - `priceType` string — Defines how pricing is structured. Only commission currently used. It can be set to 0 for net rates.
    - `priceDifferencePercent` integer — This is one of the three important fields to check. This should be 0. But if a rate has sold out, a similar alternate rate may be found and this field tells how much is the percentage difference between the original and final price.
    - `cancellationChanged` boolean — This is one of the three important fields to check. Boolean indicating if cancellation policies have changed since the initial offer.
    - `boardChanged` boolean — This is one of the three important fields to check. Boolean indicating if the board (meal plan) has changed since the initial offer.
    - `supplier` string — The supplier providing the inventory for this booking. By default this will always be Nuitee.
    - `supplierId` integer — The numerical identifier of the supplier. By default Nuitee's ID is always 2.
    - `transactionId` string — A unique transaction identifier for this booking request. Only returned is using the payment SDK.
    - `paymentTypes` string[] — An array of payment types supported for this booking request.
    - `mappedRoomId` integer, nullable — The mapped room ID, or null if the room has not been mapped
    - `secretKey` string — A key used for calling the paymentSDK to secure booking-related payments. Only returned is using the payment SDK.
    - `voucherCode` string — Represents the unique code used to redeem a voucher during the transaction.
    - `voucherTotalAmount` string — Specifies the total monetary value or discount amount provided by the voucher.
    - `addonsRequest` object[] — An array of objects specifying additional services or extras requested for the booking.
      - `addon` string — The name or type of the additional service requested.
      - `value` number — The price of the addon in the specified currency.
      - `currency` string — The currency in which the addon is priced.
      - `addonDetails` object — An object containing additional details about the requested addon.
        - `package_id` integer — Unique package ID for the addon
        - `destination_code` string — Destination location code (e.g., US)
        - `start_date` string — Start date of the addon service
        - `end_date` string — End date of the addon service
    - `creditLine` object — Credit line information returned when includeCreditBalance is set to true and the user has a credit line available.
      - `remainingCredit` number — The remaining credit amount available for the user.
      - `currency` string — The currency of the remaining credit amount.
  - `guestLevel` integer — Used with loyalty programs to determine the guests level of cost reduction.

## Other responses

- `400` — Bad Request
- `401` — Unauthorized
- `408` — Request Timeout

---

[API](https://skmtc.net/liteapi/apis/api-search.md) · [All operations](https://skmtc.net/liteapi/apis/api-search/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/liteapi/api-search/versions/315ba2a4dcf4/schema)
