Products and scopes
Why an endpoint documented on this site answers 403 for your credential: every key carries an explicit list of what it may call, and there is no wildcard.
The reference documents every operation this API has. Your credential reaches
the subset your agreement covers. When those two differ you get a 403, and
this page is how to read it.
Your credential is issued for ONE product
OnLink's partner API serves three products, and every partner is set up for exactly one:
- USDT rails — quoting, buying and selling USDT against KES, registering withdrawal addresses, sending USDT to a registered destination.
- Collections — collecting US dollars into your USD account without the USDT leg, converting those dollars to shillings in your KES account, and paying them out as dollars from your USD account.
- Remittance — everything Collections offers, plus the customers you move money for. A Remittance credential may be issued every Collections scope and calls the same operations, and it is the only product that can be issued the customers scopes below. It never carries a USDT-rails scope.
Which product you were onboarded for decides which operations you can ever be
issued a scope for. A usdt:write scope is meaningless to a Collections or
Remittance partner and will never appear on one of your keys, and the reverse
holds for a scope that belongs only to Collections and Remittance. Ask your
OnLink contact which product your account is set up for if you are unsure.
A credential carries an explicit list
Every API key is issued with a list of scopes in resource:action form. A call
to an operation whose scope is not on your list is refused — by the credential,
before the operation runs.
Four properties of that list are worth knowing before you debug one:
- There is no wildcard. No
*, noadmin, no super-scope. The list is exhaustive. - An empty list authorises nothing. It is not a shorthand for "unrestricted".
- A scope outside your product can never be issued to you. Not by mistake, not by request — the platform refuses it at issuance.
- Widening a credential means issuing a new one. A scope cannot be added to a key in place, which is also why the grant is worth getting right at issuance rather than discovering in integration.
The scopes
Some scopes are available to every partner regardless of product; others belong to one product only.
Available to every partner:
| Scope | What it unlocks |
|---|---|
health:read | GET /v1/health — the smallest signed call, for testing signing. |
balances:read | The account you hold with us, and what is available in it. |
funding:read | Your deposit instructions: the KES rails and your USDT address. |
funding:write | Requesting an M-PESA prompt on a number you name. |
payout_accounts:read | The Kenyan bank accounts a payout can settle to. |
transfers:write | Sending money via a bank transfer. |
transfers:read | Reading a bank transfer back. |
confirmations:write | Confirming or resending the code for a bank transfer. |
admins:write | Registering and removing an approver on your account. |
admins:read | Listing them. |
USDT rails only:
| Scope | What it unlocks |
|---|---|
quotes:write | Taking a quote. |
orders:write | Creating an order, and attaching a transaction hash to one. |
orders:read | Reading an order back. |
wallets:write | Registering, confirming and removing a withdrawal address. |
wallets:read | Listing your registered addresses. |
usdt:write | Sending USDT to a registered wallet. |
usdt:read | Reading a USDT send back, your USDT balance, and where your USDT is held. |
Collections and Remittance (not USDT rails):
| Scope | What it unlocks |
|---|---|
collections:write | Opening a collection — see Open a collection. |
collections:read | Reading your own collections back, one at a time or listed. |
conversions:write | Converting USD in your USD account to KES in your KES account — see Convert USD to KES. |
conversions:read | Quoting a conversion, and reading a conversion back. |
Remittance only:
| Scope | What it unlocks |
|---|---|
customers:write | Creating a customer, changing one and closing one — see Manage your customers — and sending one of them their verification link, POST /v1/customers/{id}/kyc-link. The link is a credential for that customer's verification, so grant the scope only to the key that sends it. Submitting a customer's identity documents by API, POST /v1/customers/{id}/kyc, and issuing the account-terms link, POST /v1/customers/{id}/kyc/terms-link, need it too, as do the business verification calls that change something: starting a business customer's application, uploading its documents, inviting a director and submitting it (/v1/customers/{id}/kyb…). |
customers:read | Reading your own customers back, one at a time, or listing and searching them, and reading a customer's verification status, GET /v1/customers/{id}/kyc, or a business customer's verification, GET /v1/customers/{id}/kyb. |
| Scope | What it unlocks |
|---|---|
customer_accounts:write | Opening a customer's KES or USD account, POST /v1/customers/{id}/accounts — see Open accounts for your customers. Opening is billable, so grant it only to the key that opens accounts. In sandbox it also lets a key simulate a payment into a customer's USD account, POST /v1/simulations/customers/{customerId}/deposits. |
customer_accounts:read | Reading a customer's accounts with their numbers, US bank details and balances, GET /v1/customers/{id}/accounts. customers:read does not grant this: a key that can look a customer up cannot see their bank details or money unless it also holds this scope. |
A key issued before the customer_accounts:* scopes existed holds only the
customers:* scopes and is refused insufficient_scope on the accounts routes
until you issue a new key that carries them.
| Scope | What it unlocks |
|---|---|
customer_transfers:write | Moving money between your own account and your customers' accounts, or between two customers, POST /v1/internal-transfers — see Move money between your customers — and converting a customer's balance, POST /v1/customers/{id}/conversions — see Convert a customer balance. It moves value, so grant it only to the key that does the moving. |
customer_transfers:read | Reading those transfers and conversions back, GET /v1/internal-transfers/{id}, and quoting and reading a customer's conversions, GET /v1/customers/{id}/conversions/quote and GET /v1/customers/{id}/conversions/{conversionId}. A key that can read a customer's balance (customer_accounts:read) cannot read or move a transfer or a conversion unless it also holds this scope, and neither transfers:* (your own KES bank transfers) nor conversions:* (conversions of your own balance) grants either. |
A key issued before the customer_transfers:* scopes existed is refused
insufficient_scope on the internal transfer routes until you issue a new key that
carries them.
A Collections or USDT rails credential can never be issued any of these, and the
customers routes (the verification link and the accounts included) refuse those
products with product_not_supported whatever a key carries. A Remittance
credential without the scope a route needs is refused insufficient_scope.
A read scope never implies its write counterpart, and a write scope never implies the read. Ask for both where you need both.
A Collections or Remittance credential already holds transfers:write
transfers:write, transfers:read and confirmations:write — in the
"Available to every partner" table above — are what pay KES out once you have
some. They are not USDT-rails-only, so a Collections or Remittance credential
does not need a second product to send a KES bank transfer once
conversions:write has turned your USD into KES. The same scopes pay USD out
of your USD account, which only a Collections or Remittance account can do.
See Collect in the US, pay out in
Kenya.
What a refusal looks like
Response — 403 Forbidden:
{
"statusCode": 403,
"message": "This credential is not authorised for this endpoint. Required scope: orders:write.",
"error": "insufficient_scope",
"requestId": "req-1756512000000-a1b2c3d",
"errorCode": "orders:write"
}error is the constant insufficient_scope. The scope the route needed is
in errorCode, and message repeats it in prose — so a refusal tells you what
to ask for rather than sending you to us to find out.
What the response does not contain is the list your credential holds. That is a description of your own privileges, and it is more than a single refusal needs to disclose.
A 403 is not a signing problem
It is a 403 and not a 401 deliberately: your signature, your key and your
clock were all correct, and the call was authenticated. Rotating a working
secret will not fix it. A 401 is the signing path — see
Authentication.
A route can refuse your whole product, before any scope check
A scope refusal is not the only 403 this API can send you. POST /v1/orders/buy
and every other USDT-rails route refuse a Collections or Remittance credential
outright — and the reverse holds for POST /v1/collections against a
usdt_rails credential — independently of what scopes the credential carries:
{
"statusCode": 403,
"message": "This credential is not authorised for this endpoint — it is not available for your product.",
"error": "product_not_supported",
"requestId": "req-1756512000000-a1b2c3d"
}error is the constant product_not_supported. Unlike insufficient_scope,
this refusal names no scope and, deliberately, does not say which product the
route belongs to — that would describe a different product's API surface to a
credential that holds nothing for it. The fix is not a wider grant: no scope
list can make a USDT route answer for a Collections account, or the reverse.
This check runs even against a scope forged onto the wrong credential by some
means other than normal issuance — it does not merely trust that issuance
refused it upstream.
Why your grant is shaped the way it is
A grant is scoped to what your integration does. A platform that only converts
in one direction does not need the other direction's write scope, and a
credential that never registers a destination does not need wallets:write.
That is not friction for its own sake: the narrower the grant, the less a
leaked secret can do, and the destinations it could reach are registered in
advance anyway. See API credentials.
If you need a scope you were not issued, tell us what you are building and we will issue a credential that carries it. Email info@onlink.africa.