Connected Accounts
List the businesses connected to your app, or fetch one.
Connected Accounts
GET /v1/connect/accounts · GET /v1/connect/accounts/:accountId
Read the businesses connected to your app with your own secret key — no ePay-Account header. Disconnected businesses aren't returned.
List accounts
GET /v1/connect/accounts?client_id=cp_live_…&limit=20&cursor=acct_…
Newest first. The key's mode must match the client ID's mode.
Nothing NestJS-specific here — this is the same Node.js client call.
Nothing Django-specific here — this is the same Python client call.
Nothing Flask-specific here — this is the same Python client call.
Nothing FastAPI-specific here — this is the same Python client call.
Nothing Laravel-specific here — this is the same PHP client call.
Nothing Spring Boot-specific here — this is the same Java client call.
curl "https://api.epayet.dev/v1/connect/accounts?client_id=cp_live_your_client_id&limit=20" \
-H "Authorization: Bearer sk_live_your_key_here"async function* connectedAccounts() {
let cursor: string | null = null;
do {
const url = new URL('https://api.epayet.dev/v1/connect/accounts');
url.searchParams.set('client_id', process.env.EPAY_CLIENT_ID!);
url.searchParams.set('limit', '100');
if (cursor) url.searchParams.set('cursor', cursor);
const res = await fetch(url, {
headers: { Authorization: `Bearer ${process.env.EPAY_SECRET_KEY}` },
});
if (!res.ok) throw new Error(`ePay ${res.status}: ${await res.text()}`);
const { data } = await res.json();
yield* data.data;
cursor = data.next_cursor;
} while (cursor);
}import os
import requests
def connected_accounts():
cursor = None
while True:
params = {"client_id": os.environ["EPAY_CLIENT_ID"], "limit": 100}
if cursor:
params["cursor"] = cursor
res = requests.get(
"https://api.epayet.dev/v1/connect/accounts",
headers={"Authorization": f"Bearer {os.environ['EPAY_SECRET_KEY']}"},
params=params,
timeout=30,
)
res.raise_for_status()
page = res.json()["data"]
yield from page["data"]
cursor = page["next_cursor"]
if not cursor:
break$cursor = null;
do {
$query = http_build_query(array_filter([
'client_id' => getenv('EPAY_CLIENT_ID'),
'limit' => 100,
'cursor' => $cursor,
]));
$ch = curl_init('https://api.epayet.dev/v1/connect/accounts?' . $query);
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ['Authorization: Bearer ' . getenv('EPAY_SECRET_KEY')],
]);
$page = json_decode(curl_exec($ch), true)['data'];
curl_close($ch);
foreach ($page['data'] as $account) {
handle_account($account);
}
$cursor = $page['next_cursor'];
} while ($cursor);cursor := ""
for {
q := url.Values{"client_id": {os.Getenv("EPAY_CLIENT_ID")}, "limit": {"100"}}
if cursor != "" {
q.Set("cursor", cursor)
}
req, _ := http.NewRequestWithContext(ctx, http.MethodGet,
"https://api.epayet.dev/v1/connect/accounts?"+q.Encode(), nil)
req.Header.Set("Authorization", "Bearer "+os.Getenv("EPAY_SECRET_KEY"))
res, err := http.DefaultClient.Do(req)
if err != nil {
return err
}
var out struct {
Data struct {
Data []map[string]any `json:"data"`
NextCursor *string `json:"next_cursor"`
} `json:"data"`
}
err = json.NewDecoder(res.Body).Decode(&out)
res.Body.Close()
if err != nil {
return err
}
handleAccounts(out.Data.Data)
if out.Data.NextCursor == nil {
return nil
}
cursor = *out.Data.NextCursor
}String cursor = null;
do {
String uri = "https://api.epayet.dev/v1/connect/accounts?limit=100&client_id="
+ System.getenv("EPAY_CLIENT_ID")
+ (cursor != null ? "&cursor=" + cursor : "");
HttpRequest request = HttpRequest.newBuilder(URI.create(uri))
.header("Authorization", "Bearer " + System.getenv("EPAY_SECRET_KEY"))
.GET()
.build();
HttpResponse<String> response =
HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
// Parse data.data (accounts) and data.next_cursor with your JSON library.
cursor = handlePage(response.body());
} while (cursor != null);Node.js SDK support is coming soon. Switch to for a working example in Node.js today.
Python SDK support is coming soon. Switch to for a working example in Python today.
PHP SDK support is coming soon. Switch to for a working example in PHP today.
Java SDK support is coming soon. Switch to for a working example in Java today.
Go SDK support is coming soon. Switch to for a working example in Go today.
Query Parameters
Prop
Type
Response
{
"status": "success",
"data": {
"data": [
{
"account_id": "acct_9Kd2mQ7xL4pR8sT1",
"object": "account",
"legal_name": "Restaurant X PLC",
"status": "active",
"scope": "read_write",
"livemode": true,
"livemode_enabled": true,
"connected_at": "2026-10-29T10:00:00.000Z",
"activated_at": "2026-10-30T08:12:00.000Z"
}
],
"has_more": false,
"next_cursor": null
}
}Retrieve an account
GET /v1/connect/accounts/:accountId
Works with either of your keys — an account isn't tied to the key's mode.
Nothing NestJS-specific here — this is the same Node.js client call.
Nothing Django-specific here — this is the same Python client call.
Nothing Flask-specific here — this is the same Python client call.
Nothing FastAPI-specific here — this is the same Python client call.
Nothing Laravel-specific here — this is the same PHP client call.
Nothing Spring Boot-specific here — this is the same Java client call.
curl https://api.epayet.dev/v1/connect/accounts/acct_9Kd2mQ7xL4pR8sT1 \
-H "Authorization: Bearer sk_live_your_key_here"const res = await fetch(
`https://api.epayet.dev/v1/connect/accounts/${accountId}`,
{ headers: { Authorization: `Bearer ${process.env.EPAY_SECRET_KEY}` } },
);
if (!res.ok) throw new Error(`ePay ${res.status}: ${await res.text()}`);
const { data: account } = await res.json();res = requests.get(
f"https://api.epayet.dev/v1/connect/accounts/{account_id}",
headers={"Authorization": f"Bearer {os.environ['EPAY_SECRET_KEY']}"},
timeout=30,
)
res.raise_for_status()
account = res.json()["data"]$ch = curl_init('https://api.epayet.dev/v1/connect/accounts/' . urlencode($accountId));
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ['Authorization: Bearer ' . getenv('EPAY_SECRET_KEY')],
]);
$account = json_decode(curl_exec($ch), true)['data'];
curl_close($ch);req, _ := http.NewRequestWithContext(ctx, http.MethodGet,
"https://api.epayet.dev/v1/connect/accounts/"+url.PathEscape(accountID), nil)
req.Header.Set("Authorization", "Bearer "+os.Getenv("EPAY_SECRET_KEY"))
res, err := http.DefaultClient.Do(req)
if err != nil {
return err
}
defer res.Body.Close()HttpRequest request = HttpRequest.newBuilder(
URI.create("https://api.epayet.dev/v1/connect/accounts/" + accountId))
.header("Authorization", "Bearer " + System.getenv("EPAY_SECRET_KEY"))
.GET()
.build();
HttpResponse<String> response =
HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());Node.js SDK support is coming soon. Switch to for a working example in Node.js today.
Python SDK support is coming soon. Switch to for a working example in Python today.
PHP SDK support is coming soon. Switch to for a working example in PHP today.
Java SDK support is coming soon. Switch to for a working example in Java today.
Go SDK support is coming soon. Switch to for a working example in Go today.
Response
200 OK with one account object in data (same shape as a list item).
The account object
Prop
Type
Errors
| Status | error / code | Cause |
|---|---|---|
400 | invalid_client | client_id is unknown, belongs to another business, or doesn't match the key's mode. |
400 | — | cursor isn't an account of this app. |
403 | product_not_available | Your business isn't active and KYB-verified. |
403 | connect_disabled | Connect is turned off in this environment. |
404 | account_not_connected | The account doesn't exist, isn't connected to your app, or was disconnected. |
Next: Disconnect a business