Skip to main content
POST
/
v1
/
bridge
/
bank_account
cURL
curl --request POST \
  --header 'Authorization: Bearer YOUR_SECRET_API_KEY' \
  --url https://sandbox.straddle.com/v1/bridge/bank_account \
  --header 'Content-Type: application/json' \
  --data '{
  "customer_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
  "routing_number": "<string>",
  "account_number": "<string>",
  "account_type": "checking"
}'
import Straddle from '@straddlecom/straddle';

const client = new Straddle({
apiKey: process.env['STRADDLE_API_KEY'], // This is the default and can be omitted
});

async function main() {
const paykeyV1 = await client.bridge.link.bankAccount({
account_number: 'account_number',
account_type: 'checking',
customer_id: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
routing_number: 'xxxxxxxxx',
});

console.log(paykeyV1.data);
}

main();
import os
from straddle import Straddle

client = Straddle(
api_key=os.environ.get("STRADDLE_API_KEY"), # This is the default and can be omitted
)
paykey_v1 = client.bridge.link.bank_account(
account_number="account_number",
account_type="checking",
customer_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
routing_number="xxxxxxxxx",
)
print(paykey_v1.data)
require "straddle"

straddle = Straddle::Client.new(
api_key: ENV["STRADDLE_API_KEY"], # This is the default and can be omitted
environment: "production" # defaults to "sandbox"
)

paykey_v1 = straddle.bridge.link.bank_account(
account_number: "account_number",
account_type: :checking,
customer_id: "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
routing_number: "xxxxxxxxx"
)

puts(paykey_v1)
{
  "meta": {
    "api_request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "api_request_timestamp": "2023-11-07T05:31:56Z"
  },
  "data": {
    "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "label": "<string>",
    "status": "active",
    "created_at": "2023-11-07T05:31:56Z",
    "updated_at": "2023-11-07T05:31:56Z",
    "paykey": "<string>",
    "config": {},
    "customer_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "institution_name": "Bank of America",
    "status_details": {
      "message": "Bank account sucesfully validated",
      "changed_at": "2023-11-07T05:31:56Z",
      "code": "<string>"
    },
    "expires_at": "2023-11-07T05:31:56Z",
    "bank_data": {
      "routing_number": "021000021",
      "account_number": "****1234"
    },
    "metadata": {},
    "balance": {
      "account_balance": 123,
      "updated_at": "2023-11-07T05:31:56Z"
    },
    "external_id": "<string>",
    "unblock_eligible": true
  }
}
{
"meta": {
"api_request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"api_request_timestamp": "2023-11-07T05:31:56Z"
},
"error": {
"status": 123,
"type": "<string>",
"title": "<string>",
"detail": "<string>",
"items": [
{
"detail": "<string>",
"reference": "<string>"
}
]
}
}
{
"meta": {
"api_request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"api_request_timestamp": "2023-11-07T05:31:56Z"
},
"error": {
"status": 123,
"type": "<string>",
"title": "<string>",
"detail": "<string>",
"items": [
{
"detail": "<string>",
"reference": "<string>"
}
]
}
}
{
"meta": {
"api_request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"api_request_timestamp": "2023-11-07T05:31:56Z"
},
"error": {
"status": 123,
"type": "<string>",
"title": "<string>",
"detail": "<string>",
"items": [
{
"detail": "<string>",
"reference": "<string>"
}
]
}
}
{
"meta": {
"api_request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"api_request_timestamp": "2023-11-07T05:31:56Z"
},
"error": {
"status": 123,
"type": "<string>",
"title": "<string>",
"detail": "<string>",
"items": [
{
"detail": "<string>",
"reference": "<string>"
}
]
}
}
{
"meta": {
"api_request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"api_request_timestamp": "2023-11-07T05:31:56Z"
},
"error": {
"status": 123,
"type": "<string>",
"title": "<string>",
"detail": "<string>",
"items": [
{
"detail": "<string>",
"reference": "<string>"
}
]
}
}

Authorizations

Authorization
string
header
required

Use your Straddle API Key in the Authorization header as Bearer to authorize API requests.

Headers

Straddle-Account-Id
string<uuid>

For use by platforms to specify an account id and set scope of a request.

Request-Id
string

Optional client generated identifier to trace and debug a request.

Correlation-Id
string

Optional client generated identifier to trace and debug a series of requests.

Idempotency-Key
string

Optional client generated value to use for idempotent requests.

Required string length: 10 - 40

Body

customer_id
string<uuid>
required

Unique identifier of the related customer object.

routing_number
string
required

The routing number of the bank account.

Required string length: 9
account_number
string
required

The bank account number.

account_type
enum<string>
required
Available options:
checking,
savings
metadata
object | null

Up to 20 additional user-defined key-value pairs. Useful for storing additional information about the paykey in a structured format.

config
object
external_id
string | null

Unique identifier for the paykey in your database, used for cross-referencing between Straddle and your systems.

Response

Created

meta
object
required

Metadata about the API request, including an identifier and timestamp.

response_type
enum<string>
required

Indicates the structure of the returned content.

  • "object" means the data field contains a single JSON object.
  • "array" means the data field contains an array of objects.
  • "error" means the data field contains an error object with details of the issue.
  • "none" means no data is returned.
Available options:
object,
array,
error,
none
data
object
required