Please make sure you read the Conventions before continuing with this guide.
Requirements.
You will need an X-API-KEY and a JWT token.
Paying for an order
You will interact with the /sales/order endpoint of the Sales Bucket
to pay for an existing cart.
You will need to replace the placeholders for the payload with information returned by other APIs, see the making a reservation purchase flow for information.
The payment array that can be populated with a variety of objects. In this case the payment is done with a credit card. See payments payload details for additional options.
The customerInfo is information for the person paying for the trip.
For the customer information the following is required and will be validated against the information returned by the /inventory/countries
endpoint.
The countryId
should be the country.ISO
, the country
should be the country.name
and the province should be either one of the name
properties of a province under country.provinces
if they exist for the selected country or a non empty string in the cases where country.provinces
is empty.
It should never be empty or null.
The payments array can contain multiple payments of different types, they each require different fields to complete the payment, see Payment Payload Details for more details. The sum of the amount for all payments should be equal to the cart total.