One `<iframe>`. No npm install, no build step, no API key:

```html
<iframe
  src="https://gum.ag/embed/universal-deposit?chainId=42161&destinationAddress=YOUR_ARBITRUM_ADDRESS"
  width="375"
  height="620"
  style="border:0;border-radius:20px;max-width:100%"
  title="Universal Deposit"
  allow="clipboard-write"
></iframe>
```

Replace `YOUR_ARBITRUM_ADDRESS` with the address that should receive the
deposits, and `chainId` with its chain. Deposits go to that address only when
`hideDestination=true`.

By default, the widget has two tabs. **Transfer Manually** shows a deposit address and QR
code for the sender to pay from anywhere. **Wallet Deposit** connects the
sender's browser wallet, lets them pick a balance and amount, and signs the
transfer in place. Funds go to the `destinationAddress` you set, but senders
can switch it with **Change** unless you set `hideDestination=true`.

Set `disableWalletDeposit=true` for manual deposits only: the deposit address
and QR code remain, and both tabs are hidden.

<Card title="Configure it in the playground" icon="sliders-horizontal" href="/universal-deposit/overview" horizontal>
  Every setting below is a control on the live playground. Adjust, watch the
  widget reload, and copy the exact iframe tag.
</Card>

## Parameters

Everything is passed as query params on the iframe `src`.

