sFOX API
Sign InOpen Account
Connect API
Connect API
  • Introduction
    • Welcome
    • Getting Started
    • Resources
      • Terminology
      • Systems & Operations
      • Integration Options
    • Guides
      • End User Onboarding & KYC
        • Individuals
        • Businesses
        • Enhanced Due Diligence
  • REST API
    • REST Endpoints
    • Authentication
    • End Users
      • Create End User Account
      • Request Verification Code
      • Confirm Verification Code
      • Create User Auth Token(s)
      • Get End User(s)
      • Get EDD Requests
      • Get EDD Prompts
      • Create EDD Responses
        • Uploading Files as Responses
      • Submit Documents
      • Deactivate User
    • Payments
      • Create Bank Account (Plaid)
      • Create Bank Account
      • Get Bank Account
      • Get Plaid Processors
      • Amend Plaid Processors
      • Verify Bank Account
      • Delete Bank Account
      • Get Wire Instructions
      • Get ACH Agreement Status
      • Request ACH Onboarding
      • Get ACH Deposit Limit
    • Withdrawals
      • Confirm Withdrawal
      • Resend Confirmation Code
      • Cancel Withdrawal
    • Transfers
      • Create Transfer
      • Confirm Transfer
      • Resend Confirmation Code
      • Cancel Transfer
      • Get Transfer Permissions
      • Get Transfer History
    • Monetization
      • Create Setting
      • Update Setting
      • Delete Setting
      • Get Settings
      • Get Permissions
      • Get Monetization History
  • WebSocket API
    • Connecting
    • Authentication
    • Subscribing & Unsubscribing
    • Message Format
    • End Users
      • Onboarding
      • Balances
      • Orders
      • Trades
    • Market Data
      • Order Book
      • Trades
      • Ticker
  • Single Sign-On
    • Overview
      • IdP Initiated SSO
    • IdP Data
    • SAML Response Data
  • Errors
    • Error Codes
Powered by GitBook
On this page
  • Request
  • Body Parameters
  • Example Requests
  • Responses
  • Request Body Examples
  1. REST API
  2. Payments

Create Bank Account

PreviousCreate Bank Account (Plaid)NextGet Bank Account

Last updated 1 day ago

POST

https://api.sfox.com/v1/user/bank

Link an end user's bank account.


Request

  • Requires a for authentication. Requests attempted using an Connect API Key will result in an error.

  • sFOX accounts only support one linked bank account at a time. If you would like to add a different bank, you must .

Body Parameters

Name
Type
Description

type required

string

Whether the bank account is for an individual or corporation. Possible values:

individual or corporate

bankAccountType required

string

Whether the bank account is a checking or savings account. Possible values: checking or savings

isInternational required

boolean

If the bank account is from an international bank. (US = False, International = True)

accountnumber required

string

Account number of the bank account.

routingnumber

string

Routing number of the bank. Required if isInternational = False

swiftnumber

string

SWIFT number of the bank. Required if isInternational = True

enableWires required

boolean

Whether the bank account is enabled to process wire transfers.

firstname required

string

First name on bank account. If type = corporate, specify the first name of the person who is the primary owner of the account.

lastname required

string

Last name on bank account. If type = corporate, specify the last name of the person who is the primary owner of the account.

name

string

Name of the business on the bank account. Required if type = corporate

bankCurrency

string

Currency code that the bank account transacts in. e.g. usd

bankname

string

Name of the bank. Required if isInternational = True

wireInstructions

string

Memo/correspondent bank/for further credit. Only applicable if isInternational = True

wireRoutingnumber

string

Routing number for wire transactions. Required if isInternational = False

Example Requests

