The Payment Widget handles ACH bank account selection and creation. Your backend creates the session, then continues with the REST API to create a quote and transaction once the user has a destination bank account.Documentation Index
Fetch the complete documentation index at: https://developer.uphold.com/llms.txt
Use this file to discover all available pages before exploring further.
Prerequisites
- The user has completed onboarding and has the required capabilities enabled.
Walkthrough
Select source account
ACH withdrawals can be sourced from any account. If the selected account is not in USD, the balance will be converted at the time of the transaction using Uphold’s prevailing rate. Make sure the origin asset has the necessary features enabled. Call List accounts to retrieve the user’s accounts and let them pick the one to withdraw from.Select a bank account
The widget lets the user select an existing ACH bank account or add a new one by providing their routing and account number.Create a payment session
Call the Create payment session endpoint to create a session for theselect-for-withdrawal flow.
session object with a token and url to initialize the widget.
Set up the widget
Initialize the widget for theselect-for-withdrawal flow using the session data returned from the API.
The example above is for web applications. For native apps using a WebView, you’ll need a bridge for events as outlined in Installation & setup.
Handle the complete event
When the user completes the selection, thecomplete event fires with via: "external-account" and a selection containing the chosen external account.
via— set toexternal-accountwhen the user selects or adds a bank account.selection— an external account object with the selected bank details.selection.network— the network to use for the withdrawal ("ach"or"fednow"ifsecondaryNetworksincludes it). Pass this value in the quote request.
Handle cancellations
Thecancel event fires when the user closes the widget without selecting a bank account.
Handle errors
Theerror event fires when an error occurs during the bank account selection process.
Create a quote
Create a quote with Create quote. Passnetwork: "ach" on the destination node to route the transfer via ACH, or leave it out to route via the external account’s default network. If the external account has secondaryNetworks, the user can choose which one to use for the transfer. The quote must be created with the selected network to ensure accurate fees and expiration time.
quote object with fees and expiration.
Quotes typically expire quickly. Prompt for user confirmation within the expiry window and requote if needed.
Confirm and create transaction
After the user confirms the withdrawal, call Create transaction with the quote ID to execute the transfer.account and the destination is the external-account representing the user’s bank. The transaction status is initially processing and updates to completed once the transfer settles.
Monitor for settlement
The widget does not monitor for settlement. Your application must do this via webhooks or polling.- Webhook events (recommended):
- core.transaction.created
status: processing→ payout submitted to the bank network
- core.transaction.status-changed
status: completed→ funds delivered to the user’s bankstatus: failed→ irrecoverable error
- core.transaction.created
- Polling (fallback): Get transaction
Notify the user
Display an in-app confirmation when the transaction iscompleted, and send an email if applicable.
You now support ACH bank transfer withdrawals via the Payment Widget.