Skip to main content
The Bridge widget allows users to securely connect their bank accounts to your application. Unlike other open banking providers, Straddle handles data exchanges, retrieves bank details and owner information, and generates a secure payment token—without exposing sensitive information to your frontend.
Bridge Connection
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 users 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.
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.
For applications using vanilla JavaScript or other frameworks, we offer a JavaScript package that provides more flexibility in implementation.
Check out our GitHub repository for the latest updates and additional resources.
Install the package:
or
Use the package in your JavaScript code:
For React applications, we provide a dedicated npm package that offers a more integrated experience with your React components.
Check out our GitHub repository for the latest updates and additional resources.
Install the package:
or
Use the Bridge component in your React application:

Implementation Guide

1. Generate a Bridge Token

In your backend, generate a Bridge session token for the customer:
When creating a paykey, the account holder’s name is matched against the customer’s name. Therefore, when using the Bridge Widget and the MX open banking flow, to get an active paykey, the customer’s name must match the MX account holder’s name. In sandbox, the MX account holder’s name is hardcoded to Charlie Pouros.In sandbox, this behavior can be overriden by specifying a sandbox outcome in the request.

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 the onSuccess 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. Here’s an example of the paykey object you’ll receive:
Note that sensitive information like the full account number is masked for security reasons.

Next Steps

After successfully implementing the Bridge widget and generating a paykey, you can start creating payments. For more information, see the following guides: