Cancel Checkout Page Session

In principle, a checkout page will have an expiry time (default 24 hour), which can also be customized following this guide Expire a Snap Checkout Session.

In a scenario where you want to cancel a checkout page before the expiry time, you can use this endpoint.


Endpoints: /api/v1/checkout/transactions/{{token}}/cancel

HTTP Method: POST

Response Body

{
  "canceled_at": "2025-06-03T13:09:39.776Z"
}
{
  "error_messages": [
    "token already canceled"
  ]
}
{
  "error_messages": [
    "Transaction is in progress"
  ]
}
{
  "error_messages": [
    "token not found"
  ]
}
JSON AttributeDescriptionType
canceled_atTimestamp when the page has been canceledString

If the user remains on the checkout page after the session has been cancelled and attempts to continue the transaction, they will see an error indicating that they are not able to proceed with the transaction.