Prerequisites
- The user has completed onboarding and has the required capabilities enabled.
- The Payment Widget SDK is installed in your frontend. See Installation and setup.
Walkthrough
Select source account
FPS withdrawals can be sourced from any account. If the selected account is not in GBP, 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 FPS-linked bank account.Create a widget session
Call the Create widget session endpoint to create a session for theselect-for-withdrawal flow.
session object. Pass response.session to your frontend 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
Thecomplete event fires when the user selects a bank account and completes the flow.
via— set toexternal-accountwhen the user selects a saved bank account.selection— an external account object with the selected bank details.
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
To initiate the withdrawal, call Create quote with the origin as the user’s account and the destination as the selected FPS external account. Specify the amount and asset for the withdrawal.quote object with details about the withdrawal, including 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 FPS bank transfer withdrawals via the Payment Widget.