Bank account
Create Bank Account
AuthorizationBearer <token>
JWT Bearer token authentication
In: header
Path Parameters
customer_idstring
The customer's unique ID generated by SpherePay upon customer creation.
Pattern
"^customer_[a-z0-9]+$"
accountNamestring
A unique identifier to remember the bank account
bankNamestring
The name of the bank associated with the account, such as Bank of America
.
accountHolderName?string
The name of the account holder.
Length
length <= 35
currencystring
The currency code in which the bank account operates. Refer to our Currency Code for the full list.
Value in
"USD" | "EUR"
beneficiaryAddressobject
accountDetailsobject
accountNamestring
A unique identifier to remember the bank account
bankNamestring
The name of the bank associated with the account, such as Bank of America
.
accountHolderName?string
The name of the account holder.
Length
length <= 35
currencystring
The currency code in which the bank account operates. Refer to our Currency Code for the full list.
Value in
"USD" | "EUR"
beneficiaryAddressobject
accountDetailsobject
Response Body
curl -X POST "https://api.sandbox.spherepay.co/v2/customers/customer_1ab2c3d4/bank-account" \
-H "Content-Type: application/json" \
-d '{
"accountName": "wise",
"bankName": "wise",
"accountHolderName": "John Doe",
"currency": "usd",
"accountDetails": {
"accountNumber": "352777177759389",
"routingNumber": 84009519,
"accountType": "savings"
},
"beneficiaryAddress": {
"line1": "1 Main st",
"line2": "01-101",
"city": "Bentonville",
"postalCode": "12345",
"state": "AR",
"country": "USA"
}
}'
const body = JSON.stringify({
"accountName": "wise",
"bankName": "wise",
"accountHolderName": "John Doe",
"currency": "usd",
"accountDetails": {
"accountNumber": "352777177759389",
"routingNumber": 84009519,
"accountType": "savings"
},
"beneficiaryAddress": {
"line1": "1 Main st",
"line2": "01-101",
"city": "Bentonville",
"postalCode": "12345",
"state": "AR",
"country": "USA"
}
})
fetch("https://api.sandbox.spherepay.co/v2/customers/customer_1ab2c3d4/bank-account", {
body
})
package main
import (
"fmt"
"net/http"
"io/ioutil"
"strings"
)
func main() {
url := "https://api.sandbox.spherepay.co/v2/customers/customer_1ab2c3d4/bank-account"
body := strings.NewReader(`{
"accountName": "wise",
"bankName": "wise",
"accountHolderName": "John Doe",
"currency": "usd",
"accountDetails": {
"accountNumber": "352777177759389",
"routingNumber": 84009519,
"accountType": "savings"
},
"beneficiaryAddress": {
"line1": "1 Main st",
"line2": "01-101",
"city": "Bentonville",
"postalCode": "12345",
"state": "AR",
"country": "USA"
}
}`)
req, _ := http.NewRequest("POST", url, body)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := ioutil.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
import requests
url = "https://api.sandbox.spherepay.co/v2/customers/customer_1ab2c3d4/bank-account"
body = {
"accountName": "wise",
"bankName": "wise",
"accountHolderName": "John Doe",
"currency": "usd",
"accountDetails": {
"accountNumber": "352777177759389",
"routingNumber": 84009519,
"accountType": "savings"
},
"beneficiaryAddress": {
"line1": "1 Main st",
"line2": "01-101",
"city": "Bentonville",
"postalCode": "12345",
"state": "AR",
"country": "USA"
}
}
response = requests.request("POST", url, json = body, headers = {
"Content-Type": "application/json"
})
print(response.text)
{
"id": "bankAccount_1c19dcf3caaa447bb209df0e5d599e8d",
"status": "active",
"bankName": "Chase",
"accountHolderName": "John Mock-Doe",
"accountName": "Savings Account",
"customer": "customer_68f1c089703945e7bbff6f04bf1c5041",
"currency": "usd",
"accountDetails": {
"accountNumber": "**********6789",
"routingNumber": "**********6789",
"accountType": "checking | savings"
}
}
{
"ok": false,
"object": "error",
"statusCode": 500,
"error": {
"message": "Invalid enum value. Expected 'usd' | 'eur' | 'brl' | 'cad' | 'cop' | 'idr' | 'inr' | 'mxn' | 'php' | 'sgd' | 'thb' | 'vnd' | 'gbp', received 'brlx'",
"errors": {
"currency": [
"Invalid enum value. Expected 'usd' | 'eur' | 'brl' | 'cad' | 'cop' | 'idr' | 'inr' | 'mxn' | 'php' | 'sgd' | 'thb' | 'vnd' | 'gbp', received 'brlx'"
]
}
},
"message": "Invalid enum value. Expected 'usd' | 'eur' | 'brl' | 'cad' | 'cop' | 'idr' | 'inr' | 'mxn' | 'php' | 'sgd' | 'thb' | 'vnd' | 'gbp', received 'brlx'",
"data": null,
"ts": "2025-04-12T17:57:06.572Z",
"request": "request_1e9f6c83a0114008add80204fdd15f93"
}