Calculating the Total Price for a Booking
Hotel Trader will provide roomtype metadata information such as adult/child occupancy restrictions, and additional guest pricing. Please note that any pricing information provided in the metadata is for UI/UX display consideration in the booking workflow within the client systems. All bookings priced with Hotel Trader must calculate the pricing by processing the information in the OTA_HotelRatePlanNotifRQ messages and not consider any pricing provided in the metadata.
Pricing Calculation Sequence
For Adults Only
- Ignore the <AdditionalGuestAmounts> element.
- Use only the information provided in the <BaseByGuestAmt> element.
- The information for all adults the roomtype can support (up to TotalMaxAdults) will be provided in the <BaseByGuestAmt> nodes.
- The <BaseByGuestAmt> element will never include extra child amounts. This was done so that multiple combinations of Adult+Child would not be required in the <BaseByGuestAmt> which would have over-complicated the information provided for our clients.
For Adults + Children
- Child occupancy pricing will only be provided in the <AdditionalGuestAmount> element with AgeQualifyingCode="8".
- Refer to the <BaseByGuestAmt> for the Adults pricing (as mentioned above) and then add the value specified in <AdditionalGuestAmounts> node for AgeQualifyingCode=“8” for each child occupant above theMaxOccupancyForDefaultPrice.
Examples
Below are some potential scenarios that help describe how to calculate the total amount for a room, for different occupancies, for a given roomtype.
Example 1
Assume the following metadata for a Superior double room of a hotel.
Room type | Superior double room |
---|---|
Max occupancy for default price | 2 |
Min adult occupancy | 1 |
Max adult occupancy | 4 |
Min child occupancy | 0 |
Max child occupancy | 1 |
Total max occupancy | 4 |
Assume the following OTA_HotelRatePlanNotifRQ message snippet, with all prices in USD.
<Rate End="2020-04-25" Fri="true" InvTypeCode="A1BB" Mon="true" Sat="true" Start="2020-04-25" Sun="true" Thur="true" Tue="true" Weds="true">
<BaseByGuestAmts>
<BaseByGuestAmt AgeQualifyingCode="10" AmountBeforeTax="120.00" NumberOfGuests="1"/>
<BaseByGuestAmt AgeQualifyingCode="10" AmountBeforeTax="120.00" NumberOfGuests="2"/>
<BaseByGuestAmt AgeQualifyingCode="10" AmountBeforeTax="145.00" NumberOfGuests="3"/>
<BaseByGuestAmt AgeQualifyingCode="10" AmountBeforeTax="170.00" NumberOfGuests="4"/>
</BaseByGuestAmts>
<AdditionalGuestAmounts>
<AdditionalGuestAmount AgeQualifyingCode="8" Amount="15.0"/>
</AdditionalGuestAmounts>
<RateDescription>
<Text xmlns:xsi="<http://www.w3.org/2001/XMLSchema-instance>" xsi:nil="true"/>
</RateDescription>
</Rate>
Calculation of the total amount for a single room of this roomtype is given below, for different search scenarios:
Number of Adults | Number of children | Total price ($) | Price breakdown ($) |
---|---|---|---|
1 | 0 | 120.00 | 120 |
2 | 0 | 120.00 | 120 |
1 | 1 | 120.00 | 120 |
2 | 1 | 135.00 | 120 +15 |
3 | 1 | 160.00 | 145 + 15 |
4 | 0 | 170.00 | 170 |
5 | 0 | Not permitted as totalMaxOccupancy and maxAdultOccupancy exceeded | - |
2 | 2 | Not permitted as maxChildOccupancy exceeded | - |
3 | 0 | 145.00 | 145 |
Example 2
Assume the following metadata for a Standard room of a hotel.
Room type | Standard Room |
---|---|
Max occupancy for default price | 2 |
Min adult occupancy | 1 |
Max adult occupancy | 2 |
Min child occupancy | 0 |
Max child occupancy | 1 |
Total max occupancy | 2 |
Assume the following OTA_HotelRatePlanNotifRQ message snippet, with all prices in USD.
<Rate End="2020-04-25" Fri="true" InvTypeCode="A2BB" Mon="true" Sat="true" Start="2020-04-25" Sun="true" Thur="true" Tue="true" Weds="true">
<BaseByGuestAmts>
<BaseByGuestAmt AgeQualifyingCode="10" AmountBeforeTax="100.00" NumberOfGuests="1"/>
<BaseByGuestAmt AgeQualifyingCode="10" AmountBeforeTax="100.00" NumberOfGuests="2"/>
</BaseByGuestAmts>
<AdditionalGuestAmounts>
<AdditionalGuestAmount AgeQualifyingCode="8" Amount="5.0"/>
</AdditionalGuestAmounts>
<RateDescription>
<Text xmlns:xsi="<http://www.w3.org/2001/XMLSchema-instance>" xsi:nil="true"/>
</RateDescription>
</Rate>
Calculation of the total amount for a single room of this roomtype is given below, for different scenarios:
Number of Adults | Number of children | Total price ($) | Price breakdown ($) |
---|---|---|---|
1 | 0 | 100.00 | 100 |
2 | 0 | 100.00 | 100 |
1 | 1 | 100.00 | 100 |
1 | 2 | Not permitted as totalMaxOccupancy exceeded | - |
0 | 2 | Not permitted as minAdultOccupancy not met | - |
3 | 0 | Not permitted as maxAdultOccupancy and totalMaxOccupancy exceeded | - |