| Param                | Meaning                                                                                                                                                                                                                                                                  |
| -------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `destinationAddress` | **Required.** Where the funds land, in the destination chain's own format (see [supported chains](/universal-deposit/overview#supported-chains)).                                                                                                                                                  |
| `chainId`            | The **destination** chain — `900` Solana, `1` Ethereum, `8453` Base, `42161` Arbitrum, `56` BSC, `4663` Robinhood, `101` Sui. Funds land as that chain's dollar token (USDC; USDT on BSC, USDG on Robinhood). Defaults to `900`.                                        |
| `alwaysSettleInUsdc` | `true` (default) or `false` — see below.                                                                                                                                                                                                                                 |
| `sourceChainId`      | Pins the network the sender pays from (same IDs as `chainId`). The network selector becomes a static field, tokens are filtered to that network, and an unsupported pin shows an error instead of another network's address. Omit to let the sender pick.               |
| `mode`               | `address` (default) opens on Transfer Manually; `wallet` opens on Wallet Deposit. Both tabs stay visible unless `disableWalletDeposit=true`.                                                                                                                           |
| `disableWalletDeposit` | `true` locks the widget to Transfer Manually and hides both tabs, including when `mode=wallet`. Defaults to `false`.                                                                                                                                                   |
| `hideDestination`    | `true` hides the Destination rows and the **Change** button in every screen, so senders can't redirect their deposit. Set it whenever deposits must reach your address, such as top-ups and payments. The deposit address, QR code, and chain badges stay. Defaults to `false`. |
| `theme`              | `dark` (default), `light`, or `auto` — see [Theming](#theming).                                                                                                                                                                                                          |
| `backgroundColor`    | Card background: `#RGB`, `#RRGGBB`, or `transparent`. Omit for the theme default. Encode `#` as `%23` in the URL — see [Card background](#card-background).                                                                                                                 |
| `qrColor`            | QR foreground: opaque `#RGB` or `#RRGGBB`. Colors the QR pattern and corner markers — see [QR colors](#qr-colors).                                                                                                                                                        |
| `qrBackgroundColor`  | QR card, quiet area, and logo backing: opaque `#RGB` or `#RRGGBB`. Omit both QR params for theme defaults — see [QR colors](#qr-colors).                                                                                                                                   |

The destination chain and address use the same values as the
[deposit-addresses API](/universal-deposit/api-reference/get-deposit-addresses),
so an address you already resolved there drops into the iframe URL unchanged.

### Always settle in USDC

| `alwaysSettleInUsdc` | What the viewer sees                                                                                                                                                                                                                                                                         |
| -------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `true` (default)     | Supported tokens settle as the destination network's dollar token (USDC; USDT on BSC, USDG on Robinhood) in both tabs, including deposits on the destination network. Wallet Deposit transfers the canonical dollar token directly when it is already on that network; other tokens are converted. |
| `false`              | Transfer Manually shows the raw receiving address when the sender picks the destination network — the token isn't converted, but the deposit still routes through Gum. Wallet Deposit also transfers on that network. Deposits from other networks route through Gum and settle as the destination network's dollar token. |

## Crediting deposits

The widget doesn't tag a deposit with who sent it. Each destination has fixed
[deposit addresses](/universal-deposit/how-it-works#deposit-addresses), so
everyone who deposits to the same `destinationAddress` pays into the same
addresses, and a shared address can't tell senders apart.

To credit individual customers, give each customer their own destination
address, for example a deposit account per customer in your wallet or custody
system, and embed the widget with that customer's address. Credit what arrives
there: the destination network's dollar token, after the fees in
[Deposit costs and estimates](/universal-deposit/deposit-costs).

## Theming

The widget defaults to dark. Pick its appearance with the `theme` param:

| `theme`          | What the viewer sees                                                                                                  |
| ---------------- | --------------------------------------------------------------------------------------------------------------------- |
| `dark` (default) | The dark widget, regardless of the viewer's OS setting.                                                               |
| `light`          | The light widget.                                                                                                     |
| `auto`           | Follows the viewer's `prefers-color-scheme`, live — including OS appearance switches while the page is open.          |

The page around the card is transparent in every theme, so your own background
shows through.

### Card background

Set `backgroundColor` to a three- or six-digit hex color, or `transparent`.
Values are trimmed and case-insensitive; missing, empty, or invalid values use
the theme's default background.

The override applies to the card in every screen, including loading and error
states. The iframe page around it stays transparent. `theme` still controls
text, inputs, menus, and default QR colors, so choose a theme that contrasts with
your background. With `transparent`, your page's background shows through the
card too.

For example, configure manual deposits only with custom card and QR colors:

```js
const params = new URLSearchParams({
  chainId: "42161",
  destinationAddress: "YOUR_ARBITRUM_ADDRESS",
  disableWalletDeposit: "true",
  theme: "light",
  backgroundColor: "#f3f4f6",
  qrColor: "#1f2937",
  qrBackgroundColor: "#ffffff",
});
const frame = document.querySelector('iframe[title="Universal Deposit"]');
frame.src = `https://gum.ag/embed/universal-deposit?${params}`;
```

`URLSearchParams` encodes `#` as `%23`. A raw `#` starts a URL fragment and
will not reach the widget as a color. Changing card or QR colors requires
updating the iframe `src`, which reloads it. The wallet's **Open in a new tab**
link preserves valid background colors and the resolved custom QR palette.

### QR colors

`qrColor` sets the QR pattern and corner markers. `qrBackgroundColor` sets the
QR card, the clear area around the pattern, and the backing behind its logo.
The outer widget card uses `backgroundColor` independently.

Both QR params accept only opaque `#RGB` or `#RRGGBB` values. Values are trimmed
and case-insensitive; transparent and alpha colors are unsupported. Invalid
values are ignored individually. If only one valid QR color is supplied, the
widget chooses black or white for the missing color, whichever gives higher
luminance contrast.

If both supplied colors are valid but their contrast is below **4.5:1**, the
widget uses the theme's default QR colors instead. This is a conservative
product guard; it does not guarantee scanning on every device. Test your palette
with real QR scanners at your intended embed size before using it in production.

A valid custom QR palette keeps both colors fixed across theme changes. Omit
both QR params, or select **Default** in the playground, for QR colors that
follow the theme. Low-contrast pairs also fall back to theme-following defaults.

### Live theme changes

If your page has its own theme toggle, switch the widget in place, with no
reload, by posting a message into the frame. Messages are idempotent, so rapid
toggles settle on the last theme requested:

```js
const frame = document.querySelector('iframe[title="Universal Deposit"]');
frame.contentWindow.postMessage(
  { type: "ud-embed:set-theme", theme: "light" }, // or "dark" / "auto"
  "https://gum.ag",
);
```

A reloaded frame boots from its URL's `theme` param, not the last message. If
you swap the frame's `src` while your page keeps state, re-post the current
theme on its `load` event.

## Sizing

The widget is centered and capped at **375 px** wide, and shrinks to fit
narrower containers. Start with a `375 × 620` iframe and `max-width:100%`.
Wallet screens have different heights, so listen for the widget's resize
messages and assign the height directly. They already include intermediate
heights during transitions, so don't add your own transition on the iframe:

```js
const frame = document.querySelector('iframe[title="Universal Deposit"]');
window.addEventListener("message", (event) => {
  if (
    event.origin === "https://gum.ag" &&
    event.source === frame.contentWindow &&
    event.data?.type === "ud-embed:resize" &&
    Number.isFinite(event.data.height)
  ) {
    frame.style.height = `${Math.max(200, event.data.height)}px`;
  }
});
```

<Note title="Keep clipboard access">
  Keep `allow="clipboard-write"` so the copy-address button inside the frame
  works. Some mobile wallet browsers only expose their connection to top-level
  pages; Wallet Deposit offers **Open in a new tab** inside iframes and carries
  every setting across. If you sandbox the iframe, allow scripts, same-origin
  access, popups, and popups escaping the sandbox.
</Note>

## How wallet deposits work

<Accordion title="Wallet Deposit, step by step">
  Wallet Deposit discovers installed EVM wallets and Solana wallets that support
  Wallet Standard transaction signing, grouped under **Solana** and **Ethereum**.
  Wallet transfers support Ethereum, Base, Arbitrum, BNB Chain, Robinhood Chain,
  and Solana. Sui deposits remain available through Transfer Manually. Solana
  wallet transfers support SOL and classic SPL tokens; Token-2022 transfers
  require Transfer Manually.

  Detected balances show token amounts and estimated USD values. Balances must
  be at least $3, or $10 on Ethereum, to appear. The sender enters an amount in
  either unit or picks 25%, 50%, 75%, or Max; Max reserves the estimated network
  fee for native assets. Deposits from the connected wallet on the receiving
  network itself are blocked before token selection; cross-chain deposits stay
  available even when the receiving address matches the connected wallet.

  **Direct transfers.** When source and destination networks match and
  `alwaysSettleInUsdc=false`, or the token is the canonical dollar token on the
  receiving network, the widget builds a plain native, ERC-20, or SPL transfer
  to `destinationAddress` and opens the wallet. There is no quote, bridge fee,
  conversion, or expiry. The wallet shows the final amount before approval.

  **Routed transfers.** Everything else uses a generated deposit address with an
  estimated preview of the dollar-token amount received. The preview expires 30
  seconds after it is prepared and refreshes automatically without signing;
  refresh pauses while the wallet is open or the page is hidden. Expired previews
  cannot be confirmed. Universal Deposit does not expose a binding quote: routed
  USDC previews subtract the bridge fee, other tokens use their latest market
  price, and swap costs, price impact, and later fee changes can affect
  settlement. No minimum-received amount or locked rate is implied. See
  [Deposit costs and estimates](/universal-deposit/deposit-costs).

  **Submission and tracking.** Both paths use current network fees at
  submission. Entered amounts stay exact; Max can decrease if the balance falls
  or gas rises, never increase past the reviewed amount. Direct transfers finish
  after source confirmation; routed transfers finish when the destination
  settlement is reported. Refunds are shown separately from success. Pending
  transfer state is kept in the tab's session storage so a reload resumes
  tracking without another signature, and a sender can supply a transaction hash
  if the wallet's broadcast result was uncertain.
</Accordion>

## Content Security Policy

If your page sets a Content Security Policy, allow the frame with
`frame-src https://gum.ag`. The widget sends its own requests from inside the
frame, so the hosted embed needs no other entries on your page. The policy under
[Self-hosting](#self-hosting) applies only when you host the widget yourself.

## Self-hosting

The hosted embed at `gum.ag` proxies every request it needs. If you host the
widget yourself, the server-only `UD_EMBED_API_KEY` authenticates
deposit-address and deposit-status requests and stays on the server. Use the
same key for both, or status lookups return an empty list.

Your page's Content Security Policy must allow `https://api.gum.ag` in
`connect-src` for token balances, chain RPC, and quotes, plus
`https://ultra-api.jup.ag` for Solana token-account discovery. Wallet
transactions are signed and sent by the user's wallet, so no chain RPC origins
need to be allowed on the page.
If you configure devnet gum-services, also allow `https://dev-api.gum.ag`.
