Edit in GitHubLog an issue

confirmCancelOrder mutation

The confirmCancelOrder mutation allows a guest shopper to cancel an order by passing its encoded identifier and a confirmation key.

A guest can cancel an order only if the following conditions are true:

  • The guest previously placed the order.
  • The order_cancellation_enabled configuration setting is true.
  • The order has a status of RECEIVED, PENDING, or PROCESSING.

If the guest customer has been charged for the order, the order is placed in the CLOSED state, and the user will be issued a refund. Otherwise, the status of the order is set to CANCELED.

The mutation returns an error if the order cannot be cancelled.

Syntax

mutation: { confirmCancelOrder(input: ConfirmCancelOrderInput!) {CancelOrderOutput}}

Reference

The confirmCancelOrder reference provides detailed information about the types and fields defined in this mutation.

Example usage

The following example cancels order ID Nzg= and includes the confirmation key.

Request:

Copied to your clipboard
mutation {
confirmCancelOrder(
input: {
order_id: "Nzg=",
confirmation_key: "z4ge1luFSkEes7VIO2aUa832LmGWNmu8"
}
){
error
errorV2 {
code
message
}
order {
status
}
}
}

Response:

Copied to your clipboard
{
"data": {
"confirmCancelOrder": {
"error": null,
"errorV2": null,
"order": {
"status": "Canceled"
}
}
}
}
  • Privacy
  • Terms of Use
  • Do not sell or share my personal information
  • AdChoices
Copyright © 2025 Adobe. All rights reserved.