API ReferenceAuthentication
Authentication
Bearer and X-Api-Key authentication for the external API.
External endpoints authenticate the same way:
Authorization: Bearer <sk_or_ak_key>or:
X-Api-Key: <sk_or_ak_key>| Key prefix | Environment | Use |
|---|---|---|
sk_test_ / ak_test_ | Sandbox | External API |
sk_live_ / ak_live_ | Live | External API |
pk_* | Either | Not accepted on /api/v1/external/* |
Required headers
| Header | When | Purpose |
|---|---|---|
Authorization or X-Api-Key | Every /external/* request | Server credential |
Content-Type | Requests with a JSON body | application/json |
Code example
curl https://api.ouipay.africa/api/v1/external/wallets \
-H "Authorization: Bearer sk_test_..."Errors
| HTTP | error.code | Cause |
|---|---|---|
| 401 | MISSING_API_KEY / INVALID_API_KEY / KEY_REVOKED | Missing, malformed, or revoked key |
| 403 | PUBLIC_KEY_NOT_ALLOWED / IP_DENIED | Valid credential, disallowed use |