Authentication & API keys
Every request to the AkiliPay API is authenticated with your secret key, sent as a Bearer token.
Authentication method
AkiliPay uses bearer authentication. Send your secret key in the Authorization header on every request. All requests must be made over HTTPS.
Authorization header
bash
curl https://pay-api.akilidex.com/v1/payments \
-H "Authorization: Bearer akp_live_..."API keys
Keys are created in your dashboard. Each key belongs to one environment:
akp_test_04a8b9f12d...— test keys run against the sandbox. You can reveal a test secret again later.akp_live_...— live keys move real money and are shown only once at creation. Store them immediately.
Making authenticated requests
On every write (creating a payment or refund), also send a unique Idempotency-Key so a retry never charges twice. A missing or invalid key returns 401 UNAUTHORIZED.
Key security
- Never put a secret key in client-side code, a mobile app, or a public repository.
- Keep keys in environment variables or a secrets manager, not in source control.
- To rotate a key, create a new one, migrate traffic, then revoke the old key.