Skip to content

Checkout

The Checkout menu turns a prepared cart into a placed order. It runs as a sequence: set the addresses, choose a shipping method, choose a payment method, then place the order.

The checkout sequence

Checkout is order-sensitive — each step unlocks the next:

  1. Set the shipping and billing addresses (or read back the saved ones). Addresses are required before shipping rates can be calculated.
  2. Get shipping methods for the cart, then set the chosen one.
  3. Get payment methods, then set the chosen one.
  4. Place the order to finalise the cart into an order.

Calling a step out of order (e.g. asking for shipping methods before addresses are saved) is rejected — complete the earlier step first.

Operations in this menu

OperationMethod & PathDescription
Get AddressesGET /api/shop/checkout-addressesRead the addresses saved on the cart.
Set Shipping AddressPOST /api/shop/checkout-addressesSave the shipping address.
Set Billing AddressPOST /api/shop/checkout-addressesSave the billing address.
Get Shipping MethodsGET /api/shop/checkout-shipping-methodsList available shipping rates.
Set Shipping MethodPOST /api/shop/checkout-shipping-methodsSelect a shipping method.
Get Payment MethodsGET /api/shop/checkout-payment-methodsList available payment methods.
Set Payment MethodPOST /api/shop/checkout-payment-methodsSelect a payment method.
Place OrderPOST /api/shop/checkout-ordersFinalise the cart into an order.

All Checkout endpoints require the storefront key and the active cart's token — see Authentication.

Released under the MIT License.