Skip to content
Open app

Withdraw

Pay a public address from your notes, with a proof that the money came from a set you chose. Venues get only the sets they accept.

A withdrawal pays an address outside Plaza. The amount, asset and destination become public. Which deposit paid for it stays private, and the receipt shows the set it was proven against.

Before you start, unlock your notes.

  1. In the Act box, open Withdraw.
  2. Pick the asset.
  3. Paste the destination into Destination address. If it is a registered venue, the app names it and says how many sets it accepts; only those sets are offered.
  4. Enter the amount.
  5. Under Prove membership in, pick a set your note is approved in. Each set shows your largest note approved in it; one withdrawal spends one note, so the amount can't be above that.
  6. Press Withdraw. The step bar runs Prove set membership, Prove the spend, Relay, Confirm.
  7. When it shows Confirmed, follow Read the receipt.

With the SDK or CLI

ts
await plaza.withdraw({ note, set: setId, to: destination })

Without an amount, the whole note is withdrawn. Pass amount (SDK) or --amount (CLI) in base units for part of it; the rest returns as change.

Withdrawing to a venue

When you type the destination, the app asks GET /venues/{address}. For a venue, sets it doesn't accept are shown disabled. The program enforces the same rule: a withdrawal to a venue's deposit address proven against any other set fails with VenueRefused. See Venues.

What the destination receives

The amount you enter is gross. The protocol fee is taken from it and the destination receives the rest, in the same asset; see Fees and PLAZA. For an SPL token, the destination receives into its associated token account, which has to exist before you withdraw. The relayer pays into an existing account only: when the destination has none for the mint, the withdrawal is refused before it is sent, with "The destination has no token account for this mint. Create it first, then withdraw."

A SOL payout has to leave the account it pays at or above the rent-exempt minimum. One too small for that fails simulation with a message saying so.

What happens

Your browser proves membership against the chosen set's current root and proves the SPP spend, then sends both through the relayer. transact checks the venue rule, the root window, the binding and the proof, calls SPP, which releases the amount to Plaza's payout account, and pays the destination and the fee recipient in the same instruction.

If it fails

MessageWhat to do
RootOutsideWindowThe root you proved against left the set's window: the set published 32 newer roots or cleared its window. Withdraw again.
The destination has no token account for this mint.Create the destination's token account for the mint, then withdraw again.
A payout would leave its account below the rent-exempt minimum.Withdraw a larger amount, or fund the destination first.
VenueRefusedPick a set the venue accepts.
InvalidBindingThe fee rate changed after you proved. Withdraw again.

Every program error is listed on Errors.