curl --request PATCH \
--url https://api.spherepay.co/v2/bank-account/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"networks": [
"wire",
"ach"
]
}
'import requests
url = "https://api.spherepay.co/v2/bank-account/{id}"
payload = { "networks": ["wire", "ach"] }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({networks: ['wire', 'ach']})
};
fetch('https://api.spherepay.co/v2/bank-account/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.spherepay.co/v2/bank-account/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'networks' => [
'wire',
'ach'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.spherepay.co/v2/bank-account/{id}"
payload := strings.NewReader("{\n \"networks\": [\n \"wire\",\n \"ach\"\n ]\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://api.spherepay.co/v2/bank-account/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"networks\": [\n \"wire\",\n \"ach\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.spherepay.co/v2/bank-account/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"networks\": [\n \"wire\",\n \"ach\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"accountDetails": {
"accountNumber": "****7890",
"accountType": "checking",
"routingNumber": "021000021"
},
"accountName": "Checking Account",
"accountOwner": {
"accountHolderName": "John Doe",
"relationship": "self"
},
"bankName": "Bank of America",
"created": "2025-01-01T00:00:00Z",
"currency": "usd",
"customerId": "customer_66c4168d418a410eae282b83883bdc39",
"id": "bankAccount_ce745ef7f3df4b9a8bff1301ce24b045",
"networks": [
"wire",
"ach"
],
"status": "active",
"updated": "2025-01-01T00:00:00Z"
}{
"code": "address/invalid",
"correlationId": "28c61e885c6e5eaa78c1a2183a9b883c",
"detail": "Invalid request parameters",
"status": 400
}{
"code": "resource/not-found",
"correlationId": "28c61e885c6e5eaa78c1a2183a9b883c",
"detail": "Resource not found",
"status": 404
}{
"code": "validation/failed",
"correlationId": "28c61e885c6e5eaa78c1a2183a9b883c",
"detail": "Validation failed",
"errors": [
{
"detail": "Invalid email format",
"pointer": "/email"
},
{
"detail": "Name is required",
"pointer": "/name"
}
],
"status": 422
}Atualizar Configurações de Rail da Conta Bancária
Update a bank account by its ID. Update either the networks on a non-SWIFT account, or the intermediary BIC on a USD SWIFT account that does not already have one.
curl --request PATCH \
--url https://api.spherepay.co/v2/bank-account/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"networks": [
"wire",
"ach"
]
}
'import requests
url = "https://api.spherepay.co/v2/bank-account/{id}"
payload = { "networks": ["wire", "ach"] }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({networks: ['wire', 'ach']})
};
fetch('https://api.spherepay.co/v2/bank-account/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.spherepay.co/v2/bank-account/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'networks' => [
'wire',
'ach'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.spherepay.co/v2/bank-account/{id}"
payload := strings.NewReader("{\n \"networks\": [\n \"wire\",\n \"ach\"\n ]\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://api.spherepay.co/v2/bank-account/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"networks\": [\n \"wire\",\n \"ach\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.spherepay.co/v2/bank-account/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"networks\": [\n \"wire\",\n \"ach\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"accountDetails": {
"accountNumber": "****7890",
"accountType": "checking",
"routingNumber": "021000021"
},
"accountName": "Checking Account",
"accountOwner": {
"accountHolderName": "John Doe",
"relationship": "self"
},
"bankName": "Bank of America",
"created": "2025-01-01T00:00:00Z",
"currency": "usd",
"customerId": "customer_66c4168d418a410eae282b83883bdc39",
"id": "bankAccount_ce745ef7f3df4b9a8bff1301ce24b045",
"networks": [
"wire",
"ach"
],
"status": "active",
"updated": "2025-01-01T00:00:00Z"
}{
"code": "address/invalid",
"correlationId": "28c61e885c6e5eaa78c1a2183a9b883c",
"detail": "Invalid request parameters",
"status": 400
}{
"code": "resource/not-found",
"correlationId": "28c61e885c6e5eaa78c1a2183a9b883c",
"detail": "Resource not found",
"status": 404
}{
"code": "validation/failed",
"correlationId": "28c61e885c6e5eaa78c1a2183a9b883c",
"detail": "Validation failed",
"errors": [
{
"detail": "Invalid email format",
"pointer": "/email"
},
{
"detail": "Name is required",
"pointer": "/name"
}
],
"status": 422
}networks, que controla quais rails de pagamento estão habilitados para a conta. O novo valor de networks deve ser compatível com a moeda da conta — você não pode adicionar uma rede incompatível após a criação.Autorizações
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Parâmetros de caminho
The bank account ID
1"bankAccount_ce745ef7f3df4b9a8bff1301ce24b045"
Corpo
- Networks
- IntermediaryBics
The payment networks supported by this bank account. Must match the bank account currency: USD accounts support ["ach", "wire"], EUR accounts support ["sepa"], BRL accounts support ["pix"].
1ach, wire, sepa, pix ["wire", "ach"]
Resposta
- USD
- EUR
- BRL
- MXN
USD account details. For ACH/Wire: accountNumber, routingNumber, accountType. For SWIFT: accountNumber (masked), bic.
- Option 1
- Option 2
Show child attributes
Show child attributes
A descriptive name for this bank account.
"Checking Account"
Information about the account owner, including their name and relationship to the customer.
Show child attributes
Show child attributes
The name of the financial institution where the account is held.
"Bank of America"
The ISO 8601 timestamp when the bank account was created.
"2025-01-01T00:00:00Z"
The currency of the bank account.
usd "usd"
The unique identifier of the customer who owns this bank account.
"customer_66c4168d418a410eae282b83883bdc39"
The unique identifier of the bank account.
"bankAccount_ce745ef7f3df4b9a8bff1301ce24b045"
The payment networks supported by this bank account. For USD ACH/Wire accounts, includes at least one of "ach" or "wire". For USD SWIFT accounts, is exactly ["swift"].
ach, wire ["wire", "ach"]
The current status of the bank account.
pending, active, inactive, invalid "active"
The ISO 8601 timestamp when the bank account was last updated.
"2025-01-01T00:00:00Z"