Integrating with Stripe on your website

Integrating with Stripe on your website

Purpose

This article will outline what is needed to replace your existing Vault integration with a Stripe integration. You will have the choice of either taking a payment at the time of booking or saving card details to be charged in the future (like your existing Vault implementation).

Website Changes

You will no longer need to make any calls to the “getvaulturl” RCM API method or embed the returned URL in an iframe. 
We recommend using Stripe’s “Custom payment flow” which will let you embed a card entry form in your website and give you the most control over payments/collecting card details.

See below for Stripe’s “Custom payment flow” documentation:
https://stripe.com/docs/payments/save-during-payment?platform=web#web-setup
If you need to save the card details to be charged in the future, please ensure you have set the “setup_future_usage” parameter when creating your payment intent.

To save a customer’s card details without charging them at the time of booking see below:
https://stripe.com/docs/payments/save-and-reuse

RCM API Calls

You will need to pass the results from Stripe to RCM to record any payments and add any collected card details for use in RCM.
Please note that some data (e.g. card details) may not be returned by Stripe's client side library and you will need to make additional Stripe API calls to get this information.

Payment

To save a Stripe payment call the “confirmpayment” RCM API method and pass in the following Stripe details:

Parameter
Value
reservationref
Booking reference code returned from method booking.
amount
Payment amount.
success
Indicate if payment was successful.
paytype
Payment type, like Visa or Mastercard.
paydate
Payment date.
supplierid
Please email support@rentalcarmanager.com to confirm what your supplierid is.
transactid
The Stripe customer ID (e.g., “cus_Lf4I7wU2EHOb6T”).
dpstxnref
The Stripe payment intent ID (e.g., “pi_3KaZ76L5a7hxLgJE0BauiXdJ”).
cardholder
The cardholder’s name, you may need to collect this manually as Stripe’s payment elements don’t collect the cardholder’s name.
paysource
Optional Payment Source eq. 'Payment from Web API3.x'.
cardnumber
The last 4 digits of the card as returned by Stripe.
cardexpiry
The card expiry returned by Stripe in the format of “MM/YY”.
transtype
The transaction type, in this case “Payment”.
merchfeeid
Optional Merchant Fee ID corresponding to a Merchant Fee ID setup within the system.
payscenario
Payment scenario when calling this method, possible values are: 1= at time of original booking (default), 2=convertquote, 3=prehire e.g. editbooking.
emailoption
Email option, 0=never send email, 1=default behaviour, 2=always send email.

Example request body:
{
    "method": "confirmpayment",
    "reservationref": "43F355C1223",
    "amount": 500,
    "success": true,
    "paytype": "Credit Card",
    "paydate": "01/01/2022",
    "supplierid": 5,
    "transactid": "cus_LcPyl54OnW0Csi",
    "dpstxnref": "pi_3KvB8PPwJpgLULcu1zPQKhpp",
    "cardnumber": "9969",
    "cardexpiry": "01/25",
    "cardholder": "John Doe",
    "transtype": "Payment"
}

Payment Method Only (No Payment)

If you are only collecting the customer’s payment details for future usage, call the “rebillingtoken” method with the following parameters:

Parameter
Value
reservationref
Booking reference code returned from method booking
paytype
Payment type, like visa or mastercard
supplierid
Please email support@rentalcarmanager.com to confirm what your supplierid is.
paysource
Optional Payment Source eq. 'Payment from Web API3.x'
rebillingtoken
The Stripe customer ID (e.g., “cus_Lf4I7wU2EHOb6T”).
cardnumber
The last 4 digits of the card as returned by Stripe.
cardexpiry
The card expiry returned by Stripe in the format of “MM/YY”.
cardholder
The cardholder’s name, you may need to collect this manually as Stripe’s payment elements don’t collect the cardholder’s name.

Example request body:
{
    "method": "rebillingtoken",
    "reservationref": "43F355C1223",    
    "paytype": "Credit Card",    
    "supplierid": 5,
    "paysource": "Website",
    "rebillingtoken": "cus_LcPyl54OnW0Csi",    
    "cardnumber": "9969",
    "cardexpiry": "01/25",
    "cardholder": "John Doe"    
}

    Important Articles


      • Related Articles

      • Getting Started with API V3.2

        Overview Rental Car Manager (RCM) provides a Web API through which you are able to use to build a set of booking steps which you can plug into your website. This API also allows for Agents to have access and search for availability of vehicles and to ...
      • Package Deals Process

        Overview Rental Car Manager (RCM) allows for the setup of Packages which can be used as the basis to create a new booking. You are able to use the Web API to obtain information about available packages and also make a booking based on a package deal. ...
      • Relocation Specials Process

        Overview The Relocation Specials function allows Rental Car Companies to setup relocation special deals within Rental Car Manager (RCM) and have them available for booking on their websites.  The Web API can be used to both obtain a listing of ...
      • API V3.2 Booking Process

        Overview The RCM API and Agent API allow you to make unallocated bookings for a specified vehicle category, for a specified pickup and drop off date. An unallocated booking is a booking that has been made for a particular category (e.g. small car), ...
      • Applying a Pay Now Discount

        Overview Some Rental Car Companies may want to offer a discount to people who choose to pay the full amount of the booking at the time of making the booking. We offer the following suggestion as a way to implement a Pay Now discount on web Booking ...