Skip to main content
In this guide, we’ll walk through how to initiate your first Mobile Money charge using the PayX Node.js SDK.

1. Get your API Keys

Log in to your PayX Dashboard and navigate to the Developer Settings tab. Copy your Test Secret Key.

2. Install the SDK

In your Node.js project, install the payx-node package:

3. Initialize the Client

Create a new file and initialize the PayX client with your API key.

4. Initiate a Charge

Use the charge.create method to request a payment from a customer.

5. Handle the Response

Since Mobile Money transactions require user approval on their phone (USSD prompt), the initial status will be PENDING. You should set up a Webhook to receive real-time updates when the payment is completed or failed.

Next Steps

API Reference

Explore all available endpoints and parameters.

Webhooks

Learn how to receive real-time notifications.