Skip to main content
The Plug is a drop-in widget that lets your users pay you privately in USDC or SOL — without you building any wallet, routing, or privacy logic. Add a button, get paid privately.
  • 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

Both render a button that opens the Swish widget in a modal, where the payer connects a wallet and pays. When the payment confirms, onSuccess fires with the transaction signature and your reference.
The React <Plug /> ships its own branded button. With the script tag, call Plug.open(opts) from any button’s click handler (as above), or use Plug.mount("#selector", opts) to inject the branded button into an element.

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 set recipient (so funds come to you), and most integrations also set amount, reference, and onSuccess. React-only extras: children (a custom trigger element that replaces the default button), plus className and style for the wrapper.

Custom trigger (React)

Pass children 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.
The Plug is Pay-only and routes across MagicBlock and Privacy Cash. Umbra is not included. SOL payments route through Privacy Cash (MagicBlock is USDC-only), so a SOL payment is always a private Privacy Cash send.

What the payer needs

The payer brings their own funds — the amount in the chosen token (USDC or SOL) plus a small amount of SOL for gas. They connect a wallet inside the widget; nothing is required of them ahead of time.
Privacy Cash charges a fixed base fee (~0.71equivalent)plus0.350.71-equivalent) plus 0.35%. On small **SOL** payments that fixed base is a large share of the total, so SOL suits larger amounts better than sub-5 tips.