
Before interacting with the Bridge widget, ensure you have created a customer in Straddle. For details on customer creation, see the Customers Guide.
Overview
1
Your user initiates the bank account linking process in your application
Users click a button or link to initiate the process.
2
Generate a Bridge session token on your server
Return the session’s
bridge_token to your client application.3
Initiate the open banking flow
Pass the
bridge_token to your implementation of Bridge.4
Handle the widget callback
Process the response and save the generated paykey after successful account linking.
Implementation Options
Straddle offers multiple ways to integrate the Widget into your application. Choose the option that best fits your development environment and requirements.Hosted Script
Hosted Script
The simplest way to implement the Bridge widget is by using our hosted script. This method is ideal for quick integrations and applications without a specific JavaScript framework.
JavaScript Package
JavaScript Package
For applications using vanilla JavaScript or other frameworks, we offer a JavaScript package that provides more flexibility in implementation.Install the package:orUse the package in your JavaScript code:
Check out our GitHub repository for the latest updates and additional resources.
React Package
React Package
For React applications, we provide a dedicated npm package that offers a more integrated experience with your React components.Install the package:orUse the Bridge component in your React application:
Check out our GitHub repository for the latest updates and additional resources.
Implementation Guide
1. Generate a Bridge Token
In your backend, generate a Bridge session token for the customer:2. Initialize the Widget
Once you have the Bridge token, initialize the widget using your chosen implementation method (hosted script, JavaScript package, or React package).3. Handle the Widget Callback
In theonSuccess callback, you’ll receive a paykey object. This object contains all the necessary information about the connected bank account, without exposing sensitive details to your frontend.
active: The paykey is verified and ready for payments.review: The paykey was created but requires your review. Save the paykey, retrieve its verification details, and accept or reject it in the Dashboard or through the review endpoint. Payments submitted with the paykey remain on hold until the review is resolved.
Next Steps
After receiving anactive paykey, you can start creating payments. For a paykey in review, follow the review workflow before treating it as active. For more information, see the following guides:
- Working with Paykeys: Learn how to use paykeys for secure account-to-account payments.
- Creating Payments: Understand the process of initiating payments using paykeys.
- Onboarding Customers: Explore how to manage customer accounts and information.