Contents

Delivery and collection - Plugixa Car Rental

Delivery and collection PRO let a customer give an address instead of coming to the desk. You drive the car to them at the start of the rental and, if you offer it, fetch it from them at the end. Each trip is priced by the driving distance between the desk and the address, which the plugin asks Google’s Routes API for.

Set it up under Plugixa Car Rental -> Settings -> Delivery and collection. It is an app, on by default in Pro, but the booking form offers nothing until you add a Google key and choose at least one location. If the section is missing, switch on Delivery and collection in the App manager.

External service. To measure a distance, the customer’s address and the desk’s location (its coordinates, or its address when no coordinates are set) are sent to Google’s Routes API from your server, using your own Google API key. Nothing is sent until a key is saved and a customer types an address. Each answer is cached for 30 days, so the same address is not asked again. Google’s terms (cloud.google.com/maps-platform/terms) and privacy policy (policies.google.com/privacy) apply. Mention this in your privacy policy; the settings screen reminds you: “The customer’s address and the desk’s location are sent to Google to measure the distance. Mention it in your privacy policy.”

The Delivery and collection settings with collection on, distances in km, no fee per trip, 1 EUR per km, a 30 km limit, the Google Maps API key field and the privacy notice

Setting it up

1. Get a Google key

  1. In the Google Cloud console, create a project (or use one) with billing enabled.
  2. Enable the Routes API for it. (The older Distance Matrix API is not used.)
  3. Create an API key and restrict it to the Routes API. The key is only used from your server, never in the visitor’s browser, so do not restrict it by website.

2. Choose the locations and the prices

The card reads: “Customers can give an address instead of coming to the desk. The fee is worked out from the driving distance between the desk and that address, each way it is asked for.”

Field Default Notes
Locations that deliver and collect None The desks that offer the service. Only rentals picked up (for delivery) or returned (for collection) at these locations get the address fields.
Also offer collection at the end of the rental On Off: customers can have the car delivered but bring it back to the desk. The collection field is hidden, and a collection address sent anyway is ignored: it is not priced, charged or kept.
Distance in km km or mi. Applies to every distance and fee below.
Fee per trip 0 Charged for every trip, however short.
Fee per km (or per mi) 1 Charged for each km beyond the free distance.
Free distance (km) 0 “Not charged per distance up to here; the fee per trip still applies.”
Furthest address (km) 30 “Addresses further than this from the desk are refused. 0 for no limit.”

These are saved with the page’s Save button. Under them, a line works out an example from what you typed: “An address 12 km away costs €12.00 per trip.”

For the most accurate distances, set the latitude and longitude on each delivering location. Without them, the location’s address, city and country are sent for Google to find.

3. Save the key

Paste the key into Google Maps API key and press Save keys. It is encrypted before it is stored and never shown again.

Until a key is saved and a location chosen, the card warns: “The booking form does not offer delivery yet: add the Google key and choose at least one location.”

4. Check an address

The Check an address card prices one address “the way a customer’s booking would, with the saved settings”. Choose the desk under From, type an Address, and press Check an address. The answer reads, for example, “12.4 km away: €12.40 per trip.”, or explains why the address is refused. This makes a real request to Google, and uses your saved settings, so save first.

How a trip is priced

fee = Fee per trip + (distance - Free distance, never below 0) x Fee per km

  • The distance is the driving distance by road, rounded to one decimal.
  • Delivery is measured from the pickup location, collection from the return location. A one-way rental with both is two separate trips.
  • Each trip is a separate line on the bill, and both directions are charged when both are asked for.

Example with a €10.00 fee per trip, €0.80 per km and 5 km free, for an address 18.0 km from the desk:

Part Amount
Fee per trip €10.00
(18.0 - 5) km x €0.80 €10.40
Delivery €20.40

If the customer also asks for collection from the same address, a second line of €20.40 is added.

An address beyond Furthest address is refused with “That address is 42.0 km from Airport Terminal 2. We deliver and collect up to 30.0 km away.”

The trip fee is added before discounts, like an extra: a coupon percentage applies to it, and tax PRO is charged on it. Pricing rules PRO do not change it.

A trip that works out at 0 (no fee per trip and the address inside the free distance) still adds its line to the booking, at €0.00, so the address is kept and your team knows where to take the car. You can deliver free nearby without setting a token fee.

What the customer sees

When the chosen pickup location delivers, the first step of the booking form shows:

Field Hint
Deliver the car to (optional) “Your address, with the town or postcode. Leave empty to pick the car up at the desk.”
Collect the car from (optional) “Where we should fetch the car at the end. Leave empty to return it to the desk.” Shown when collection is on and the return location collects.

The customer still chooses a location: it is the branch the car leaves from and goes back to, and its opening hours and fleet apply.

The price summary then has a line such as “Delivery to Rua Augusta 100, Lisboa (3.2 km)” or “Collection from …”, with the fee.

If an address cannot be served, the search answers with one message under the address field instead of a list of refused cars:

Message Why
“That address is x km from … We deliver and collect up to y km away.” Beyond the furthest address.
“We could not find that address. Check it, including the town or postcode.” Google found no road to it.
“… does not deliver or collect cars. Leave the address empty to use the desk.” The location is not in your delivering list.
“Delivery cannot be priced right now. Please choose a desk, or contact us.” Google could not be reached, or refused the key. Check the key and that the Routes API is enabled.

A failed lookup is not cached, so a customer who corrects a typo is looked up again at once.

At the desk and afterwards

The admin’s New booking form has the same two address fields when delivery is set up. The address and distance are kept on the booking’s delivery and collection lines, so if the booking is priced again later (for example when a coupon is applied) the same address is used.

The plugin does not plan routes or assign drivers. The address is on the booking for your team to act on.

Costs at Google

Google bills Routes API requests to your Cloud project. The plugin asks only for the distance and duration of one route per request, which is the cheapest kind, and caches every answer for 30 days per desk and address. A customer searching prices every car at once, but the address is looked up once.

Quick Links