Skip to main content
POST
Cancel an unredeemed gift (buyer gets account credit)
Cancels a gift that was purchased but not yet redeemed, and settles the buyer’s money according to the state of the purchase invoice after the cancel:
  • Invoice paid — a spendable adjustment credit note for the purchase amount is issued to the buyer through the normal credit-note path, so approval governance and ledger postings apply. The note is returned as credit_note and can be tracked with Get Credit Note.
  • Invoice still open — nothing was collected, so the invoice is voided instead and invoice_voided is true. No credit is issued.
  • Invoice already void or canceled (for example, voided by hand earlier) — nothing is owed, so nothing is credited or voided: credit_note is omitted and invoice_voided is false. This is a normal 200, not an error.
The gift moves to status: "canceled" and its code can no longer be redeemed. The transition from purchased to canceled is atomic and happens exactly once: a redeemed gift cannot be canceled, and a second cancel is refused, so the buyer credit can never issue twice. Gifts purchased before invoice linking existed carry no invoice_id; cancelling one changes the status but neither credits nor voids anything.

Parameters

No request body.

Example Request

Response

A paid gift returns the canceled gift and the buyer’s credit note. For an open (unpaid) gift credit_note is omitted and invoice_voided is true. When the purchase invoice was already void or canceled, or the gift has no invoice_id, both are absent/false and only gift carries information.

Fields

Errors

Errors use the standard envelope — see Errors.

Authorizations

Authorization
string
header
required

Tenant API key obtained from POST /auth/register or POST /v1/developer/keys.

Path Parameters

id
string<uuid>
required

Response

The canceled gift and what happened to the buyer's money.

data
object