This functionality is also only available on version 4.25.0 of the SDK and above.
Dashboard Setup
Follow these steps to enable exchange funding from Dashbaord:- Go to the funding tab
- Toggle the exchange you would like to enable and click the gear icon
- Enable the Exchange Transfer toggle for funding directly from exchange
- Enable OAuth for the exchange: for most platforms you’ll need to complete the OAuth setup though some exchanges may let you initiate transfers via an in‑app popup without a full OAuth flow.
- Save the settings. Note that it could take up to 5 minutes for the settings cache to refresh on your site.

SDK Views
Once enabled in Dashboard and the settings have propagated, your end users would be able to link their Exchange account to their user profile and initiate the transfer.- In the user profile widget, click on Deposit
- Click on From Exchange
- Click on the desired exchange and you will be taken immediately to the transfer flow

Headless Implementation
For developers looking to implement a headless version of the Fund from Exchange feature, you can use theuseExchangeAccounts
hook. This hook provides programmatic access to exchange account management, transaction history, and transfer operations.
Exchange Transfer Events
TheexchangeTransfer
endpoint publishes two types of events depending on the outcome of the transfer operation:
user.exchangeTransfer.success
Published when: An exchange transfer is successfully initiated.
Data payload: The complete ExchangeTransferResponse
object containing:
user.exchangeTransfer.failed
Published when: An exchange transfer fails for any reason.
Data payload: The raw error object that caused the failure. The error can be one of several types:
Examples:
CustomError:
Event Metadata
Both events include the following metadata:environmentId
: The project environment IDuserId
: The ID of the user performing the transfereventName
: Either"user.exchangeTransfer.success"
or"user.exchangeTransfer.failed"
Webhook Integration
To receive these events in real-time, you can configure webhooks in your Developer Dashboard. Select the following event types to subscribe to exchange transfer events:user.exchangeTransfer.success
user.exchangeTransfer.failed
Webhook Payload Example
When configured, your webhook endpoint will receive POST requests with the following structure:Event Handling Best Practices
- Idempotency: Use the
messageId
field to handle duplicate events safely - Status Tracking: Monitor transfer status changes to update your application state
- Error Handling: Implement proper error handling for failed transfers
- Signature Validation: Always validate webhook signatures using your webhook secret