Are you an LLM? Read llms.txt for a summary of the docs, or llms-full.txt for the full context.
Cancel / revoke · Boson Protocol
Skip to content

Cancel / revoke

Two ways to back out of a COMMITTED exchange:

  • Buyer cancels via cancelVoucher — buyer loses buyerCancelPenalty, gets the rest back. Seller keeps the cancel penalty.
  • Seller revokes via revokeVoucher — buyer gets full refund; seller forfeits their sellerDeposit to 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.

Next