Cancel a checkout session

POST /v2/checkouts/{id}/cancel

This endpoint terminates a checkout session that has not yet been completed. After cancellation, the session moves to Cancelled and cannot be resumed.

Request

HTTP Method: POST Endpoint:

/v2/checkouts/{id}/cancel

Headers:

Authorization: {tokenType} {access_token}
Content-Type: application/json

Path Parameters

Name
Type
Required
Description

id

string (UUID)

Yes

Identifier of the checkout session to cancel.


Response

Response Parameters

Name
Type
Description

result

object

Operation result container.

result.checkoutId

string (UUID)

Identifier of the cancelled checkout session.

result.status

string

Final status of the checkout — always Cancelled.

ok

boolean

Indicates successful request execution.

errors

array

List of validation or processing errors, if any.


Example Successful Response

{
  "result": {
    "checkoutId": "5d526a22-9354-4721-99da-fa58fb53216e",
    "status": "Cancelled"
  },
  "ok": true,
  "errors": null
}

Notes

  • Cancellation is only possible if the checkout is not already in a terminal state (e.g., Completed, Expired, Cancelled).

Last updated