Purchase
What it does: Confirms and pays for a previously quote.
When to call it: After the customer accepts the product offer and provides payment details. A Quote must exist first. Pass its Reference as AgentReference.
POST /insurances/purchaseOptional variant (use when AgentReference uses your own reference format):
POST /insurances/purchase/<reference>Payment options
Use exactly one payment method per request:
Card payment (default)
Pass CardHolder, CardNumber, CardExpiry, and CardSecurityCode.
XPay tokenisation
Pass XPayCustomerToken instead of card fields.
Partner collecting payment
Set PartnerCollectingPayment to true. No card fields required.
Auto-rebill
Set AutoRebill to true for returning customers whose card is on file. No card fields required.
Example request
curl -i -X POST \
-H "X_API_KEY: your_api_key" \
-H "Content-Type: application/json" \
-d '{
"AgentReference": "AB12-345C-INS",
"PolicyCode": "RC001",
"FromDate": "2025-08-01 00:00:00",
"ToDate": "2025-08-08 00:00:00",
"CustomerAge": 32,
"DestinationCountry": "IE",
"Country": "US",
"FirstName": "Jane",
"LastName": "Smith",
"Email": "[email protected]",
"Address1": "123 Main St",
"City": "New York",
"PostalCode": "10001",
"CardHolder": "JANE SMITH",
"CardNumber": "4242424242424242",
"CardExpiry": "0828",
"CardSecurityCode": "123"
}' \
https://api-staging.rentalcover.com/insurances/purchaseRequest parameters
Booking identifiers
Required. Unique to Purchase.
AgentReference
string
The Reference from the Quote response. Identifies which booking to purchase.
PolicyCode
string
The Policy.Code from the Quote response. Identifies the protection product to confirm.
Payment
Required. Use one method only.
CardHolder
string
Cardholder name. Required for card payment.
CardNumber
string
Credit card number (digits only). Required for card payment.
CardExpiry
string(4)
Card expiry in mmyy format. Example: 0826. Required for card payment.
CardSecurityCode
string
Card CVV/CVC. Required for card payment.
XPayCustomerToken
string
XPay token from the XPay tokenisation workflow. Use instead of card fields.
AutoRebill
boolean
true to charge a returning customer's card on file. No card fields required.
PartnerCollectingPayment
boolean
true when your platform collects payment. No card fields required.
Customer & booking fields
Definitions shared with Group A and Group B. Required fields must be re-passed even if provided at Quote time.
FromDate
Required
ToDate
Required
DestinationCountry
Required
FirstName
Required
LastName
Required
Country
Required
Address1
Required
If unknown, use a placeholder such as c/- Your Company Name.
City
Required
If unknown, use a placeholder.
PostalCode
Required
If unknown, use a placeholder.
Address2
Optional
Region
Optional
Phone
Optional
Mobile preferred. Format: +61413333333.
OtherEmail
Optional
LanguageCode
Optional
Default: en.
CoverAmount
Optional
PolicyPrice
Optional
PartnerReference
Optional
Your internal booking reference for customer service.
Discount
Optional
Discount to apply, if available.
PartnerCardFees
Optional
Partner credit card fee.
Response
Returns a Booking Response with the following differences.
Fields that change after purchase
SupplierReference
string
Insurer's policy number, issued upon confirmation.
TotalAmountOutstanding
float
Amount still outstanding. Usually equals TotalAmount; may differ after a modification.
TotalAmountOutstandingFormatted
string
Formatted outstanding amount.
TotalAmountRefunded
float
Amount refunded after a modification that reduced the price.
TotalAmountRefundedFormatted
string
Formatted refunded amount.
Nested object differences
Policy
Policy object
Additionally, includes RoadsideAssistanceBlob - roadside assistance instructions for CRM systems and email templates. See Policy object.
Last updated
Was this helpful?

