Prerequisites
- The user is onboarded and verified (KYC).
- The user capabilities allow crypto deposits.
- An account created for the user to receive the deposit.
- The asset and network are enabled in your environment (e.g., BTC mainnet, ETH mainnet/testnet).
- Your system is set up to listen to webhooks for incoming transactions.
The flow
Choose asset & network
Confirm the asset (e.g., XRP) and network (e.g., xrp-ledger) that the user wants to deposit.Generate deposit address
Request a deposit address for the user’s account by calling the Set up Account Deposit Method endpoint, specifying the following parameters:type:cryptoasset: the asset the user will deposit (e.g.,XRP)network: the network the user will deposit from (e.g.,xrp-ledger)
address and, if applicable, a reference (e.g., destination tag, memo).
Display deposit instructions
Render the address clearly. If areference is present, display it prominently and treat it as required input. We suggest also displaying a QR code to make it easier for users and reduce possible errors.
Monitor for incoming transactions
Prefer webhooks for real-time updates, or fall back to polling if webhooks are not feasible.- Webhook events (recommended):
- core.transaction.created
status: processing→ detected on-chain but not yet confirmed
- core.transaction.status-changed
status: completed→ necessary confirmations reachedstatus: on-hold→ transaction checks paused (e.g., pending RFIs)status: failed→ irrecoverable error
- core.transaction.created
- Polling (fallback):
- Get Transaction endpoint.
Handle on-hold transactions
If the crypto deposit is placedon-hold with reason pending-requests-for-information on arrival, you’ll need to resolve pending RFIs before the deposit can complete. Follow the Transaction RFIs flow to handle this scenario.
Transaction object
Below is a sample transaction object returned by the Get Transaction endpoint. Theorigin field shows how the source of the deposit is represented:
Execution modes
Crypto deposits are processed using different execution modes depending on the environment and configuration:- On-chain execution: The transaction is processed directly on the blockchain network. The
origin.node.execution.modewill be"onchain"and include atransactionHashas shown in the example above. - Simulated execution: Used in development environments for testing purposes. The transaction appears processed but does not affect actual blockchain state (user balances will be affected though). The
origin.node.execution.modewill be"simulated"(Available soon).
Notify the user
Keep your users updated on the status of their deposit by using in-app notifications and status emails.Congratulations! You’ve successfully implemented the crypto deposit flow using the Enterprise API Suite.