List Bank Accounts
curl --request GET \
--url https://api.stablepay.global/v2/users/{userId}/bank-accounts \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.stablepay.global/v2/users/{userId}/bank-accounts"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.stablepay.global/v2/users/{userId}/bank-accounts', 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.stablepay.global/v2/users/{userId}/bank-accounts",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
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://api.stablepay.global/v2/users/{userId}/bank-accounts"
req, _ := http.NewRequest("GET", 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.get("https://api.stablepay.global/v2/users/{userId}/bank-accounts")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.stablepay.global/v2/users/{userId}/bank-accounts")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_bodyUsers
List Bank Accounts
List a user’s bank accounts and see which one receives payouts
GET
/
v2
/
users
/
{userId}
/
bank-accounts
List Bank Accounts
curl --request GET \
--url https://api.stablepay.global/v2/users/{userId}/bank-accounts \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.stablepay.global/v2/users/{userId}/bank-accounts"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.stablepay.global/v2/users/{userId}/bank-accounts', 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.stablepay.global/v2/users/{userId}/bank-accounts",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
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://api.stablepay.global/v2/users/{userId}/bank-accounts"
req, _ := http.NewRequest("GET", 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.get("https://api.stablepay.global/v2/users/{userId}/bank-accounts")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.stablepay.global/v2/users/{userId}/bank-accounts")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_bodyList Bank Accounts
Returns every bank account on file for the user. Use it to see which account payouts go to (isPrimary) and to get the id you pass as bankAccountId on Create Transaction.
string
required
The user ID
string
Return only the account you registered with this
externalId (your own identifier, set on Verify Bank Account).Request
curl https://api.stablepay.global/v2/users/usr_abc123/bank-accounts \
-H "Authorization: Bearer YOUR_API_KEY"
Response
{
"success": true,
"data": [
{
"id": "3f2a9c14-6b0e-4d21-9a77-1c8e5b2f0d43",
"instrumentId": "3f2a9c14-6b0e-4d21-9a77-1c8e5b2f0d43",
"externalId": "pi_88213",
"maskedAccountNumber": "XXXXXX7890",
"ifsc": "HDFC0001234",
"bankName": "HDFC Bank",
"accountHolderName": "RAHUL KUMAR",
"verified": true,
"isPrimary": true,
"createdAt": "2026-03-06T10:00:00.000Z"
},
{
"id": "8b1d07e2-3c4f-4a90-b6d1-2e7f9a0c5b18",
"instrumentId": "8b1d07e2-3c4f-4a90-b6d1-2e7f9a0c5b18",
"externalId": "pi_90457",
"maskedAccountNumber": "XXXXXX4412",
"ifsc": "ICIC0000123",
"bankName": "ICICI Bank",
"accountHolderName": "RAHUL KUMAR",
"verified": true,
"isPrimary": false,
"createdAt": "2026-03-09T08:30:00.000Z"
}
]
}
instrumentId carries the same value as id under a currency-neutral name.
Choosing where a payout goes
- One payout: pass
bankAccountIdonPOST /v2/transactions(pool_settlement). Only that payout is affected. - All future payouts: make the account primary with Set Primary Bank Account. Payouts without a
bankAccountIdgo to the primary account.
Errors
error | Description |
|---|---|
Not Found | User not found |
Internal Server Error | Unexpected failure |
