Prerequisites
- The user is onboarded and verified (KYC).
- 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.
If the destination network requires an additional reference (e.g., destination tag, memo), treat it as mandatory. Missing references often lead to loss or lengthy recovery.
The flow
Choose a funded account
List the user’s accounts using List Accounts endpoint and let them choose one with sufficient balance for the withdrawal.Create a quote
Create a quote for the withdrawal using 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.
Create a transaction
Once the user confirms the quote, create the transaction using 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.mode
will 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.mode
will be"offchain"
. For offchain transactions, theexecution
object 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.mode
will 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
meaning initiated but not yet broadcast
- core.transaction.status-changed
status: completed
meaning broadcast and confirmedstatus: failed
meaning irrecoverable error
- core.transaction.created
- Polling (fallback):
- Get Transaction endpoint.
Notify the user
Show an in-app confirmation and send an email once the withdrawal is completed.Congratulations! You’ve successfully implemented the crypto withdrawal flow using the Enterprise API Suite.