Checkout
Cancel a checkout
Live
https://shopitup.ca/api/v1/checkout/sessions/{checkout_id}/cancel
When the person no longer wants it: the checkout link stops working and its cart is emptied, so nothing can be
paid by mistake. Nothing was reserved, so the items stay for sale. Refused once the order is paid
(already_paid — a refund goes through the store) or while the person is on the payment page
(payment_in_progress — if they leave without paying, nothing is charged). Cancelling a cancelled or expired
checkout just reports it, so a retry is harmless.
- Access
-
checkout:writeHow to get a token - Returns
- The checkout, now cancelled (or as it already stood, if it had expired)
Path parameters
-
checkout_idstring Required
Response
200 The checkout, now cancelled (or as it already stood, if it had expired)
-
checkout_idstring -
statusstringawaiting_payment until the person pays; paid (with
order_number); cancelled if the order was; expired once the link lapsed unpaid -
checkout_urlstring uriGive this to the person — it opens the store's checkout with the order filled in, where they accept the terms and pay
-
expires_atstring date-time -
order_numberstring Can be nullSet once paid
-
totalsTotalssubtotal − discount + shipping + tax = grand_total
5 child attributes
-
subtotalMoney2 child attributes
-
amountstring RequiredDecimal string, two places
-
currencystring Required
-
-
discountMoney2 child attributes
-
amountstring RequiredDecimal string, two places
-
currencystring Required
-
-
shippingMoney2 child attributes
-
amountstring RequiredDecimal string, two places
-
currencystring Required
-
-
taxMoney2 child attributes
-
amountstring RequiredDecimal string, two places
-
currencystring Required
-
-
grand_totalMoney2 child attributes
-
amountstring RequiredDecimal string, two places
-
currencystring Required
-
-
Status codes
The checkout, now cancelled (or as it already stood, if it had expired)
Missing, invalid or expired access token
Not found, or not listed on this marketplace
Too late to cancel — already_paid or payment_in_progress
Too many requests; retry after the number of seconds in Retry-After
A service the API depends on is briefly unavailable; retry after the number of seconds in Retry-After