Aurax PayAurax Pay Docs

Quick Start

Get up and running in under 10 minutes. This guide walks you through your first payment collection.

๐Ÿ’กUse a TEST API key while developing. No real money is moved in test mode.

Step 1 โ€” Get your API key

Log in to your Aurax Pay dashboard, go to API Keys, and generate a new key. Choose TEST for development.

Your key will look like: axp_test_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

Step 2 โ€” Make your first payment request

Initiate a collection from a customer's mobile money account:

cURL
curl -X POST https://api.auraxpay.net/v1/payments \
  -H "Content-Type: application/json" \
  -H "x-api-key: axp_test_YOUR_KEY_HERE" \
  -d '{
    "amount": 5000,
    "channel": "MPESA",
    "buyerPhone": "+255712345678",
    "buyerName": "John Doe",
    "description": "Order #1042"
  }'

Step 3 โ€” Read the response

A successful request returns a transaction object with status PENDING:

Response 201
{
  "success": true,
  "transaction": {
    "id": "txn_01j2k3m4n5p6q7r8s9t0",
    "reference": "AXP-XXXXXX",
    "amount": 5000,
    "fee": 0,
    "netAmount": 5000,
    "channel": "MPESA",
    "status": "PENDING",
    "buyerPhone": "+255712345678",
    "buyerName": "John Doe",
    "description": "Order #1042",
    "createdAt": "2025-06-09T14: 30: 00.000Z"
  }
}

Step 4 โ€” Handle the webhook

Payment processing is asynchronous. When the customer approves the push prompt on their phone, Aurax Pay sends a POST request to your webhook URL with the final status.

Webhook payload (COMPLETED)
{
  "event": "payment.completed",
  "transaction": {
    "id": "txn_01j2k3m4n5p6q7r8s9t0",
    "reference": "AXP-XXXXXX",
    "status": "COMPLETED",
    "amount": 5000,
    "netAmount": 5000,
    "channel": "MPESA",
    "completedAt": "2025-06-09T14: 30: 45.000Z"
  }
}

Register your webhook URL from the Business Settings page in your dashboard.

Step 5 โ€” Go live

When you're ready to accept real payments:

  1. Generate a LIVE API key from your dashboard
  2. Replace axp_test_ with your axp_live_ key in your environment variables
  3. Confirm your webhook URL is publicly reachable
  4. Process a small real transaction to verify end-to-end
โš ๏ธNever commit API keys to source code. Use environment variables (AURAX_API_KEY) and keep live keys out of your client-side code.