Cancel / revoke
Two ways to back out of a COMMITTED exchange:
- Buyer cancels via
cancelVoucher— buyer losesbuyerCancelPenalty, gets the rest back. Seller keeps the cancel penalty. - Seller revokes via
revokeVoucher— buyer gets full refund; seller forfeits theirsellerDepositto the buyer.
Either ends the exchange.
SDK — buyer cancels
await (await sdk.cancelVoucher(exchangeId)).wait()When to use
- Buyer cancel: you changed your mind before redeeming. Accept the penalty.
- Seller revoke: you can't fulfill (out of stock, wrong info, fraud suspicion). Honor the buyer.
- Neither: don't cancel during an active dispute — the dispute machine takes over.
Common gotchas
- Cancel only works in
COMMITTED. After redemption, use the dispute path. - Revoke is a real cost to the seller. Use sparingly. Track revoke rate as a quality signal in your internal ops.