What You Will Build
By the end of this guide, your application will be able to initiate a mobile money payment request, receive a real-time webhook when the payment completes, and display the result to your user — all in under 50 lines of code per language.
Step 1: Get Your API Keys
Sign up at nexapay.net and navigate to your dashboard. Under Settings → API Keys, generate a new sandbox key pair. You will receive a sk_test_... secret key and a pk_test_... publishable key. Keep your secret key server-side only — never expose it in frontend code.
Step 2: Make Your First Charge (Node.js)
Install the SDK: npm install @nexapay/node
"The NexaPay SDK wraps our REST API with sensible defaults. Error handling, retries, and network-specific quirks are all managed for you — so you can focus on your product, not the plumbing." — NexaPay Engineering Team
Step 3: Receive Webhook Events
Configure your webhook URL in the dashboard under Settings → Webhooks. NexaPay will POST signed events to your endpoint when a payment completes, fails, or is reversed. Always verify the HMAC-SHA256 signature using your webhook secret before processing any event.
- Listen for
payment.completed— trigger fulfillment - Listen for
payment.failed— prompt retry or alternate method - Listen for
refund.completed— notify the customer
Step 4: Go Live
Replace your sandbox keys with production keys. Update your webhook URL. Submit your merchant verification documents if not already done. Once approved, you are live across all four countries immediately.