Accounts API
An organization holds one or more business accounts. Each account has a
TER… account number and its own wallets. An API key is
bound to one or more accounts; a request acts on the key's primary account
unless you select another with the X-Account-No
header.
Accounts are created and keys are bound to them from the dashboard (Organization → Accounts and Developer → API keys). The API exposes the read side so integrations can discover which accounts a credential can reach.
The Account object
{
"id": "ac3e3c04-ac8e-4a30-b720-6670e703fca8",
"account_no": "TERAC3E3C04AC",
"name": "Trading Systems",
"default_currency": "KES",
"active": true
}| Field | Type | Notes |
|---|---|---|
id | string | Account uuid. Accepted anywhere X-Account-No is |
account_no | string | Public account number, prefixed TER. Use as the X-Account-No value |
name | string | Human label |
default_currency | string | ISO-4217; the currency of the account's default wallet |
active | bool | true for the account the current request is acting on |
GET /v1/accounts
List the accounts the authenticated credential can act on — for a programmatic
key, every account it is bound to; the one flagged active is the account this
request is currently targeting (see X-Account-No).
curl https://api.teronapay.com/v1/accounts \
-u "$KEY:$SECRET"Response 200:
{
"data": [
{ "id": "ac3e3c04-…", "account_no": "TERAC3E3C04AC", "name": "Trading Systems", "default_currency": "KES", "active": true },
{ "id": "1b90f2a4-…", "account_no": "TER1B90F2A4C1", "name": "Tanzania Ops", "default_currency": "TZS", "active": false }
]
}Pass any returned account_no as X-Account-No on a subsequent request to act
on that account:
curl https://api.teronapay.com/v1/transactions \
-u "$KEY:$SECRET" \
-H "X-Account-No: TER1B90F2A4C1"Status codes summary
| Code | Meaning |
|---|---|
200 | OK |
401 | Missing/invalid API key |
403 | X-Account-No names an account this credential can't act on |
429 | Rate limit exceeded |
