- Your core Mesh integration is working end-to-end (see Prepare for go-live)
- You have a withdrawal or payout flow in your app
Overview
Most withdrawal or payout flows require users to select an asset/network and then paste an address, just like they do in a deposit flow. And their primary concern is the same: losing funds because they make a mistake (ie. wrong network, wrong address, etc.). Mesh enables automated address retrieval for user withdrawals or payouts from your platform. After connecting an account, Mesh lets you pull addresses with clear asset/network mapping — eliminating human error and the risk of lost funds. Additionally, after a deposit, “refund addresses” are also available via Mesh SDK events and webhooks. Together, these can form the foundation of an “address book” where users save their preferred withdrawal destinations for future use.Register for, and consume Mesh Transfer Status webhooks
Why?: Mesh provides real-time updates to transfer statuses which can be used to power several things for your app. But one piece (providing theRefundAddress for user transfers from external accounts) can be the underpinning of creating a seamless roundtrip journey.
Instructions
Instructions
- See the Transfer status webhooks guide for more info.
- Callback URIs can be added in the Mesh dashboard in Account > API keys > Webhooks.
Save the RefundAddress and associated details when the user makes a deposit, and surface it as a withdrawal destination.
Why?: Creating a seamless roundtrip journey for the user builds trust. Users often want to withdraw funds back to the same source from where they deposited. This process makes that easy. It feels personalized.
Instructions
Instructions
- The objects below are in Mesh transfer webhook events. Save this data, and surface it as a possible withdrawal destination in your UX (eg.
Your Binance account (0x31…cF98)).
| Parameter | Description |
|---|---|
SourceAccountProvider | Where the deposit came from (eg. Binance) |
Chain | The blockchain used for the transfer (eg. Ethereum) |
Token | The token used for the transfer (eg. USDC) |
RefundAddress | Where the user can receive funds back to (eg. a deposit address within that account). |
- Important notes:
- Take proper care to ensure you associate it with the correct user.
- That
RefundAddressis specific to theChain&Token. Any transfer of that specific token on that chain to that address is safe, but sending any other token or on any other network to that address may result in lost funds.- See Concepts for more information about
refundAddress
- See Concepts for more information about
Add a Connect account option in the withdrawal flow
Why?: Users’ number-one fear when transferring crypto is making a mistake — wrong network, wrong address. With Mesh Link, that becomes impossible because it’s all automated. Providing an automated address retrieval option adds a layer of trust and certainty to the withdrawal process.
Instructions
Instructions
- Call for a Link Token using the request structure below, and launch the Mesh Link SDK for the user.
Parameter reference
Parameter reference
X-Client-Id requiredX-Client-Secret requireduserId requiredrestrictMultipleAccounts optionalDefaults to true, which is standard used for any transfer flow.
On some non-transfer flows (ie. “read” use cases), a user could connect multiple accounts in a row if this value were false. Sometimes valuable for withdrawal use cases to let the user create an external “address book”.
integrationId optionalA unique Mesh identifier representing a specific integration.
Use the Get integrations endpoint (/api/v1/transfers/managed/integrations) to pull a list of integrations and the corresponding Mesh integrationId. These values won’t change, so you do not have to hit this endpoint before each Link Token request.
To be used if the user selects the integration in your UX before launching Mesh (most commonly in an onramp flow).
- The user will select an account, authenticate / provide access, and then their session will end.
- You will receive an SDK event called
integrationConnected. You should use theonIntegrationConnected()callback function to save thetokenId&accountNameobjects, associated with thatuserId.- See the Supercharge return-users guide for more information about this step.
- Call the Mesh Get deposit addresses endpoint (/api/v1/transfers/managed/address/list), supplying the
authToken(same astokenId) &type(same asaccountName).- The response will return all addresses for each network on which the user can receive the specified crypto token. It will also have other helpful data to build you UX like a
networkNamefor displaying the network and alogoUrlfor that network. - Important note: Be sure to capture the
memofor deposits of relevant assets (eg. XRP) into any custodial platform.
- The response will return all addresses for each network on which the user can receive the specified crypto token. It will also have other helpful data to build you UX like a
Parameter reference
Parameter reference
X-Client-Id requiredX-Client-Secret requiredtype requiredThe type of integration from which your pulling the user’s deposit addresses.
This is deFiWallet for self-hosted wallets, or a name of an exchange account (eg. uphold).
authToken requiredThe tokenId returned to you in the integrationConnected event when the user connected this account.
This provides access to read data from the account.
symbol requirednetworks.networkId optionalMesh’s unique identifier for a specific network for which you would like to pull the user’s deposit address for symbol at the specified integration.
Use the Get networks endpoint (/api/v1/transfers/managed/networks) to pull a list of all supported networks and the corresponding Mesh networkId. These values won’t change, so you do not have to hit this endpoint before each Link Token request.
This should not be used with caipId. Use one or the other. If both are left blank, this endpoint will return addresses for all eligible networks for the specified symbol.
networks.caipId optionalA standardized identifier for blockchain networks/assets (e.g. eip155:1 is Ethereum mainnet).
This should not be used with networkId. Use one or the other. If both are left blank, this endpoint will return addresses for all eligible networks for the specified symbol.
What’s next
Explore the other Extend guides:- Add Mesh onramp integrations to your “Buy” lineup — add exchange-based onramps to your “Buy” flow.
- Verify self-hosted wallets — add wallet ownership verification for compliance or security.
AI coding reference (llms.txt)
AI coding reference (llms.txt)
RefundAddress, retrieve deposit addresses via API, offer “Connect account” in your withdrawal UI.RefundAddress from transfer webhooks: Save RefundAddress + Chain + Token + SourceAccountProvider per userId. Surface as a withdrawal destination (e.g. “Your Binance account (0x31…cF98)”). Note: RefundAddress is specific to that chain+token combination.Deposit address retrieval: POST /api/v1/transfers/managed/address/list
Params: type (broker type, e.g. “uphold”, or “deFiWallet” for self-custody) | authToken (= tokenId from onIntegrationConnected) | symbol | networks[].networkId or networks[].caipId (optional — omit for all networks)
Response includes: address per network, networkName, logoUrl, memo (important for XRP, XLM)Get networkIds: Use GET /api/v1/transfers/managed/networks to fetch the full list of supported networks and their networkId values. These values don’t change — safe to cache permanently, no need to call this endpoint before every Link Token request.Withdrawal Link Token: No transferOptions needed — user just connects account. Receive integrationConnected → save tokenId + accountName → call address list endpoint.Optional: Pass integrationId to pre-select the exchange. Set restrictMultipleAccounts: false to let users build an “address book” across multiple accounts.Withdrawal Link Token — minimal request (no transferOptions — user just connects account):onIntegrationConnected):