Quickstart
Add a cross-chain deposit button to a React app. Your users pay from any of 32 chains. Your app receives the token you name.
Before you start
- A React 18 or later app (Next.js, Vite, Remix all work).
- An address your app controls on the chain you want to receive on. For USDC on Optimism, that’s an 0x address.
That’s all. There’s no backend to run and no secret key. On localhost you can start straight away; a deployed site needs a free App ID, which step 3 covers.
1Install the SDK
$ npm install uniport-sdk2Add the button
Render UniportButton wherever your app asks for funds. This is the whole integration:
1import { UniportButton } from "uniport-sdk";23export function DepositAction() {4 return (5 <UniportButton6 appId="app_..."7 recipient="0x..."8 destinationToken="optimismUSDC"9 label="Deposit"10 />11 );12}
Nothing else to configure. The SDK talks to Uniport’s hosted backend, which handles quotes, deposit addresses and status. No secret keys live in your client.
3Get your App ID
Sign in to the dashboard, create an app, and add the website it runs on. Copy the App ID it gives you into the appId prop.
The App ID is public, so it is safe in your site’s code. What it controls is which websites may use it, and it is how your payments show up in your dashboard. On localhost the button works without one, so you can try Uniport before you sign up.
4Set your values
Replace the other props with your own:
| Prop | Set it to |
|---|---|
| recipient | Your address on the destination chain. Funds settle here, so it must be valid for that chain. |
| destinationToken | What your app receives, written {chain}{SYMBOL}: optimismUSDC, baseUSDC, suiUSDC. All 97 tokens |
| label | The button text. Optional; defaults to Pay with Crypto. |
5Try a deposit
Click the button in your app. Your users go through four steps, all inside the modal:
- 01
Pick a chain
Where their funds are now: Solana, Bitcoin, Base…
- 02
Pick a token
Any token Uniport supports on that chain.
- 03
Enter an amount
Uniport returns an exact quote.
- 04
Send exactly that
To one deposit address, by QR or copy. Funds settle to your recipient.
Deposits are real transactions. Try your first one with a small amount, from a chain you already hold funds on.