Prerequisites
- The user is onboarded and verified (KYC).
- The user capabilities allow crypto withdrawals.
- A funded account to support the withdrawal.
- The details of the destination wallet: blockchain address and destination tag/memo if applicable (e.g., XRP/XLM).
- Your system is set up to listen to webhooks for incoming transactions.
The flow
Choose a funded account
List the user’s accounts using the List Accounts endpoint and allow them to choose one with sufficient balance for the withdrawal.Create a quote
Create a quote for the withdrawal using the Create Quote endpoint.Quote object
A successful response returns aquote object with details about the withdrawal, including fees and expiration.
Quotes typically expire quickly. Prompt for user confirmation within the expiry window and regenerate if needed.
Handle quote requirements
Some quotes may include requirements in therequirements array that must be resolved before creating the transaction. If present, follow the Quote Requirements flow before proceeding.
Create a transaction
Once the user confirms the quote, create the transaction using the Create Transaction endpoint.Transaction object
A successful response returns atransaction object with details about the initiated withdrawal.
Execution modes
Crypto withdrawals support different execution modes depending on the destination and environment:- On-chain execution: The transaction is processed directly on the blockchain network. The
destination.node.execution.modewill be"onchain"and include blockchain-specific details such as transaction hashes upon completion. - Off-chain execution: When both the sender and recipient are Uphold users, the transaction is processed internally within Uphold’s infrastructure. This eliminates network fees and is faster than onchain processing. The
destination.node.execution.modewill be"offchain". For offchain transactions, theexecutionobject includes additional properties:accountOwnerId(the recipient user ID) andaccountId(the recipient account ID). - 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
destination.node.execution.modewill be"simulated".
Monitor for settlement
Prefer webhooks for real-time updates, or fall back to polling if webhooks are not feasible.- Webhook events (recommended):
- core.transaction.created
status: processing→ initiated but not yet broadcast
- core.transaction.status-changed
status: completed→ broadcast and confirmedstatus: failed→ transaction failed, checkstatusDetailsfor more info
- core.transaction.created
- Polling (fallback):
- Get Transaction endpoint.
Notify the user
Keep your users updated on the status of their withdrawal by using in-app notifications and status emails.Congratulations! You’ve successfully implemented the crypto withdrawal flow using the Enterprise API Suite.