Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.nexapay.ng/llms.txt

Use this file to discover all available pages before exploring further.

Payments

Process Payment (API Key)

POST /business/payment/process

Request Body

{
  "businessId": "664b...",
  "amount": 5000,
  "serviceType": "SUBSCRIPTION",
  "description": "March invoice",
  "externalPayerName": "Jane Smith",
  "externalPayerEmail": "jane@example.com",
  "externalPayerPhone": "08055555555"
}

Curl Example (Production)

curl -X POST "https://api.nexapay.ng/api/v1/business/payment/process" \
  -H "Content-Type: application/json" \
  -H "x-api-key: nexa-prod-..." \
  -d '{
    "businessId":"664b...",
    "amount":5000,
    "serviceType":"SUBSCRIPTION",
    "description":"March invoice",
    "externalPayerName":"Jane Smith",
    "externalPayerEmail":"jane@example.com",
    "externalPayerPhone":"08055555555"
  }'

Response (Production)

{
  "success": true,
  "msg": "✅ Payment recorded for Nexa Stores from Jane Smith",
  "transaction": {
    "transactionId": "NEXA-...",
    "amount": 5000,
    "businessName": "Nexa Stores",
    "commission": 250,
    "netAmount": 4750,
    "status": "COMPLETED",
    "environment": "prod",
    "simulated": false
  }
}

Response (Test Key)

{
  "success": true,
  "msg": "Test payment recorded for Nexa Stores from Jane Smith",
  "transaction": {
    "transactionId": "NEXA-...",
    "amount": 5000,
    "businessName": "Nexa Stores",
    "commission": 250,
    "netAmount": 4750,
    "status": "COMPLETED",
    "environment": "test",
    "simulated": true
  }
}

Notes

  • Production-key payments credit the live merchant wallet.
  • Test-key payments credit only the sandbox merchant wallet.

Error Response

{
  "success": false,
  "msg": "Invalid payment details"
}

Process External Payment (API Key)

POST /business/payment/process/external Same body as /process.
curl -X POST "https://api.nexapay.ng/api/v1/business/payment/process/external" \
  -H "Content-Type: application/json" \
  -H "x-api-key: nexa-prod-..." \
  -d '{
    "businessId":"664b...",
    "amount":5000,
    "externalPayerName":"Jane Smith"
  }'

Response

{
  "success": true,
  "transaction": {
    "transactionId": "NEXA-...",
    "amount": 5000,
    "status": "COMPLETED",
    "environment": "prod"
  }
}

Error Response

{
  "success": false,
  "msg": "Payer information required"
}