Skip to main content

Merchant Profile

Login

POST /business/auth/login

Request Body

{
  "email": "merchant@nexa.ng",
  "password": "SecurePass#1"
}

Response

{
  "success": true,
  "token": "jwt..."
}

Error Response

{
  "success": false,
  "msg": "Invalid credentials"
}

Invalid Example (No Token)

{
  "success": false,
  "msg": "No token, authorization denied"
}

Curl Example

curl -X POST "https://api.nexapay.ng/api/v1/business/auth/login" \
  -H "Content-Type: application/json" \
  -d '{"email":"merchant@nexa.ng","password":"SecurePass#1"}'

Forgot Password (OTP)

POST /business/auth/forgot-password
curl -X POST "https://api.nexapay.ng/api/v1/business/auth/forgot-password" \
  -H "Content-Type: application/json" \
  -d '{"email":"merchant@nexa.ng"}'

Reset Password

POST /business/auth/reset-password
curl -X POST "https://api.nexapay.ng/api/v1/business/auth/reset-password" \
  -H "Content-Type: application/json" \
  -d '{"email":"merchant@nexa.ng","otp":"123456","newPassword":"NewPass#2"}'

Get Merchant Profile

GET /business/me
curl "https://api.nexapay.ng/api/v1/business/me" \
  -H "Authorization: Bearer <token>"

Response

{
  "success": true,
  "business": {
    "id": "664b...",
    "businessName": "Nexa Stores",
    "businessEmail": "merchant@nexa.ng",
    "businessPhone": "08012345678",
    "businessType": "MERCHANT",
    "businessCategory": "FREELANCER",
    "kycStatus": "VERIFIED",
    "isActive": true,
    "balances": {
      "balance": 50000,
      "pendingBalance": 0,
      "totalEarned": 75000,
      "totalWithdrawn": 25000
    },
    "apiKeys": {
      "prod": "nexa-prod-...",
      "test": "nexa-test-...",
      "legacy": null
    }
  }
}

Error Response

{
  "success": false,
  "msg": "No token, authorization denied"
}

Update Merchant Profile

PATCH /business/me Allowed fields:
  • contactPersonName
  • contactPersonPhone
  • businessAddress
  • registrationNumber
  • taxId
  • documentUrl
  • webhookUrl
curl -X PATCH "https://api.nexapay.ng/api/v1/business/me" \
  -H "Authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -d '{"contactPersonName":"Jane Doe","webhookUrl":"https://merchant.site/webhook"}'

Response

{
  "success": true,
  "business": {
    "id": "664b...",
    "contactPersonName": "Jane Doe",
    "webhookUrl": "https://merchant.site/webhook"
  }
}

Error Response

{
  "success": false,
  "msg": "Unknown fields: someField"
}

Verify Settlement Bank Account

POST /business/bank/verify
curl -X POST "https://api.nexapay.ng/api/v1/business/bank/verify" \
  -H "Authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -d '{"accountNumber":"0123456789","bankCode":"058"}'

Response

{
  "success": true,
  "msg": "Bank account verified and saved",
  "bankAccount": {
    "accountNumber": "0123456789",
    "bankName": "GTBank",
    "accountName": "NEXA STORES LTD",
    "bankCode": "058",
    "verified": true
  }
}

Invalid Example (Name Mismatch)

{
  "success": false,
  "msg": "Account name does not match business name",
  "accountName": "OTHER BUSINESS LTD"
}

Get VFD Account (JWT or API Key)

GET /business/:id/vfd-account
curl "https://api.nexapay.ng/api/v1/business/664b.../vfd-account" \
  -H "Authorization: Bearer <token>"

Response

{
  "success": true,
  "vfdAccount": {
    "accountNumber": "1000053589",
    "accountName": "Nexa Stores",
    "accountType": "FREELANCER",
    "createdAt": "2026-03-13T10:12:00.000Z"
  }
}

Error Response

{
  "success": false,
  "msg": "VFD account not found"
}