cURL
curl --request GET \
--url https://api.sandbox.capa.fi/api/partner/v2/banks/users/{userId}/accounts \
--header 'partner-api-key: <api-key>'import requests
url = "https://api.sandbox.capa.fi/api/partner/v2/banks/users/{userId}/accounts"
headers = {"partner-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'partner-api-key': '<api-key>'}};
fetch('https://api.sandbox.capa.fi/api/partner/v2/banks/users/{userId}/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.sandbox.capa.fi/api/partner/v2/banks/users/{userId}/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 => [
"partner-api-key: <api-key>"
],
]);
$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.sandbox.capa.fi/api/partner/v2/banks/users/{userId}/accounts"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("partner-api-key", "<api-key>")
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.sandbox.capa.fi/api/partner/v2/banks/users/{userId}/accounts")
.header("partner-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sandbox.capa.fi/api/partner/v2/banks/users/{userId}/accounts")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["partner-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"count": 5,
"total": 10,
"data": [
{
"id": "string",
"userId": "string",
"partnerId": "string",
"bankName": "string",
"accountNumber": "string",
"accountType": "SAVINGS",
"clabe": "string",
"country": "MX",
"rampType": "ON_RAMP",
"documentNumber": "string",
"documentType": "PASSPORT",
"alias": "string",
"isVerified": true,
"verificationStatus": "PENDING",
"verifiedAt": null,
"createdAt": "string",
"updatedAt": "string"
}
]
}
}Bank Accounts
List Bank Accounts (User)
GET
/
api
/
partner
/
v2
/
banks
/
users
/
{userId}
/
accounts
cURL
curl --request GET \
--url https://api.sandbox.capa.fi/api/partner/v2/banks/users/{userId}/accounts \
--header 'partner-api-key: <api-key>'import requests
url = "https://api.sandbox.capa.fi/api/partner/v2/banks/users/{userId}/accounts"
headers = {"partner-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'partner-api-key': '<api-key>'}};
fetch('https://api.sandbox.capa.fi/api/partner/v2/banks/users/{userId}/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.sandbox.capa.fi/api/partner/v2/banks/users/{userId}/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 => [
"partner-api-key: <api-key>"
],
]);
$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.sandbox.capa.fi/api/partner/v2/banks/users/{userId}/accounts"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("partner-api-key", "<api-key>")
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.sandbox.capa.fi/api/partner/v2/banks/users/{userId}/accounts")
.header("partner-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sandbox.capa.fi/api/partner/v2/banks/users/{userId}/accounts")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["partner-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"count": 5,
"total": 10,
"data": [
{
"id": "string",
"userId": "string",
"partnerId": "string",
"bankName": "string",
"accountNumber": "string",
"accountType": "SAVINGS",
"clabe": "string",
"country": "MX",
"rampType": "ON_RAMP",
"documentNumber": "string",
"documentType": "PASSPORT",
"alias": "string",
"isVerified": true,
"verificationStatus": "PENDING",
"verifiedAt": null,
"createdAt": "string",
"updatedAt": "string"
}
]
}
}Retrieves bank accounts for a user with pagination. Supports filtering by country, ramp type, or fetching a specific account by ID.
Error Codes
Common Errors
| HTTP Status | Code | Message |
|---|---|---|
| 401 | UNAUTHORIZED | ”API Key is missing” |
| 401 | UNAUTHORIZED | ”Invalid API Key format” |
| 401 | UNAUTHORIZED | ”Invalid API Key” |
| 403 | INVALID_PARTNER_FLOW | ”The partner has an invalid flow.” |
User Ownership Errors
| HTTP Status | Code | Message |
|---|---|---|
| 401 | UNAUTHORIZED | ”Partner information is required for this operation” |
| 401 | UNAUTHORIZED | ”User is not associated with the partner” |
Endpoint-Specific Errors
| HTTP Status | Code | Message |
|---|---|---|
| 400 | INVALID_USER_INPUT_ERROR | ”Invalid User Input” |
Authorizations
API key for the affiliated partner performing the request.
Path Parameters
The user ID to get bank info for
Example:
"8374f327-38bd-4b0b-b8a7-2524599eb903"
Query Parameters
Country filter
Available options:
MX, DO, US, AT, BE, BG, HR, CY, CZ, DK, EE, FI, FR, DE, GR, HU, IE, IT, LV, LT, LU, MT, NL, PL, PT, RO, SK, SI, ES, SE, IS, LI, NO, CH, GB, MC, SM, AD, VA, CN Ramp type filter (ON_RAMP or OFF_RAMP)
Available options:
ON_RAMP, OFF_RAMP, CROSS_RAMP User bank info ID to fetch a specific bank account
The number of elements to exclude from the results.
The maximum amount of results to return.
Supported values:
- createdAt