curl -X POST \
  -H 'Content-type: application/json' \
  -H "Authorization: Bearer ${USER_AUTH_TOKEN}" \
  --data '{ "accountnumber": "123456789",
          "bankAccountType": "checking",
          "bankCurrency": "usd",
          "enableWires": true,
          "firstname": "Sean",
          "isInternational": false,
          "lastname": "Fox",
          "name": "Sean Fox",
          "routingnumber": "987654321",
          "type": "individual",
          "wireRoutingnumber": "987654321" }'  \
  'https://api.sfox.com/v1/user/bank'
const axios = require('axios');

const data = JSON.stringify({
    accountnumber: '123456789',
    bankAccountType: 'checking',
    bankCurrency: 'usd',
    enableWires: true,
    firstname: 'Sean',
    isInternational: false,
    lastname: 'Fox',
    name: 'Sean Fox',
    routingnumber: '987654321',
    type: 'individual',
    wireRoutingnumber: '987654321'
  }
)

const config = {
  method: 'post',
  url: 'https://api.sfox.com/v1/user/bank',
  headers: {
    "Content-Type": "application/json",
    'Authorization': `Bearer ${process.env.USER_AUTH_TOKEN}`
  },
  data: data
}

axios(config)
    .then((response) => {
      console.log(response.status)
      console.log(response.data)
    })
    .catch(err => {
      console.error(err.response.status)
      console.error(err.response.data)
    });
import requests
import os

data = requests.post(
  "https://api.sfox.com/v1/user/bank",
  headers={
    "Authorization": f"Bearer {os.environ['USER_AUTH_TOKEN']}"
  },
  json={
    "accountnumber": "123456789",
    "bankAccountType": "checking",
    "bankCurrency": "usd",
    "enableWires": true,
    "firstname": "Sean",
    "isInternational": false,
    "lastname": "Fox",
    "name": "Sean Fox",
    "routingnumber": "987654321",
    "type": "individual",
    "wireRoutingnumber": "987654321"
  }
)
print(data.status_code)
print(data.json())

Responses

200: OK
{
    "usd": [
        {
            "id": "68983724-00da-11ef-862d-026c8f2aefd1",
            "status": "active",
            "requires_verification": 0,
            "requires_support": 0,
            "routing_number": "*****5821",
            "account_number": "*****14",
            "name1": "Sean Fox",
            "currency": "usd",
            "type": "checking",
            "bank_name": "US BANK NA",
            "ach_enabled": false,
            "international_bank": false,
            "ref_id": "aY1nN",
            "wire_withdrawal_fee": 30
        }
    ]
}

Request Body Examples

{
    "accountnumber": "123456789",
    "bankAccountType": "checking",
    "bankCurrency": "usd",
    "enableWires": true,
    "firstname": "Sean",
    "isInternational": false,
    "lastname": "Fox",
    "name": "Sean Fox",
    "routingnumber": "987654321",
    "type": "individual",
    "wireRoutingnumber": "987654321"
}
{
    "accountnumber": "123456789",
    "bankAccountType": "checking",
    "bankCurrency": "usd",
    "bankname": "BCB Group",
    "enableWires": true,
    "firstname": "Sean",
    "isInternational": true,
    "lastname": "Fox",
    "name": "Sean Fox",
    "swiftnumber": "987654321",
    "type": "individual",
    "wireInstructions": ""
}
{
    "accountnumber": "123456789",
    "bankAccountType": "checking",
    "bankCurrency": "usd",
    "enableWires": true,
    "firstname": "Sean",
    "isInternational": false,
    "lastname": "Fox",
    "name": "Example Fund LP",
    "routingnumber": "987654321",
    "type": "corporate",
    "wireRoutingnumber": "987654321"
}
{
    "accountnumber": "123456789",
    "bankAccountType": "checking",
    "bankCurrency": "usd",
    "bankname": "BCB Group",
    "enableWires": true,
    "firstname": "Sean",
    "isInternational": true,
    "lastname": "Fox",
    "name": "Sean Fox Hedge Fund",
    "swiftnumber": "987654321",
    "type": "corporate",
    "wireInstructions": ""
}
User Auth Token
disconnect the currently linked bank