The Bridge API allows you to create paykeys using raw bank account details.
This guide provides a detailed walkthrough on using Straddle’s Bridge API to create paykeys directly from bank account information.
1. Securely collect bank account information from the user
Ensure that bank account details such as the account number, routing number, and account holder’s name are collected securely through your frontend. Utilize encryption or tokenization to protect sensitive data.
2. Send the bank account details to your server
Once the bank account details are collected, send the information to your backend server over a secure connection (e.g., HTTPS). Your server should handle the data safely and securely for further processing.
3. Use the Straddle Bridge API to create a paykey
On your backend, send a request to the Straddle Bridge API with the bank account details to create a paykey. Straddle will return a paykey that can be used for future transactions without needing to store sensitive bank information.
4. Store and use the paykey for future transactions
Store the paykey
securely in your system. You can use this paykey
to create charges, initiate payments, or perform other transactions via Straddle’s API in the future, without handling sensitive bank data again.
To create a paykey using bank account details, make a POST request to the Straddle Bridge API. Here’s the HTTP request details:
Replace YOUR_STRADDLE_API_KEY
with your actual Straddle API key, and fill in the appropriate values for customer_id
, routing_number
, account_number
, and account_type
.
Upon successful creation of a paykey, the Straddle API will respond with a JSON object. Here’s an example of what you might receive: