ShopItUp Developers v1

Checkout

Cancel a checkout

Live

POST 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:write How to get a token
Returns
The checkout, now cancelled (or as it already stood, if it had expired)

Path parameters

  • checkout_id string Required

Response

200 The checkout, now cancelled (or as it already stood, if it had expired)

  • checkout_id string
  • status string

    awaiting_payment until the person pays; paid (with order_number); cancelled if the order was; expired once the link lapsed unpaid

    One of awaiting_payment paid cancelled expired
  • checkout_url string uri

    Give this to the person — it opens the store's checkout with the order filled in, where they accept the terms and pay

  • expires_at string date-time
  • order_number string Can be null

    Set once paid

  • totals Totals

    subtotal − discount + shipping + tax = grand_total

    5 child attributes
    • subtotal Money
      2 child attributes
      • amount string Required

        Decimal string, two places

      • currency string Required
        One of CAD
    • discount Money
      2 child attributes
      • amount string Required

        Decimal string, two places

      • currency string Required
        One of CAD
    • shipping Money
      2 child attributes
      • amount string Required

        Decimal string, two places

      • currency string Required
        One of CAD
    • tax Money
      2 child attributes
      • amount string Required

        Decimal string, two places

      • currency string Required
        One of CAD
    • grand_total Money
      2 child attributes
      • amount string Required

        Decimal string, two places

      • currency string Required
        One of CAD

Status codes

200

The checkout, now cancelled (or as it already stood, if it had expired)

401

Missing, invalid or expired access token

404

Not found, or not listed on this marketplace

409

Too late to cancel — already_paid or payment_in_progress

429

Too many requests; retry after the number of seconds in Retry-After

503

A service the API depends on is briefly unavailable; retry after the number of seconds in Retry-After

Errors share one shape — see Errors and rate limits.