# Requires: npm i -g @infinite_dev/cli && export INFINITE_API_KEY=sk_sandbox_...
# Escape hatch for any endpoint: infinite api <METHOD> <path>
infinite api POST /v1/external-bank-accounts/acc_abc123/closeClose an external account (acc_abc123).
# Infinite MCP is read-only for this endpoint — use a dedicated MCP tool when one exists, otherwise run the CLI tab.import requests
url = "https://sandbox.api.infinite.dev/v1/external-bank-accounts/{id}/close"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://sandbox.api.infinite.dev/v1/external-bank-accounts/{id}/close', 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://sandbox.api.infinite.dev/v1/external-bank-accounts/{id}/close",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://sandbox.api.infinite.dev/v1/external-bank-accounts/{id}/close"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://sandbox.api.infinite.dev/v1/external-bank-accounts/{id}/close")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://sandbox.api.infinite.dev/v1/external-bank-accounts/{id}/close")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"id": "eba_1234567890abcdef",
"customerId": "cust_abc123",
"type": "EXTERNAL_BANK",
"status": "IN_REVIEW",
"beneficiaryType": "INDIVIDUAL",
"beneficiaryName": "John Smith",
"paymentRail": "SWIFT",
"createdAt": "2026-01-15T10:00:00Z",
"updatedAt": "2026-01-15T10:00:00Z",
"counterpartyId": "cp_abc123",
"metadata": {
"nickname": "Main Checking Account",
"purpose": "Business operations",
"tags": [
"primary",
"operations"
]
},
"paymentRails": [
"ACH",
"ACH_SAME_DAY",
"WIRE"
],
"beneficiaryAddress": {
"addressLine1": "123 Main Street",
"addressLine2": "Suite 100",
"city": "New York",
"state": "NY",
"postalCode": "10001",
"country": "US"
},
"beneficiaryPhone": "+12125551234",
"beneficiaryDateOfBirth": "1990-01-31",
"bankName": "JPMorgan Chase Bank",
"bankAddress": {
"addressLine1": "270 Park Avenue",
"addressLine2": "Floor 10",
"city": "New York",
"state": "NY",
"postalCode": "10017",
"country": "US"
},
"swiftBic": "CHASUS33",
"iban": "GB82WEST12345698765432",
"accountNumber": "1234567890",
"routingNumber": "021000021",
"branchCode": "001",
"beneficiaryDocumentType": "CC",
"beneficiaryDocumentNumber": "12345678901",
"beneficiaryStateProvince": "LIMA",
"correspondentBankName": "Bank of America",
"correspondentBankSwiftCode": "IRVTUS3NXXX",
"correspondentAccountNumber": "9876543210",
"bankAccountType": "checking",
"currencyCodes": [
"USD",
"EUR"
],
"aliasType": "TAX_ID",
"aliasValue": "12345678901",
"created": true
}Close an external account
Closes an active external account. Accounts still in review cannot be closed. The account can no longer be used as a transfer or FX destination, and linked fixed routes are disabled. Creating an external account later with the same bank details or proxy alias reopens this account with the same ID. Disabled fixed routes are not re-enabled automatically.
# Requires: npm i -g @infinite_dev/cli && export INFINITE_API_KEY=sk_sandbox_...
# Escape hatch for any endpoint: infinite api <METHOD> <path>
infinite api POST /v1/external-bank-accounts/acc_abc123/closeClose an external account (acc_abc123).
# Infinite MCP is read-only for this endpoint — use a dedicated MCP tool when one exists, otherwise run the CLI tab.import requests
url = "https://sandbox.api.infinite.dev/v1/external-bank-accounts/{id}/close"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://sandbox.api.infinite.dev/v1/external-bank-accounts/{id}/close', 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://sandbox.api.infinite.dev/v1/external-bank-accounts/{id}/close",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://sandbox.api.infinite.dev/v1/external-bank-accounts/{id}/close"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://sandbox.api.infinite.dev/v1/external-bank-accounts/{id}/close")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://sandbox.api.infinite.dev/v1/external-bank-accounts/{id}/close")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"id": "eba_1234567890abcdef",
"customerId": "cust_abc123",
"type": "EXTERNAL_BANK",
"status": "IN_REVIEW",
"beneficiaryType": "INDIVIDUAL",
"beneficiaryName": "John Smith",
"paymentRail": "SWIFT",
"createdAt": "2026-01-15T10:00:00Z",
"updatedAt": "2026-01-15T10:00:00Z",
"counterpartyId": "cp_abc123",
"metadata": {
"nickname": "Main Checking Account",
"purpose": "Business operations",
"tags": [
"primary",
"operations"
]
},
"paymentRails": [
"ACH",
"ACH_SAME_DAY",
"WIRE"
],
"beneficiaryAddress": {
"addressLine1": "123 Main Street",
"addressLine2": "Suite 100",
"city": "New York",
"state": "NY",
"postalCode": "10001",
"country": "US"
},
"beneficiaryPhone": "+12125551234",
"beneficiaryDateOfBirth": "1990-01-31",
"bankName": "JPMorgan Chase Bank",
"bankAddress": {
"addressLine1": "270 Park Avenue",
"addressLine2": "Floor 10",
"city": "New York",
"state": "NY",
"postalCode": "10017",
"country": "US"
},
"swiftBic": "CHASUS33",
"iban": "GB82WEST12345698765432",
"accountNumber": "1234567890",
"routingNumber": "021000021",
"branchCode": "001",
"beneficiaryDocumentType": "CC",
"beneficiaryDocumentNumber": "12345678901",
"beneficiaryStateProvince": "LIMA",
"correspondentBankName": "Bank of America",
"correspondentBankSwiftCode": "IRVTUS3NXXX",
"correspondentAccountNumber": "9876543210",
"bankAccountType": "checking",
"currencyCodes": [
"USD",
"EUR"
],
"aliasType": "TAX_ID",
"aliasValue": "12345678901",
"created": true
}Response
External account closed successfully
Primary payment rail for this account
ACH, ACH_SAME_DAY, WIRE, FEDWIRE, FED_NOW, RTP, EREBOR, EREBOR_RAIL, BALANCE, SWIFT, SEPA, SEPA_INSTANT, TIPS, FASTER_PAYMENTS, BACS, CHAPS, ELIXIR, NICS, EFT, INTERAC, NPP, BECS, UPI, IMPS, IMPS_WITH_FIRC, NEFT, RTGS, BI_FAST, ARTAJASA, PIX, TED, TEF, SPEI, COELSA, SINPE, CNAPS, CIPS, CFXPS, CHATS, ZENGIN, KFTC, FAST_SG, MEPS, DUITNOW, PROMPTPAY, INSTAPAY, PESONET, NAPAS, BEFTN, SLIPS, ZAHAV, GHIPSS, NIBSS, PESALINK, RTC_ZA, TZS_RTGS, EGP_ACH, JOD_ACH, NPSS, MADA, QPS, DOP_ACH, GTQ_ACH, HNL_ACH, PEN_ACH, JMD_ACH, USD_ACH_SV, USD_ACH_EC, CLP_TEF, PSE, COP_ACH, BOB_RTGS, PYG_ACH, CERTIS, DKK_TIPS, SENT, NKS, BANKGIROT, HKD_FPS, IBFT, TRY_FAST "SWIFT"
All payment rails this account supports (bank accounts only)
ACH, ACH_SAME_DAY, WIRE, FEDWIRE, FED_NOW, RTP, EREBOR, EREBOR_RAIL, BALANCE, SWIFT, SEPA, SEPA_INSTANT, TIPS, FASTER_PAYMENTS, BACS, CHAPS, ELIXIR, NICS, EFT, INTERAC, NPP, BECS, UPI, IMPS, IMPS_WITH_FIRC, NEFT, RTGS, BI_FAST, ARTAJASA, PIX, TED, TEF, SPEI, COELSA, SINPE, CNAPS, CIPS, CFXPS, CHATS, ZENGIN, KFTC, FAST_SG, MEPS, DUITNOW, PROMPTPAY, INSTAPAY, PESONET, NAPAS, BEFTN, SLIPS, ZAHAV, GHIPSS, NIBSS, PESALINK, RTC_ZA, TZS_RTGS, EGP_ACH, JOD_ACH, NPSS, MADA, QPS, DOP_ACH, GTQ_ACH, HNL_ACH, PEN_ACH, JMD_ACH, USD_ACH_SV, USD_ACH_EC, CLP_TEF, PSE, COP_ACH, BOB_RTGS, PYG_ACH, CERTIS, DKK_TIPS, SENT, NKS, BANKGIROT, HKD_FPS, IBFT, TRY_FAST ["ACH", "ACH_SAME_DAY", "WIRE"]
Present on create responses. true = a new account was inserted. false = an existing account matched (bank: customer + the exact normalized identifier set supplied; proxy: customer + alias + rail) and was reused. For bank accounts, existing paymentRails are not updated by create — use PATCH to add rails; missing create-only fields may still be backfilled and conflicting values return 400. For proxy accounts, inspect paymentRail (proxies do not return paymentRails).
true
Was this page helpful?