Skip to main content

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

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

{
  "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"
  }
}

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"
  }
}

Error Response

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