Skip to main content

cancelPaymentCheckout

Requires a customer (portal or buyer app) session.

Abandon an online checkout the buyer backed out of: verifies the session with the PSP (a session that turns out PAID is captured normally and reported with paid: true, never cancelled), best-effort voids the hosted link, then cancels the AWAITING_PAYMENT order. Idempotent — an order already terminal returns its current state.

Errors: a failed call returns a GraphQL errors entry, not a field on the result, and data may be null or partial. Read the entry's extensions.code and message; every shape and code is in the Error reference.

Example:

mutation CancelPaymentCheckout($orderId: ID!) {
cancelPaymentCheckout(orderId: $orderId) {
cancelled
orderId
orderStatus
paid
}
}

Variables:

{
"orderId": "id"
}

Response:

{
"data": {
"cancelPaymentCheckout": {
"cancelled": true,
"orderId": "id",
"orderStatus": "string",
"paid": true
}
}
}
cancelPaymentCheckout(
orderId: ID!
): MobileCancelCheckout!

Arguments​

cancelPaymentCheckout.orderId ● ID! non-null scalar​

The ID of the order.

Type​

MobileCancelCheckout object​

Result of cancelPaymentCheckout: what happened to the abandoned checkout. paid: true means the PSP reported the session SUCCEEDED after all — the order was NOT cancelled and the client must route to the success screen.