Deposit addresses
Give each user a permanent address. Supported tokens they send to it are delivered to their recipient, with no quote to sign.
A deposit address is a permanent address tied to one destination token and one recipient. Your user funds it with a plain token transfer from any wallet or exchange. They don't sign a quote and your app doesn't send anything. Across picks up each deposit, prices the amount that arrived and delivers it to the recipient.
Use it when the user can't, or shouldn't have to, connect a wallet to your app: exchange withdrawals, "send funds here" onboarding screens, or one address a user tops up again and again.
Activated on request. Deposit addresses need the deposit-address
permission. Contact Across to activate it for your integration, then select
Deposit address when you create a key in the integrator portal. Without
it, the endpoint returns 403 permission.not_entitled.
How it works
- Request the address for a destination token and recipient.
- Show it to the user, with the tokens and chains they can send.
- The user sends funds to it.
- Track each deposit as a transfer.
Get the address
Call POST /v1/deposit-addresses with the destination token, the
recipient, and an evm refund address for deposits that can't be
delivered.
const BASE_URL = "https://api.across.to";
const API_KEY = process.env.ACROSS_API_KEY;
const res = await fetch(`${BASE_URL}/v1/deposit-addresses`, {
method: "POST",
headers: {
Authorization: `Bearer ${API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
destination: {
// USDC (Perps) on HyperCore
token: { chainId: 1337, address: "0x2100000000000000000000000000000000000000" },
recipient: "0xUserAddress",
},
refundAddresses: [{ namespace: "evm", address: "0xUserRefundAddress" }],
}),
});
if (!res.ok) {
// 401 and 429 come from the gateway as a flat { code, message, details }.
const body = await res.json();
const { code, message } = body.error ?? body;
throw new Error(`${code}: ${message}`);
}
const { depositInstructions } = await res.json();
const { depositAddress, supportedInputs } = depositInstructions[0];"depositInstructions": [
{
"depositAddress": { "namespace": "evm", "address": "0x137CbCC17B10d966C9904a66BB5e81727714f253" },
"supportedInputs": [
{
"originChainId": 42161,
"inputToken": { "symbol": "USDC", "decimals": 6, "address": "0xaf88d065e77c8cc2239327c5edb3a432268e5831", "chain": { "displayName": "Arbitrum One", ... }, ... },
"pricingStatus": "available",
"limits": { "minInputAmount": "5000005", "maxInputAmount": "10000000000000" },
"indicativeFees": { "proportionalPct": "100400033640104", "flatUsd": 0.01949929869 },
"maximumFees": { "proportionalPct": "500000000000000000", "flatUsd": 0 },
"indicativeFillTimeRange": { "min": 9, "max": 52 }
},
...
]
}
]The same request always returns the same address, so you can call it again whenever you show the address instead of storing it. A different destination token, recipient or refund address gives a different address. Addresses never expire.
The refund address is fixed into the address too. Use one the user controls on every supported chain, such as their own EOA. An exchange deposit address is a poor choice: a refund can arrive on a chain or in a token the exchange doesn't credit.
Show it to the user
depositAddress is one EVM address that works on every chain in
supportedInputs. Each entry in supportedInputs is a token the user
can send, on one chain, with what that deposit is expected to cost.
// proportionalPct is an 18-decimal fraction: 1e16 is 1%.
const pct = (p: string) => Number(p) / 1e16;
for (const input of supportedInputs) {
const { inputToken: token, limits, indicativeFees: fees } = input;
const min = limits && Number(limits.minInputAmount) / 10 ** token.decimals;
console.log(
`${token.symbol} on ${token.chain.displayName}`,
min ? `min ${min}` : "",
fees ? `fee about ${pct(fees.proportionalPct).toFixed(3)}% + $${fees.flatUsd.toFixed(2)}` : "fee unknown",
input.pricingStatus === "available" ? "" : `(${input.pricingStatus})`,
);
}
// USDC on Arbitrum One min 5.000005 fee about 0.010% + $0.02| Field | Meaning |
|---|---|
originChainId, inputToken | What to send, and on which chain |
pricingStatus | available; fees_above_maximum, where deposits currently cost more than your maximum fee and may be delayed or refunded; or pricing_unavailable, where the figures are the last known ones. Treat an unknown value as pricing_unavailable |
limits.minInputAmount | The smallest deposit to recommend, in the input token's base units |
limits.maxInputAmount | The largest deposit accepted, or null when there is no fixed maximum |
indicativeFees | Expected fee: proportionalPct × amount + flatUsd |
maximumFees | Your fee protection limit as the same schedule. A deposit whose fee would exceed it is refunded |
indicativeFillTimeRange | Expected seconds from deposit to delivery |
Every figure is advisory and can change between calls. The binding price
is set when the deposit lands. Fields can be null when an input could
not be priced; show the input anyway, without that figure.
Tell the user exactly what to send. Name the token and the network
next to the address. Send only the tokens and chains listed in
supportedInputs. Native tokens such as ETH are not supported inputs.
A token or chain that isn't listed may not be picked up, and isn't
guaranteed to be refunded.
The user sends funds
Any plain ERC-20 transfer to the address works: a wallet send, an exchange withdrawal or a contract call. The user signs that transfer as they would any other send. There is no approval, no quote or Across signature, and no API call to make.
Each deposit is handled on its own, for the exact amount that arrived,
so the user can send any number of deposits to the same address over
time. Your fee protection applies to each deposit: one whose fee would
exceed maximumFees is refunded rather than delivered at a worse price.
Track deposits
Each deposit becomes one transfer. List the transfers for an address
with the depositAddress filter on GET /v1/transfers:
const res = await fetch(
`${BASE_URL}/v1/transfers?depositAddress=${depositAddress.address}&limit=10`,
{ headers: { Authorization: `Bearer ${API_KEY}` } },
);
const { transfers } = await res.json();
for (const t of transfers) {
const deposit = t.transactions.find((tx) => tx.type === "deposit");
console.log(t.orderId, t.status.state, t.status.reason, deposit?.transaction.txnRef);
}| Field | On a deposit-address transfer |
|---|---|
fundingMethod | deposit_address |
origin.depositAddress | The deposit address |
origin.depositor | The wallet that sent the funds, not the deposit address |
transactions entry with type: "deposit" | The user's transfer into the deposit address |
A deposit appears once Across has picked it up and created its order;
before that, nothing is listed for it. To find the transfer for one
deposit, filter by its transaction hash with ?txnRef=<hash>. Follow a
transfer with GET /v1/transfers/{orderId} until status.isTerminal is
true, or receive the same updates through webhooks.
The request has no externalId, so these transfers carry none. One
address can take many deposits, so don't key a deposit's record on the
address: use its origin chain and transaction hash
(transaction.chainId and transaction.txnRef on the deposit entry),
then its orderId once the transfer appears. Use the deposit address to
group a user's deposits.
Refunds
A deposit is refunded to the evm refund address, in the same token and on
the chain it arrived on, when it can't be delivered. For example:
- it is well below
limits.minInputAmount, or above a fixedlimits.maxInputAmount; - its fee would exceed
maximumFees, and still does after Across retries.
The refund's gas can come out of the amount returned. A refunded deposit is
listed like any other, with status.state: "refunded" and
status.reason: "refund_confirmed", a refund entry in transactions, a
refund block naming the refund address, and no destination. See
Refunds.
Where it works
Deposit addresses are offered for two destinations on HyperCore (chain
1337):
| Destination token | Address | Funded with |
|---|---|---|
| USDC (Perps) | 0x2100000000000000000000000000000000000000 | USDC or USDT on Ethereum, Arbitrum, Base, Polygon, BNB Chain and HyperEVM |
| USDT (Spot) | 0x200000000000000000000000000000000000010C | USDT on Ethereum, Arbitrum and BNB Chain |
Other destination tokens answer 400 request.invalid_field. Rely on
supportedInputs for what an address accepts rather than this list.
Errors
| Error | Meaning |
|---|---|
403 permission.not_entitled | The key doesn't have the deposit-address permission |
400 request.invalid_field, param: "destination.token.address" | Deposit addresses aren't offered for this token, or it's a native token: use the wrapped one |
400 request.invalid_field, param: "destination.recipient" | The recipient isn't a valid address for the destination chain |
400 request.missing_field, param: "refundAddresses" | No evm refund address |
400 request.invalid_field, param: "refundAddresses" | refundAddresses is empty |
400 request.invalid_field, param: "refundAddresses.<i>..." | A refund address is malformed or zero, or a namespace is repeated |
400 request.unsupported_param | An unknown field in the body |
503 system.unavailable | The address couldn't be registered. Retry the same request; it returns the same address |