Skip to main content

Get Checkout

Retrieves a checkout with its cart and up-to-date totals.

A checkout is created when a shopper moves from the cart to checkout on the storefront. It holds the cart, the shopper (customer, company or guest email) and the choices made during checkout: addresses, shipping method and cost, payment method or payment term, tax, extra charges, store credit and notes. When the order is placed, the checkout gets the order number.

HTTP Request​

  • URL: /checkout/{id}
  • Method: GET
  • Headers:
    • accessToken: Required. Your API access token.
  • Required scope: READ_ORDER or READ_WRITE_ORDER

Path Parameters​

ParameterTypeDescription
idStringRequired. The ID of the checkout.

cURL Example​

curl --location '<BASE_URL>/checkout/6650f1a2d5775459152d7300' \
--header 'accessToken: <ACCESS_TOKEN>'

Response​

  • 200 OK: The checkout was returned successfully.
  • 400 Bad Request: The access token is missing or invalid, or no checkout exists with this ID.

Sample JSON Response​

{
"success": true,
"data": {
"id": "6650f1a2d5775459152d7300",
"cart": {
"id": "6650f190d5775459152d72f0",
"customer": "664dec6cd5775459152d4926",
"company": "664dec6cd5775459152d4922",
"lineItems": [
{
"id": "6650f190d5775459152d72f1",
"productId": "663a0cbe516313e5bc94ab30",
"quantity": 12,
"price": 45,
"extendedPrice": 540,
"discountAmount": 0,
"isFreeGift": false
}
],
"baseAmount": 540,
"totalAmount": 540,
"lineDiscountAmount": 0,
"discountAmount": 0
},
"guestCheckout": false,
"company": "664dec6cd5775459152d4922",
"customer": "664dec6cd5775459152d4926",
"shippingAddress": {
"id": "6650f1a2d5775459152d7301",
"shippingAddressId": "664dec6cd5775459152d4924",
"firstName": "Maria",
"lastName": "Lopez",
"address1": "4100 Industrial Blvd",
"city": "Austin",
"state": { "name": "Texas", "code": "TX" },
"country": { "name": "United States", "code": "US" },
"zipcode": "78744"
},
"billingAddress": null,
"shippingMethod": "663a0afe4587085935a4fa0d",
"paymentMethod": "663a0afe4587085935a4fa11",
"paymentType": "online",
"paymentTerm": null,
"taxType": "percentage",
"tax": 44.55,
"shippingCost": 12,
"shippingDiscountAmount": 0,
"additionalCosts": [{ "name": "Handling fee", "amount": 5 }],
"storeCredit": null,
"customerNotes": "Deliver to dock 3.",
"metaFields": [],
"subTotal": 540,
"lineDiscountAmount": 0,
"discountAmount": 0,
"total": 601.55,
"amountToPay": 601.55,
"selectedCurrencyAmount": null,
"createdAt": "2024-05-24T08:12:18.120Z",
"updatedAt": "2024-05-24T08:15:02.441Z"
}
}

Response Details​

Checkout Data​

FieldTypeDescription
idStringUnique identifier of the checkout.
cartObjectThe cart being checked out. See Cart Object.
guestCheckoutBooleanWhether the shopper is checking out as a guest.
guestObjectGuest email, for guest checkouts.
customerStringID of the customer.
companyStringID of the customer's company, for B2B shoppers.
orderNumberStringOrder number, once the order has been placed.
shippingAddressObjectSelected shipping address.
billingAddressObjectSelected billing address.
shippingMethodStringID of the selected shipping method.
paymentMethodStringID of the selected payment method.
paymentTypeStringType of the selected payment method, for example online or offline.
paymentTermObjectSelected payment term, with paymentDueDays, dueType, depositRequired and depositPercentage.
taxTypeStringamount for a fixed tax amount, or percentage for a tax rate.
taxNumberTax amount for this checkout.
shippingCostNumberShipping charge.
shippingDiscountAmountNumberDiscount on shipping.
additionalCostsArrayExtra charges, each with name and amount.
storeCreditObjectStore credit used (applied, amount, label).
customerNotesStringNotes entered by the shopper.
metaFieldsArrayCustom field values.
subTotalNumberCart subtotal before discounts.
lineDiscountAmountNumberTotal line-level discount.
discountAmountNumberTotal order-level discount.
totalNumberCart total plus tax, shipping and extra charges, minus shipping discount.
amountToPayNumberAmount due now, after store credit and any required deposit.
selectedCurrencyAmountObjectAmounts in the shopper's selected currency, if different from the store currency.
createdAtStringDate and time the checkout was created (ISO 8601).
updatedAtStringDate and time the checkout was last updated (ISO 8601).

Cart Object​

FieldTypeDescription
idStringCart ID.
customerStringID of the customer.
companyStringID of the company.
lineItemsArrayItems in the cart, with productId, variantId, quantity, price, extendedPrice and discountAmount.
baseAmountNumberCart subtotal before discounts.
totalAmountNumberCart total after discounts.
lineDiscountAmountNumberTotal line-level discount.
discountAmountNumberTotal order-level discount.

Notes​

  • Totals are calculated with the latest product prices and promotions each time you get the checkout.
  • To set tax or extra charges on a checkout, use Update Checkout.