Aurax PayAurax Pay Docs

Authentication

Aurax Pay uses API keys to authenticate requests. Every call to the /v1/* endpoints must include your key in the x-api-key header.

⚠️Your API keys carry full access to your merchant account. Never expose them in client-side code, public repositories, or logs.

Sending your API key

Include the key on every request as an HTTP header:

cURL
curl https://api.auraxpay.net/v1/payments \
  -H "x-api-key: axp_live_YOUR_KEY_HERE"
Node.js
const response = await fetch("token-string">'https:"token-comment">//api.auraxpay.net/v1/payments', {
  method: "token-string">'POST',
  headers: {
    "token-string">'Content-Type': "token-string">'application/json',
    "token-string">'x-api-key': process.env.AURAX_API_KEY,
  },
  body: JSON.stringify({ amount: 5000, channel: "token-string">'MPESA', ... }),
})

Key types

TypePrefixUse for
Testaxp_test_Development and integration testing. No real money moved.
Liveaxp_live_Production. Real transactions. Requires activated account.

Permissions

Each API key is scoped to a set of permissions. When generating a key from the dashboard, you select what it can do. A key without a required permission returns 403 Forbidden.

PermissionAllows
payments.createInitiate collections and disbursements
payments.readRetrieve and list transactions

Key security

Aurax Pay stores only a SHA-256 hash of your key — the plaintext is shown once at creation and never again. If you lose a key, revoke it and generate a new one.

  • Rotate keys regularly in production
  • Use separate keys per service or environment
  • Revoke immediately if you suspect compromise
  • Store in environment variables, never in source code

Authentication errors

StatusCodeMeaning
401Missing x-api-key headerNo key was provided
401Invalid API keyKey not found or revoked
401API key expiredKey has passed its expiry date
403Merchant account not activeAccount pending activation
403Insufficient permissionsKey lacks required permission