# Implementing pricing types

Booking.com supports multiple pricing types for properties to choose from depending on their business needs and inventory setup.
For an introduction to the supported pricing types and to help you identify a suitable pricing type for your properties, see [Identifying the right pricing type.](/connectivity/docs/understanding-pricing-types#identifying-a-suitable-pricing-type)

Use this section to understand:

- [The effect of changing the pricing type](#effects-of-changing-the-pricing-type) on the pricing of existing room inventory.
- [The rules to create room inventory](#understanding-pricing-types-with-examples) based on a particular pricing type.

For more information on how to set and view pricing types, see [Configuring and retrieving pricing types.](/connectivity/docs/configuring-retrieving-pricing-types)

## Effects of changing the pricing type

**Exercise caution before changing the pricing type**

Changing a pricing type removes all existing prices for the affected room-rates. Re-push all prices after the change. When switching to or from OBP or LOS, also redefine closed dates, restrictions, and inventory.

## Understanding pricing types with examples

Although you set the pricing type at the property level, prices are specified per room type, roomrate, and date.

**Pricing values should match the pricing type**

When creating an inventory, make sure to specify pricing values specific to the pricing type assigned to the roomrate.
For example, you cannot set a fixed price for a single guest using the `<price1>` element if the pricing type assigned to the roomrate is RLO. Instead you must specify pricing offsets per occupancy level following RLO specifications.

### Standard pricing type

Under the standard pricing type, you must specify two prices, except for rooms created with `RoomType=10` (Single room):

- A default price for the maximum number of adult guests.
- A price for a single adult guest.

For single rooms, where single occupancy and maximum occupancy are the same, you can only specify a price for maximum occupancy.

To update maximum adult/child occupancy for a room type, use the [`OTA_HotelInvNotif` endpoint.] [managing-room-types](/connectivity/docs/room-type-and-rate-plan-management/managing-room-types)

You can specify an inventory and pricing using one of the following endpoints:

- [B.XML](/connectivity/docs/b_xml-availability)
- [OTA](/connectivity/docs/ota-rateamountnotif)

#### Setting standard pricing type using B.XML

If you're using the [`/xml/availability`](/connectivity/docs/b_xml-availability) endpoint, use `price` to specify the price for maximum occupancy, and `price1` to specify the price for single occupancy:

```xml
<request>
  <version>1.0</version>
  <room id="1000202">
    <date value="2018-08-28">
      <rate id="12345"/>
      <price>150.00</price>
      <!-- <price> is the default price for maximum occupancy. -->
      <price1>135.00</price1>
      <!-- <price1> is the price for one adult. -->
    </date>
  </room>
</request>
```

For field details, see the [`/xml/availability`](/connectivity/docs/b_xml-availability#sample-request) page.

#### Setting standard pricing type using OTA XML

If you're using the [/ota/OTA_HotelRateAmountNotif](/connectivity/docs/ota-rateamountnotif) endpoint, specify the prices inside `BaseByGuestAmt` elements:

```xml
<!-- This is an excerpt and not a working sample request. -->
<Rates>
  <Rate>
    <BaseByGuestAmts>
      <BaseByGuestAmt
        AmountAfterTax="4500"
        DecimalPlaces="2"/>
        <!-- A <BaseByGuestAmt/> element without a @NumberOfGuests
             attribute specifies the default price for maximum occupancy. -->
      <BaseByGuestAmt
        AmountAfterTax="3800"
        DecimalPlaces="2"
        NumberOfGuests="1"/>
        <!-- A <BaseByGuestAmt/> element with @NumberOfGuests="1"
             specifies the price for one adult. -->
    </BaseByGuestAmts>
  </Rate>
</Rates>
<!-- End of excerpt. -->
```

For more elaborate examples, see [/ota/OTA_HotelRateAmountNotif](/connectivity/docs/ota-rateamountnotif).

### Derived pricing type

Set a base occupancy price, then define pricing offsets (percentage or fixed amount) for other occupancy sizes. Requires two endpoints:

1. Set the base price using [B.XML](/connectivity/docs/b_xml-availability) or [OTA_HotelRateAmountNotif](/connectivity/docs/ota-rateamountnotif).
2. Set offsets using [derivedprices](/connectivity/docs/b_xml-derivedprices).

**Step 1** — Set a price for maximum occupancy as you would for [standard pricing](/connectivity/docs/pricing-models#standard-pricing-type). Single occupancy pricing is not supported when the roomrate type is `RLO`.

**Step 2** — The following request to [/xml/derivedprices](/connectivity/docs/b_xml-derivedprices) sets:

- base price applies for 2 occupants.
- 1 occupant: 20% less than the base price.
- 3 occupants: 20% more than the base price.

```xml
<request>
  <rooms>
    <room id="1000202">
      <rates>
        <rate id="12345" leading_occupancy="2">
          <occupancy persons="1" percentage="-20" />
          <occupancy persons="3" percentage="20" />
        </rate>
      </rates>
    </room>
  </rooms>
</request>
```

For details about these fields and others, see the [/xml/derivedprices](/connectivity/docs/b_xml-derivedprices) page.

### Occupancy-based Pricing (OBP)

To create inventory using occupancy-based pricing (OBP), you must specify a price for every combination of room type, rate plan, date, and number of occupants.
Unlike the [derived pricing type](/connectivity/docs/pricing-models#derived-pricing-type), you cannot specify offsets based on a base price. Instead, you must specify an absolute amount for each number of occupants.

The OBP model enables you to specify prices for adults and children that are priced as adults in the `price[@NumberOfGuests]` and the `BaseByGuestAmt[@NumberOfGuests]` fields.

**Number of guests should not exceed maximum occupancy of the room**

Do not set pricing above the room's maximum occupancy. Retrieve occupancy details via [`OTA_HotelDescriptiveInfo`](/connectivity/docs/tsk-retrieve-property) or the [`rooms` endpoint](/connectivity/docs/rooms-api/managing-units#retrieving-units). Update maximum occupancy via [`OTA_HotelInvNotif`](/connectivity/docs/rooms-api/introduction-to-rooms-api).

With the OBP type, you can use either the [B.XML](/connectivity/docs/b_xml-availability) or [OTA](/connectivity/docs/ota-rateamountnotif) endpoint.

#### B.XML Example

The `price[@NumberOfGuests]` field specifies prices for one, two, and three occupants (adults and children priced as adults):

```xml
<?xml version="1.0" encoding="UTF-8"?>
<request>
  <room id="999999999">
    <date from="2019-05-22" to="2019-05-23">
      <price numberofguests="1">100</price>
      <price numberofguests="2">120</price>
      <price numberofguests="3">140</price>
      <rate id="88888888" />
    </date>
  </room>
</request>
```

#### OTA Example

The `BaseByGuestAmt[@NumberOfGuests]` field specifies prices for one, two, and three occupants (adults and children priced as adults):

```xml
      <Rates>
        <Rate>
          <BaseByGuestAmts>
            <BaseByGuestAmt NumberOfGuests="1" AmountBeforeTax="10000" DecimalPlaces="2" />
            <BaseByGuestAmt NumberOfGuests="2" AmountBeforeTax="12000" DecimalPlaces="2" />
            <BaseByGuestAmt NumberOfGuests="3" AmountBeforeTax="14000" DecimalPlaces="2" />
          </BaseByGuestAmts>
        </Rate>
      </Rates>
```

### Length-of-Stay (LOS)

While creating inventory using the LOS pricing type, you must specify the check-in date, the number of occupants, and pricing for a room that corresponds to a particular number of nights.
Starting from the day of the request, you can send prices for up to _729_ days into the future.

You can use either the [CSV](/connectivity/docs/csv-los_pricing) or [OTA](/connectivity/docs/ota-rateamountnotif) endpoint.

#### CSV example

Send a request to [`/csv/los_pricing`](/connectivity/docs/csv-los_pricing) with comma-separated values in this format:

```csv
{check-in date},{number of occupants},{room ID},{rate ID},{currency code},{price for 1 night},{price for 2 nights},{price for 3 nights},...
```

#### OTA Example

Send a request to [`/ota/OTA_HotelRateAmountNotif`](/connectivity/docs/ota-rateamountnotif) using `Rate[@UnitMultiplier]` for the length of stay, `BaseByGuestAmt[@NumberOfGuests]` for occupancy, and `BaseByGuestAmt[@AmountBeforeTax]` for the per-night price.

In the example below, the total price for 2 guests for 2 nights = 2 × 290 = 580.

```xml
<!-- This is an excerpt and not a working sample request. -->
      <Rates>
        <Rate RateTimeUnit="Day" UnitMultiplier="1">
         <BaseByGuestAmts>
            <BaseByGuestAmt AmountBeforeTax="300" NumberOfGuests="1" />
            <BaseByGuestAmt AmountBeforeTax="310" NumberOfGuests="2" />
         </BaseByGuestAmts>
        </Rate>
        <Rate RateTimeUnit="Day" UnitMultiplier="2">
         <BaseByGuestAmts>
            <BaseByGuestAmt AmountBeforeTax="280" NumberOfGuests="1" />
            <BaseByGuestAmt AmountBeforeTax="290" NumberOfGuests="2" />
         </BaseByGuestAmts>
        </Rate>
      </Rates>
<!-- End of excerpt. -->
```

## Flexible children pricing

You can specify prices for children by implementing Flexible children rates. To learn more, see [the Flexible children rates documentation](/connectivity/docs/flexible-children-rates/managing-flexible-children-rates)
