The Bridge widget allows users to securely connect their bank accounts to your application. Unlike other open banking providers, Straddle handles all the data exchanges, retrieves bank details and owner information automatically, and generates a secure payment token, without exposing sensitive information to your frontend.

Before interacting with the Bridge widget, ensure you have created a customer in Straddle. For details on customer creation, please refer to 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.

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.

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 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:

{
   "data": {
      "paykey": "05f5d55cb14f7e8a0ec2e5689376e3b4665efc34834d30995babbd5010b39913",
      "bank_data": {
       "routing_number": "011000138",
       "account_number": "******7890",
       "account_type": "checking"
     },
     "id": "0191ef49-892c-7460-99d1-f5589d7d9989",
     "customer_id": "0191ef41-8de5-716c-bfa4-41cd79e85705",
     "label": "BANK OF AMERICA, N.A. - *7890",
     "source": "straddle",
     "institution_name": "BANK OF AMERICA, N.A.",
     "status": "active",
     "created_at": "2024-09-14T06:47:39.5648743Z",
     "updated_at": "2024-09-14T06:47:39.5648746Z"
   },
   "meta": {
     "api_request_id": "243431dd-7deb-4445-820d-55a942ace70f"
   },
   "response_type": "object"
 }

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 on these topics, please refer to the following guides: