Update Checkout
The Update Checkout endpoint allows you to manage the typical stages of an e-commerce checkout system.
Authorizations
Order token to authorize Cart and Checkout requests.
Query Parameters
Specify the related resources you would like to receive in the response body. More Information.
Body
Add Customer Details
Adding customer details is achieved by passing the customer-related attributes shown in the corresponding request body example.
Add Shipping Rates
To add shipping rates, you will need a shipment associated with the checkout. If you do not have any shipments follow the steps below:
- First, ensure your cart has items added via the Add an Item to Cart endpoint.
- Next, ensure the checkout has a shipping address set, you can set this by running the Add Customer Details example above.
- Next run the Advance Checkout endpoint, this will create shipments for the items in the cart and users shipping destination.
Use the List Shipping Rates endpoint to find the shipments and shipping rates available for this checkout. Note the shipment id
and shipping_rate id
; use these values to populate your request body.
Add a Payment
To add a payment method, you must find the available payment methods by running the List Payment Methods endpoint, each payment method has its own set of source attribute requirements. In the example shown, we have used the source attributes for a card payment.
Pass the payment_method_id
and source_attribute
hash containing the required attributes for the selected payment method.
The body is of type object
.
Response
200 Success - Returns the cart
object.
The response is of type object
.