Tax Breakdown
Once total Price is calculated with the normal AIF procedure and the contract rules specified (CNCT, CNSR, CNSU…), special taxes must be applied by using the new structure [ATAX].
In order to determine the taxes that apply over the final price generated, you must apply the first record of every tax type that verifies the following application criteria:
 Room code in tax is empty or is the same as the room code that is valuating.
 Board code in tax is empty or is the same as the board code that is valuating.
 Stay period of the booking must be included in the period defined by initial date and final date from ATAX structure.
NOTE 1: Application order is already included in ATAX structure, this is, first line is the first tax you must apply, second line is the second tax to apply … Remember that only first record of every tax type must be applied.
NOTE 2: If there are 2 (or more) taxes with the same code but different age range, and paxes in the booking comply both, then both taxes must be applied, as the age range do them different. In the same way, if there are 2 taxes with the same code and different age range (first from 10 to 20 and second from 21 to 30) and the pax in the booking is 25 years old, the second tax must be applied (that comply the conditions) and dismiss the first one.
Initial dale  Final date  Room code  Board code  Tax code  Included in price  Max number of nights  Minimum age  Maximum age  Is per night  Is per pax  Amount  Percentage  Currency  Apply over  Country code 
20140101  20150101  DBT    CT  N  7  16  99  Y  Y    1%    A   
20140301  20150101      CT  N  7  16  99  N  Y    1%    A   
20140101  20150101      VA  N  7  16  99  Y  Y  1€  4%  EUR  N   
{ATAX}
20140101:20150101:DBT::CT:N:7:16:99:N:Y::1.0::A:
20140101:20150101:::CT:N:7:16:99:S:Y::1.0::A:
20140101:20150101:::VA:N:7:16:99:N:Y:1.000:4.0:EUR:N:
{/ATAX}
(*) Taxes from table in ATAX in AIF file format.
Once taxes applicable are identified, amounts and percentages must be calculated with the objective to group the information in 4 blocks:
Example 1:
Room DBT, board BB, from 16/08/2014 – 17/08/2014, occupancy AD30 and AD30.

Amount 
Percentage 
Included in price  N

1€ x 1 night x 2 paxes = 2€ 
1% + 4% = 5% 
(*) Examples are based on table and ATAX information above
Example 2:
Room SUI, board BB, from 16/08/2014 – 17/08/2014, occupancy AD30 and AD30.

Amount 
Percentage 
Included in price  N

1€ x 1 night x 2 paxes = 2€ 
1% + 4% = 5% 
(*) Examples are based on table and ATAX information above
It is necessary to select all not included taxes and group their percentages and amounts doing the same calculations.
Percentages must be grouped by doing the sum of all the values from Percentage column.
Value Apply over will only be available when tax is a percentage. When this happens, you can receive 2 different values depending if the tax is applied:
 Over Net price (N). It is necessary to apply the tax over the Net price.
 Over Amount (A). It is necessary to apply the tax over Amount.
When tax is applied over Amount ([ATAX].Apply over = A) (for 1 pax):
{CNCT} 20141013:20141231:DBL:ST::(N, 110.000,120.000,41,BB,120.000) {/CNCT} {CNSU} 20141013:20141231:20140730::MA:G:N:N:0:T:10.000::N::::::::::::Y:Y:Y:Y:Y:Y:Y:5.000:5.000 {/CNSU} {ATAX} 0140101:20150101:DBT::CT:N:7:16:N:Y::10.0::A: {/ATAX} In this case, the final price would be 120.000 + 10.000 = 130 + 10% (tax) = 143.000 Calculation would follow the same process as usual (generate the final price based on Amount price) and later apply the tax from [ATAX]. 
When tax is applied over Net price ([ATAX].Apply over = N) (for 1 pax):
{CNCT} 20141013:20141231:DBL:ST::(N, 110.000,120.000,41,BB,120.000) {/CNCT} {CNSU} 20141013:20141231:20140730::MA:G:N:N:0:T:10.000::N::::::::::::Y:Y:Y:Y:Y:Y:Y:9.000:10.000 {/CNSU} {ATAX} 0140101:20150101:DBT::CT:N:7:16:N:Y::10.0::N: {/ATAX}
In this case, the final price would be 120.000 + 10.000 = 130 The tax calculated over net price would be: (110 + 9) *10% (tax) = 11.90 Total price = 130 + 11.9 = 141.90
Calculation of tax must be done over Net price. For doing that it is necessary you complete the calculation for the net price and apply the tax over the total net price (above in red). Once you have the total net price (net price, board supplements, general supplements…), it is necessary to apply the tax percentage and sum it to the total price you would get previously for the binding (Price in blue).

Please remember that the valuation process is composed by:
 1. Calculate the base price
 2. Calculate the board supplement and discount
 3. Calculate the occupancy supplements and discounts
 Child
 Additional bed
 Individual use
 4. Calculate the general supplements and discounts
 5. Calculate the frees
 6. Check the combinable supplements and discounts
 7. Calculate the handling fees
 8. Apply taxes
So it is necessary you complete this calculation BEFORE applying any tax.
Amounts must be grouped bearing in mind the columns: Maximum number of nights, Minimum age, Is per night and Is per pax for doing the calculation.
The way to calculate the amount bearing in mind every case is the following:
 Maximum number of nights: Informs about the maximum number of nights that tax amount must be applied.
 Minimum age and maximum age: Tax must only apply on the paxes aged between these 2 fields.
 Is per night: Indicates if tax must be applied per every night in the stay or per whole stay (just once).
 Is per pax: Indicates if tax must be applied for every pax in the room or per room (just once).
Docs Navigation
 GET AN API KEY AND AUTHENTIFICATION
 Hotel BOOKINGAPI
 Hotel CONTENTAPI
 Hotel CACHEAPI
 Hotel Endpoints and Headers
 Hotel API ERRORS
 Activities BOOKINGAPI
 Activities CONTENTAPI
 Activities API ERRORS