Finalize Reservation

3 min. readlast update: 11.14.2024

Finalize Reservation Endpoint

Overview

The Finalize Reservation endpoint is used to complete a reservation transaction after the pre-registration process. This step allows the system to finalize the booking details, apply payment preferences, and confirm the reservation with associated booking information, pricing, and options for payment.

Endpoint

POST /finalizeReservation

Request Model: FinalizeBookingModel

The request model for finalizing a reservation includes three key parameters:

  • transactionId (string, optional): The unique identifier for the reservation transaction, received from the preRegisterReservation endpoint.

  • paymentType (string, optional): Specifies the payment option selected by the customer. Available options are:

    • 'Later' — Payment is deferred for a later time.
    • 'NowFullAmount' — Full payment is made immediately.
    • 'NowPartialPayment' — Partial payment is made upfront.
  • thankYouPageUrl (string, optional): The URL to which the customer will be redirected after completing the payment process.

Example Request Body

{
  "transactionId": "string",
  "paymentType": "Later",
  "thankYouPageUrl": "string"
}

Response Model: PreBookingResult

The response from the Finalize Reservation endpoint provides detailed information about the reservation, including booking specifics, pricing, and house unit details.

  • transactionId (string, optional): The transaction identifier used in the booking.

  • priceSpecifications (array of PriceItemSpecification, optional): A breakdown of price components related to the booking.

    • PriceItemSpecification
      • itemName (string, optional): Description of the price item.
      • itemValue (string, optional): The value or amount for the item.
      • extrainfo (string, optional): Additional information regarding the item.
      • group (string, optional): Categorizes the payment as PayInAdvanceDepositPayAtLocation, or Total.
      • isHeader (boolean, optional): Indicates if this item serves as a header in the price list.
      • itemType (string, optional): Specifies the type of item, such as Normal or Discount.
  • paymentBookingType (string, optional): Defines the type of booking payment. Options include:

    • 'Normal'
    • 'EarlyBooking'
    • 'LastMinute'
  • fullPayAmount (number, optional): The full amount payable for the booking.

  • firstPayAmount (number, optional): The initial amount to be paid if a partial payment option is selected.

  • cancellationFundPossible (boolean, optional): Indicates if a cancellation fund option is available.

  • cancellationFund (number, optional): The amount required for the cancellation fund if applicable.

  • houseUnits (array of HouseUnitInfo, optional): Information about the reserved house units.

    • HouseUnitInfo
      • id (integer, optional): The unique identifier for the house unit.
      • allowPets (boolean, optional): Specifies if pets are allowed in the unit.
      • number (string, optional): House unit number.
      • preferenceIds (array of integers, optional): List of preference IDs associated with the unit.

Example Response

{
  "transactionId": "string",
  "priceSpecifications": [
    {
      "itemName": "string",
      "itemValue": "string",
      "extrainfo": "string",
      "group": "PayInAdvance",
      "isHeader": true,
      "itemType": "Normal"
    }
  ],
  "paymentBookingType": "Normal",
  "fullPayAmount": 0,
  "firstPayAmount": 0,
  "cancellationFundPossible": true,
  "cancellationFund": 0,
  "houseUnits": [
    {
      "id": 0,
      "allowPets": true,
      "number": "string",
      "preferenceIds": [0]
    }
  ]
}

Usage Notes

  • Error Handling: Ensure that a valid transactionId is provided from the preRegisterReservation endpoint to avoid errors.
  • Payment Options: The paymentType selected should correspond with the customer’s chosen payment flow.
Was this article helpful?