Skip to content

Cancel a redemption placed through /checkout-redemptions

POST
/checkout-redemptions/{ref}/cancel

Releases the redemption ref placed for the named customer, then asks Shopify to remove it from the checkout metafield. The removal is best-effort: if Shopify is unreachable or the workspace’s Shopify connection needs re-authorising, the redemption is still released, the entry stays on the metafield until the next sync can write, and a checkout that completes with the discount in that window is recorded as an anomaly and the points are clawed back from the member. A secret key can cancel any codeless redemption of its workspace for the customer it names, including one the Online Store placed. A redemption that is already resolved answers released: false. A ref that is another customer’s, was placed through POST /v1/redemptions (use /redemptions/{id}/release) or is unknown is 404 not_found.

ref
required
string format: uuid
object
customer_external_id
required

The Shopify customer’s numeric id the redemption was placed for.

string
/^[1-9][0-9]{0,19}$/
Example
7894561230

Cancelled, or already resolved.

object
released
required

False when the redemption was already resolved (released, finalized or expired).

boolean

Ref is not a valid UUID, or customer_external_id is malformed.

object
error
required
object
code
required
string
Example
not_found
message
required
string
details
request_id
required
string
Example
req_9f8e7d6c5b4a3210

Missing or invalid API key or OAuth credential.

object
error
required
object
code
required
string
Example
not_found
message
required
string
details
request_id
required
string
Example
req_9f8e7d6c5b4a3210

The credential lacks the loyalty:write scope — a publishable key (publishable_key_forbidden), or an OAuth token, which is always read-only in v1 (insufficient_scope).

object
error
required
object
code
required
string
Example
not_found
message
required
string
details
request_id
required
string
Example
req_9f8e7d6c5b4a3210

No such customer in this tenant (customer_not_found), or no such checkout redemption for that customer (not_found).

object
error
required
object
code
required
string
Example
not_found
message
required
string
details
request_id
required
string
Example
req_9f8e7d6c5b4a3210