For the complete documentation index, see llms.txt. Markdown versions of documentation pages are available by appending .md to page URLs.
Skip to content

Deposit Address Integration

A "Deposit with QR" screen on your own UI, built on deposit addresses: the user picks a token and network, sends funds from any wallet or exchange, and receives your destination token.

Step
Runs on
API

1. Choose what users can send

Your server, once

GET /v1/tokens?depositAddress=true

2. Get the address and its minimum

Your server (API key)

POST /v1/deposit-address, POST /v1/deposit-address/quote

3. Show the address

Browser

—

4. Track the deposit

Browser, then your server

GET /v1/deposit-address/status

5. Credit the user

Your server

transaction.completed webhook

From TypeScript, SwapperApiClient creates and tracks the address.

1. Choose what users can send

Offer a few token + network pairs from GET /v1/tokens?depositAddress=true. Other tokens can't fund a deposit address.

2. Get the address and its minimum

On your server:

  • POST /v1/deposit-address returns the address. The same parameters always return the same address, so you can fetch it each time the screen opens — but store whose it is: the webhook only names the address.

  • POST /v1/deposit-address/quote, with the same body and any plausible amount, returns minAmountUSD — the minimum to show. Quote the user's own amount to show what it delivers and what it costs.

Set refundAddress to a wallet you control; see Refunds.

3. Show the address

  • The address as a QR code (the bare address) and as text with a Copy button.

  • The token, the network and the minimum next to it: the right token on the wrong network may be lost.

  • No exact amount: each deposit is converted at the rate when it arrives, minus fees.

  • A new option means a new address.

4. Track the deposit

Swapper records a deposit when its address is checked, so keep polling the status: every 10–15 seconds from the browser while the screen is open (no API key needed), then every few minutes from your server for a while after the user leaves — exchange withdrawals often arrive later.

5. Credit the user

Credit the deposit from the transaction.completed webhook, not from the screen — the user may close it first. Match flow: "transfer_crypto", find the owner of providerData.depositAddress, and credit once per eventId.

A deposit that can't be delivered is refunded. Ask users to keep the hash of their transfer for support.

Last updated