> For the complete documentation index, see [llms.txt](https://ovatheme.gitbook.io/brw/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://ovatheme.gitbook.io/brw/create-a-product/rental-type-config/by-taxi.md).

# By Taxi

<figure><img src="/files/yy3rIlnmkX5yt65jz6Oz" alt=""><figcaption></figcaption></figure>

The **Rental by Taxi** type calculates price from the actual driven distance measured via Google Maps. The customer draws their route on a map in the booking form — the plugin calculates total distance and multiplies by the per-km rate. A Base Price acts as a minimum floor.

{% hint style="info" %}
A Google Maps API key must be configured in **BRW Settings** for the map-based booking form to function. The API key needs the Maps JavaScript API, Places API, and Directions API enabled.
{% endhint %}

{% hint style="danger" %}
Taxi type does **not** use a separate drop-off date field. The customer sets a pick-up date and the route on the map. There are no Locations or Daily pricing plans.
{% endhint %}

## &#x20;1: Quick Start

{% stepper %}
{% step %}

### Add General fields

Read in [overview](/brw/create-a-product/overview.md)
{% endstep %}

{% step %}

### [Choose Rental Type](#id-2-choose-rental-type)

{% endstep %}

{% step %}

### [Pricing Settings](#id-3-pricing-settings)

{% endstep %}

{% step %}

### [Shared Fields](#id-4-shared-fields)

The following fields are shared across multiple rental types.
{% endstep %}

{% step %}

### [Common Fields](#id-5-common-fields)

The following fields are shared across all rental types.&#x20;
{% endstep %}

{% step %}

### [Customize Fields in Product Editing](#id-6-customize-fields-in-product-editing)

You can add/remove fields in product editing.
{% endstep %}

{% step %}

### Publish

Set a WooCommerce Regular Price for display purposes, then click **Publish**. The actual booking price is always calculated by BRW settings.
{% endstep %}
{% endstepper %}

## 2: Choose Rental Type

* Step 1: Add new product
* Step 2: Setup&#x20;
  * Product data: Rental
  * Rental Type: Taxi

<figure><img src="/files/71Kt5dSVW6COY8ikVRbg" alt=""><figcaption></figcaption></figure>

## 3: Pricing Settings

### 3.1 Price Per Km & Base Price <a class="button primary">price-taxi</a>

The two core pricing fields that define the taxi fare formula.

| Field               | Meta key           | Description                                                                                                                                                 |
| ------------------- | ------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Price Per Kilometer | `regul_price_taxi` | The base rate charged per km (or per mi, depending on map settings). This is the primary rate used when no distance discount applies.                       |
| Base Price          | `base_price`       | Minimum fare for any booking. If the calculated distance price is lower than this value, the Base Price is charged instead. Acts as a "minimum fare" floor. |

{% hint style="info" icon="lightbulb-exclamation" %}
**Formula:** Final price = max(Base Price, distance\_km × rate\_per\_km). The actual rate per km used may be modified by distance discounts or special time overrides.
{% endhint %}

### 3.2 Maximum Seats <a class="button primary">guest-taxi</a>

Defines the maximum passenger capacity of this vehicle. Used for passenger count filtering on the search/listing page.

| Field         | Meta key    | Description                                                                 |
| ------------- | ----------- | --------------------------------------------------------------------------- |
| Maximum Seats | `max_seats` | Number input. The maximum number of passengers this taxi/vehicle can carry. |

### 3.3 Setup Map <a class="button primary">map-taxi</a>

Configure the Google Maps route planner that customers use to draw their journey in the booking form.

| Field             | Meta key       | Description                                                                                                      |
| ----------------- | -------------- | ---------------------------------------------------------------------------------------------------------------- |
| Price by per      | `map_price_by` | Radio: **km** or **mi**. Determines the distance unit used throughout pricing fields and displayed to customers. |
| Waypoints         | `waypoint`     | Checkbox. When enabled, customers can add intermediate stops (waypoints) along their route.                      |
| Maximum waypoints | `max_waypoint` | Number of intermediate stops allowed when waypoints are enabled.                                                 |
| Zoom              | `zoom_map`     | Initial zoom level for the map (default: 4). Higher = closer. Adjust based on your service area.                 |
| Restrictions      | `restrictions` | Multi-select country codes (e.g. VN, TH, SG). Limits the Google Places autocomplete to the specified countries.  |

### 3.4 Extra Time<a class="button primary">extra-time</a>

Define optional waiting/extra time add-ons that customers can select during booking. Each row is a pre-defined time block with a fixed additional cost.

| Column          | Meta key             | Description                                                                             |
| --------------- | -------------------- | --------------------------------------------------------------------------------------- |
| Time (hour)     | `extra_time_hour[]`  | Duration of this extra time block in hours (e.g. `0.5` for 30 minutes, `1` for 1 hour). |
| Label           | `extra_time_label[]` | Display name shown to the customer on the booking form (e.g. "30 min waiting time").    |
| Additional cost | `extra_time_price[]` | Fixed extra fee added to the booking total if the customer selects this option.         |

{% hint style="info" icon="lightbulb-exclamation" %}
Extra Time is displayed as an optional checkbox or dropdown in the booking form. Customers can add it to their booking if they need the driver to wait or for extended service.
{% endhint %}

### 3.5 Distance-based Discount<a class="button primary">discount-distance</a>

Override the per-km rate for specific distance ranges. Useful for tiered pricing where longer trips get a lower per-km rate.

| Column            | Meta key                    | Description                                                                                     |
| ----------------- | --------------------------- | ----------------------------------------------------------------------------------------------- |
| From (km/mi)      | `discount_distance_from[]`  | Minimum total distance (in km or mi) for this discount tier to apply.                           |
| To (km/mi)        | `discount_distance_to[]`    | Maximum total distance for this tier.                                                           |
| Price/km (or /mi) | `discount_distance_price[]` | The discounted per-km rate applied for the entire trip when total distance falls in this range. |

{% hint style="danger" %}
Distance discounts are overridden by Special time (distance) rates when a date-based override is active. Base Price still applies as the floor regardless of discounts.
{% endhint %}

### 3.6 Special Time — Distance Pricing<a class="button primary">special-distance</a>

Define date windows with a different per-km rate and optional distance-range discounts within that period. Takes highest priority over all other pricing rules.

| Field                        | Meta key                           | Description                                                |
| ---------------------------- | ---------------------------------- | ---------------------------------------------------------- |
| Start date                   | `st_pickup_distance[]`             | Start of the special time window (datetime picker).        |
| End date                     | `st_pickoff_distance[]`            | End of the special time window (datetime picker).          |
| Price/km                     | `st_price_distance[]`              | Special per-km rate active during this date window.        |
| ST Distance discount – From  | `st_discount_distance[k][from][]`  | Within this ST window, sub-discount bracket from distance. |
| ST Distance discount – To    | `st_discount_distance[k][to][]`    | Sub-discount bracket to distance.                          |
| ST Distance discount – Price | `st_discount_distance[k][price][]` | Per-km rate for this sub-bracket within the ST window.     |

### 3.7 🏆Pricing Priority

When multiple pricing rules are active, BRW applies the following priority (highest wins). Base Price always acts as a minimum floor regardless of the active rule:

<a class="button primary">Special Time (ST) + ST Distance Discounts</a> > <a class="button primary">Distance-based Discount</a> > <a class="button primary">Price Per Km × distance</a>&#x20;

{% hint style="danger" %}
**Base Price floor:** The calculated fare (after all rules) is always at least the **Base Price**. So a 2km trip at $2.50/km ($5.00) with a Base Price of $10 will charge $10.
{% endhint %}

{% hint style="success" %}
**Example:** New Year's Eve (ST rate $3.50/km). Customer books a 25km trip: 25 × $3.50 = $87.50 — ST overrides both the distance discount and regular rate.
{% endhint %}

## 4: Shared Fields

Taxi type does **not** have a Drop-off date, Locations, or Location surcharge.

<table data-view="cards"><thead><tr><th></th><th></th><th data-hidden data-card-cover data-type="image">Cover image</th><th data-hidden data-card-target data-type="content-ref"></th></tr></thead><tbody><tr><td><strong>Pick-up location</strong></td><td><em>Show/rename on booking form</em></td><td data-object-fit="contain"><a href="/files/VRQp1fDrjb1yHNfjnyAC">/files/VRQp1fDrjb1yHNfjnyAC</a></td><td><a href="/pages/ROpztnKp5QzYsxP5DWDK">/pages/ROpztnKp5QzYsxP5DWDK</a></td></tr><tr><td><strong>Drop-off location</strong></td><td><em>Show/rename on booking form</em></td><td data-object-fit="contain"><a href="/files/PhpU87D8QCJO1pbkBJft">/files/PhpU87D8QCJO1pbkBJft</a></td><td><a href="/pages/ltbC4MGgvMzSq92SUZto">/pages/ltbC4MGgvMzSq92SUZto</a></td></tr><tr><td><strong>Round-trip</strong></td><td><em>Toggle + extra fee</em></td><td data-object-fit="contain"><a href="/files/Cdx8hnVoPefS5C4MAJ2Q">/files/Cdx8hnVoPefS5C4MAJ2Q</a></td><td><a href="/pages/5we2hwAvj3QZ1sgzCGNu">/pages/5we2hwAvj3QZ1sgzCGNu</a></td></tr><tr><td><strong>Guests options</strong></td><td><em>show/hide guest</em></td><td data-object-fit="contain"><a href="/files/pUrvaxIOVMndrA110lNm">/files/pUrvaxIOVMndrA110lNm</a></td><td><a href="/pages/cfkdHXKLMvGjuCQYgb6X">/pages/cfkdHXKLMvGjuCQYgb6X</a></td></tr><tr><td><strong>Guests fields</strong></td><td><em>Form fields + min/max</em></td><td data-object-fit="contain"><a href="/files/LIgxm2xMIr5RpWbiiIza">/files/LIgxm2xMIr5RpWbiiIza</a></td><td><a href="/pages/0SZ4g1xj4G8OqWD7Pkl4">/pages/0SZ4g1xj4G8OqWD7Pkl4</a></td></tr><tr><td><strong>Pick-up date</strong></td><td><em>Time slots, label, defautls</em></td><td data-object-fit="contain"><a href="/files/EfKepudwm942CZujRdPN">/files/EfKepudwm942CZujRdPN</a></td><td><a href="/pages/R9BCAAY0ZePEoQ0S2Oyd">/pages/R9BCAAY0ZePEoQ0S2Oyd</a></td></tr><tr><td><strong>Booking Conditions</strong></td><td><em>Min/max days, preparation, advance</em></td><td data-object-fit="contain"><a href="/files/RP6bC5CznDEnDTAZplUU">/files/RP6bC5CznDEnDTAZplUU</a></td><td><a href="/pages/j3PSoiHi0c2ZmunW3JtQ">/pages/j3PSoiHi0c2ZmunW3JtQ</a></td></tr></tbody></table>

## 5: Common Fields

These fields are shared across all rental types and documented on a dedicated reference page. Click any card to go directly to that section.

<table data-view="cards"><thead><tr><th></th><th></th><th data-hidden data-card-target data-type="content-ref"></th><th data-hidden data-card-cover data-type="image">Cover image</th></tr></thead><tbody><tr><td><strong>Availability</strong></td><td><em>Allowed dates, disabled dates, iCal</em></td><td><a href="/pages/se2SdKU1oGq12QOILLtJ">/pages/se2SdKU1oGq12QOILLtJ</a></td><td><a href="/files/sJup7bwcHJog6g4DpS6r">/files/sJup7bwcHJog6g4DpS6r</a></td></tr><tr><td><strong>Services &#x26; Resources</strong></td><td><em>Add-on pricing with /Day or /Order</em></td><td><a href="/pages/wDir5HOVkeGp8zrl58u1">/pages/wDir5HOVkeGp8zrl58u1</a></td><td data-object-fit="contain"><a href="/files/foB7SCXWfrz6YIBMxKEN">/files/foB7SCXWfrz6YIBMxKEN</a></td></tr><tr><td><strong>Deposit</strong></td><td><em>Fixed or percentage upfront payment</em></td><td><a href="/pages/unYXdPY2dLE1s9Ft0ZfC">/pages/unYXdPY2dLE1s9Ft0ZfC</a></td><td data-object-fit="contain"><a href="/files/M3Dd2NBocdXTDiMua10L">/files/M3Dd2NBocdXTDiMua10L</a></td></tr><tr><td><strong>Insurance</strong></td><td><em>Fixed fee added to every booking</em></td><td><a href="/pages/LxEaPJ5y15dPC7sHj2YB">/pages/LxEaPJ5y15dPC7sHj2YB</a></td><td data-object-fit="contain"><a href="/files/3SoE1Zpurcy3jQB8XDL0">/files/3SoE1Zpurcy3jQB8XDL0</a></td></tr><tr><td><strong>Inventory &#x26; Quantity</strong></td><td><em>Stock count, named vehicles</em></td><td><a href="/pages/RISVNcmzpxhDDvDCRwuJ">/pages/RISVNcmzpxhDDvDCRwuJ</a></td><td data-object-fit="contain"><a href="/files/SibMoPJmOEVt0RnSNZdP">/files/SibMoPJmOEVt0RnSNZdP</a></td></tr><tr><td><strong>Booking Form</strong></td><td><em>Custom checkout fields</em></td><td><a href="/pages/JVKPwpDA7CcnfWhAmlSV">/pages/JVKPwpDA7CcnfWhAmlSV</a></td><td data-object-fit="contain"><a href="/files/RIYx8VUjC3GavvqtQWo0">/files/RIYx8VUjC3GavvqtQWo0</a></td></tr><tr><td><strong>Map / Place</strong></td><td><em>Maps pin on product page</em></td><td><a href="/pages/V9Fs957iBL1hyL5oKwnD">/pages/V9Fs957iBL1hyL5oKwnD</a></td><td data-object-fit="contain"><a href="/files/TrfIY2OrNMClVGIwauDK">/files/TrfIY2OrNMClVGIwauDK</a></td></tr><tr><td><strong>Display &#x26; Layout</strong></td><td><em>Price format, template, extra tab</em></td><td><a href="/pages/kCaBW7VaB4tTWpA56rBc">/pages/kCaBW7VaB4tTWpA56rBc</a></td><td data-object-fit="contain"><a href="/files/0r8vbxkjli9ZBQqmj1xV">/files/0r8vbxkjli9ZBQqmj1xV</a></td></tr><tr><td><strong>Product Content</strong></td><td><em>Specifications, features list</em></td><td><a href="/pages/jlHZjKdIAPVSXDvqNIPw">/pages/jlHZjKdIAPVSXDvqNIPw</a></td><td data-object-fit="contain"><a href="/files/P4Z9VNYwCaf9JiUfuyyS">/files/P4Z9VNYwCaf9JiUfuyyS</a></td></tr></tbody></table>

## 6: Customize Fields in Product Editing

When you create a product and want to remove unnecessary fields, you can follow these steps in [Customize - Rental Type](/brw/customize-rental-type.md)
