- Non-custodial — Swish never holds funds. The payer pays from their own wallet.
- No fees from Swish — the payer covers only the underlying privacy-protocol fee (see Fees).
- No web3 to bundle — the package ships no Solana or wallet dependencies.
Try it live
Configure a Plug, click the real button, and copy the snippet in the
interactive playground.
Install
Use the React component, or drop in the vanilla script — no build step needed.Quickstart
onSuccess fires with the transaction signature and your reference.
Options
Every option is optional — open the Plug with none of them and the payer enters the recipient and amount themselves. In practice you’ll usually setrecipient (so funds come to you), and most integrations also set amount, reference, and onSuccess.
| Option | Type | Required | Description |
|---|---|---|---|
recipient | string | Optional | Destination Solana address. Omit to let the payer enter it. (v1 takes a raw address only.) |
amount | number | Optional | Amount in USDC. If set, the amount field is locked; omit to let the payer type it. |
token | "USDC" | Optional | Token to pay in. v1 supports USDC only. |
reference | string | Optional | Your order/correlation id. Never read or stored — echoed back untouched in onSuccess so you can match the payment to your order. |
label | string | Optional | Override the button text. Defaults to “Deposit Privately”. |
compact | boolean | Optional | Force the compact “Deposit” label. Auto-shrinks when the button is cramped. |
onSuccess | (txSignature, reference?) => void | Optional | Fires when a payment confirms. |
onError | (message) => void | Optional | Fires when a payment fails (the widget stays open for retry). |
onClose | () => void | Optional | Fires when the payer dismisses the widget. |
children (a custom trigger element that replaces the default button), plus className and style for the wrapper.
Custom trigger (React)
Passchildren to use your own button instead of the default:
How routing works
The Plug routes each payment through the best available privacy protocol automatically (Auto), choosing between MagicBlock and Privacy Cash. The payer doesn’t pick a protocol. See Privacy Protocols for how each works.v1 of the Plug is Pay-only, USDC-only, and routes across MagicBlock and Privacy Cash. Umbra is not included in v1.