Accept BNB, ETH and tokens on a single deposit address
By default a deposit address watches one asset, for example bep20/usdt. With multiToken one address accepts the chain's native coin and every supported token on it. It fits wallets and top-up flows where users send whatever they hold.
Create a multi-token address
curl -X POST https://api.chainpay.site/deposit-address \
-H 'content-type: application/json' \
-d '{
"ticker": "bnb",
"multiToken": true,
"callbackUrl": "https://shop.example.com/crypto-webhook?token=SECRET",
"forwardAddress": "0xYourOwnBscWallet...",
"externalReference": "user-42"
}'
- Use a bare native ticker:
trxfor TRON,bnbfor BNB Smart Chain,ethfor Ethereum. multiToken: truemakes the address accept the native coin and every supported token (TRC20, BEP20, ERC20).- Use a stable
externalReferenceper user: the address is permanent and can receive many deposits.
What the webhook tells you
Each deposit is tracked and swept separately, and the webhook describes the asset that actually arrived:
{
"status": "confirmed",
"externalReference": "user-42",
"chain": "bsc",
"tokenSymbol": "BNB",
"tokenAddress": null,
"isNative": true,
"amount": "0.842000000000000000",
"txHash": "0x…"
}
For a token transfer isNative is false and tokenSymbol / tokenAddress identify the token. Branch on those fields:
function handleDeposit(event) {
if (event.status !== 'confirmed') return;
const { externalReference, tokenSymbol, isNative, amount } = event;
// credit `amount` of `tokenSymbol` to the user identified by externalReference
creditBalance(externalReference, tokenSymbol, amount);
}
Rules to know
- Unsupported tokens are not credited. A transfer of a token outside the supported list is ignored, which protects you from spam tokens.
- Contract transfers are not detected on EVM chains. A payment sent by a smart contract (an internal transfer, for example some exchange withdrawals) is not credited yet. Plain wallet-to-wallet transfers and token transfers work.
- Native coin fees. Native deposits pay the network cost out of the deposit itself, so very small native amounts can be treated as dust.
- Thresholds and fees are applied per asset. See Pricing and Networks.