Partner
Parking Drive-In solution
The Drive-In solution recognizes TRAVIS customers based on license plate and tracks its arrival and departure via a parking session. It will automatically detect an applicable booking made by the customer and use that for payment. If no booking is present, it will create a separate transaction for the parking session. Both scenarios are handled in a unified way by the solution.
Requirements
The Drive-In solution works by identifying TRAVIS Customers based on truck license plates. A successful identification can happen when either:
- the Customer has made a Booking at your Location
- the Customer has configured its truck to be used for TRAVIS Pay Drive-In
Note that when the truck is both booked at your Location and configured for TRAVIS Pay Drive-In, the solution will follow the booked scenario (see details below).
For these scenarios TRAVIS can guarantee that a payment can be made. For other scenarios our Drive-In solution cannot be used. However, we do provide a separate Create Transaction API endpoint where singular transactions can be created, see section below.
Flow
The Drive-In solution consists of two endpoints that work together: Check-in when a truck enters the Location, and Check-out when it leaves.
When using the Drive-In solution to start a Parking session, we expect to also receive the Check-out request in order to settle the payment for the session via TRAVIS. As TRAVIS will assume the truck is at your Location until the session is ended.
At arrival: Check-in
- The truck arrives at the Location and the Partner reads its license plate.
- The Partner calls the Check-in endpoint with the license plate and the time of arrival.
- TRAVIS validates the LicensePlate via Booking or TRAVIS Pay Drive-In configuration. When valid, TRAVIS starts a parking session and returns it, including the Booking if there is one. At this point TRAVIS assumes the truck is parked on your Location from given arrival onwards.
- If the license plate fails validation, the endpoint returns a 422. At this point, the Drive-In solution cannot help in processing payment. However, we do also provide a separate endpoint for creating transaction that could be of use (see Separate Create Transaction API).
At departure: Check-out
-
When the truck leaves, the Partner calls the Check-out endpoint with the license plate and the times of arrival and departure.
TRAVIS finds the open parking session for that license plate.
TRAVIS then settles the session:
- With a Booking, TRAVIS compares the stay with the booked period and creates an Overstay request when needed.
- Without a Booking, TRAVIS creates a Transaction for the stay.
- TRAVIS will be able to settle the payment for the entire ParkingSession when we respond with a 201 status code.
- The 201 response contains the resulting Transaction(s), including any that are still pending.
Booked vs non-booked in detail
TRAVIS supports making Bookings at parking locations, although a Partner has control whether to allow this or only accept on-the-spot transactions. Our Drive-In solution handles Bookings and the associated Overstay process automatically, allowing for a single integration. Here we describe the 2 scenarios in detail.
Booked scenario
In this scenario the Check-in endpoint will identify an active or upcoming Booking for the given license plate on your Location and create a parking session linked to this Booking and license plate.
On the booked arrival TRAVIS makes the transaction for the booked period behind the scenes. Upon departure, the Partner uses the Check-out endpoint with the license plate and arrival + departure details. We will find the Booking and compare the actual arrival and departure times you provided with the booked period. If those exceed the booked period (with a grace margin), we will automatically create an Overstay request. That request will be reviewed and if it leads to a higher price compared to the booked transaction, we will create that transaction as well. In the response of the Check-out endpoint you can find both transactions. As the Overstay review process is handled async, the details are visible under pending transactions.
If creating the Overstay request fails, you will still receive a 201 response. In those cases the response contains pending totals and transactions. The Partner can let the Driver leave the Location as usual, no further action is needed. As the ParkingSession was started successfully, TRAVIS guarantees the payment and our Customer Service will settle it with the Customer.
Non Booked scenario
In this scenario the Check-in endpoint responds without a Booking, which means TRAVIS found the Customer and can guarantee to settle a payment upon departure. A parking session is started and TRAVIS assumes the truck is parked on your Location from given arrival onwards. No Transaction is created yet.
Upon departure, the Partner uses the Check-out endpoint with the license plate and arrival + departure details. TRAVIS will create the Transaction with the given details and provide the Transaction details back in the response.
If creating the Transaction fails, for example because the Customer’s fuel card is blocked or its limit has been reached, you will still receive a 201 response. In those cases the response contains pending totals and transactions. The Partner can let the Driver leave the Location as usual, no further action is needed. As the ParkingSession was started successfully, TRAVIS guarantees the payment and our Customer Service will settle it with the Customer.
Pricing
In the Check-out endpoint input, the price is required when the location has no Travis pricing. Without it the request fails with a 422 error. When the location has Travis pricing, the price input is optional and will be calculated based on the arrival and departure times.
In the non booked scenario, when the price is inputted, it will be used to create the Transaction. In the booked scenario, the price will be used to compare with the Booking. If greater, the difference will be used as price for the Overstay Transaction.
Separate Create Transaction API
TRAVIS API suite for Partners also includes a Transaction API endpoint, where it is possible to create Transactions. When the Drive-In solution is unable to start a ParkingSession based on a Booking or TRAVIS Pay Drive-In, this endpoint provides a means to settle a payment via Fuel card or TRAVIS Pay code. It does not work for Parking Bookings and thus no Overstay process is triggered, but it can be used to create a single Transaction when the final price for the stay is known.
Notes
Some notes to take into account:
- The Check-out endpoint is idempotent, meaning if you already ended the parking session and try to end it again we will replay the earlier result.
- The possible errors of both the create Transaction and the Check-out endpoints are listed on the Error codes page.