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 deposit method
The widget lets the user select an FPS deposit method and view the transfer instructions.Create a widget session
Call the Create widget session endpoint to create a session for theselect-for-deposit flow.
session object. Pass response.session to your frontend to initialize the widget.
Set up the widget
Initialize the widget for theselect-for-deposit 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 deposit method and completes the flow.
via— is set todeposit-methodwhen the user selects a deposit method and completes the flow.selection— contains theaccountthat will receive the funds and thedepositMethodconfiguration with transfer instructions.
depositMethod.details contains:
Handle cancellations
Thecancel event fires when the user closes the widget without selecting a deposit method.
Handle errors
Theerror event fires when an error occurs during the deposit method selection process.
Monitor for the incoming transfer
The widget presents the deposit instructions to the user but does not monitor for the incoming transfer. Your application must do this via webhooks or polling.- Webhook events (recommended):
- core.transaction.created
status: processing→ bank transfer received, pending posting
- core.transaction.status-changed
status: completed→ funds settledstatus: failed→ irrecoverable error
- core.transaction.created
- Polling (fallback): Get transaction
Sample transaction
In a successful FPS deposit, the origin is represented as anexternal-account node. This is because the origin bank details are automatically registered as an external account. The destination is the account selected when the deposit instructions were generated, or the user’s default GBP account if the transfer was sent without a reference, or the selected account doesn’t exist anymore.
Notify the user
Display an in-app confirmation when the transaction iscompleted, and send an email if applicable.
You now support FPS bank transfer deposits via the Payment Widget.