If you are processing a payment at the time of booking, then you can save the payment information against the booking by calling the confirmpayment method. This is the same method used in the normal booking API, however you will need to pass in the relocationspecialid.
Follow these instructions if you would like to use the secure Auric credit card vault in your API implementation. This way will give you, as the developer, the most control over the vault process, but
requires some javascript on your client to listen and react to the event that is triggered by the vault iframe.
Step 1
After the booking has been saved and you have the rcmReservationRef, a call to the method “getvaulturl”
The API will return a variable url containing the base64-encoded url of the vault that the user needs to be redirected to.
Step 2
On the client-side, create an iframe and set the source to the url returned from the API call.
Step 3
Once the user has finished entering card details, the page will receive a message (event) from the iframe. Javascript on the client page needs to check for this message and if the card details were saved successfully then call the “vaultentry” method of the API.
Example:
*NOTE* After the vault triggers the “ADD” event, the credit card vault token has not yet been linked to the booking/customer in RCM. You now need to call our API method “vaultentry” to record the data returned from the vault.
Sample data returned from vault = 8K7Qlw4mwA0Wj0B1122,Visa,R M Test,08/18,123,ADD
You need to use this data to call the “vaultentry” method on our API.
Note that if you are using this method, there is no need to call our separate API method to send an email to the customer. The email will be sent upon calling “vaultentry”, if the conditions have been met for sending emails. The confirmation email gets sent in the following circumstances:
- the payment/card collection has been successful (through the confirmpayment method or the vaultentry method), or
- the Rental Car Company has been setup not to save cards.
Setting the sendemail parameter value to 2 in the booking method will force the email to be sent after a successful booking.
There is a system parameter in Rental Car Manager that can be used to turn off email confirmations if you want to handle this yourself. Contact RCM support (support@rentalcarmanager.com) if you would like to use this feature.