Authentication
Swahilies supports two ways to authenticate, for two different audiences.
API keys (server-to-server)
Your backend authenticates with a merchant API key. This is how you call the API in production.
swh_live_<prefix>_<secret>Send it as a Bearer token on every request:
curl https://engine.swahilies.net/api/psp/services \
-H "Authorization: Bearer swh_live_<prefix>_<secret>"A key is bound to your merchant, so responses are automatically scoped to you —
you never pass your merchant_ref just to identify yourself.
Scopes
Each key carries a set of scopes that limit what it can do. Grant the least a key needs:
| Scope | Grants |
|---|---|
psp:collections-operator | Create collections |
psp:payout-maker | Create payouts |
psp:tembo-merchant | Declare & reconcile bank-transfer collections |
psp:nuvion-merchant | Issue cards, accept card payments |
A request with a key that lacks the required scope returns 403.
The secret half of a key is shown once, at creation. Store it in your server's secret manager. If it leaks, revoke it in the dashboard and issue a new one — revocation is immediate.
Managing keys with the API
You can also list and create keys programmatically (see API reference):
# List your keys (secrets never returned)
curl https://engine.swahilies.net/api/psp/keys \
-H "Authorization: Bearer swh_live_<prefix>_<secret>"Dashboard login (humans)
Your team signs in to the dashboard (opens in a new tab) with email + password. The dashboard uses a short-lived session token; it is not used for API integration. Use API keys for that.
Good practice
- Keep keys server-side. Never ship a key in a browser, mobile app, or git.
- Use separate keys per environment and per service, so you can rotate one without downtime.
- Rotate on a schedule and immediately on suspected exposure.