In this guide, we’ll walk through how to initiate your first Mobile Money charge using the PayX Node.js SDK.Documentation Index
Fetch the complete documentation index at: https://docs.payx.company/llms.txt
Use this file to discover all available pages before exploring further.
1. Get your API Keys
Log in to your PayX Dashboard and navigate to the Developer Settings tab. Copy yourTest Secret Key.
2. Install the SDK
In your Node.js project, install thepayx-node package:
3. Initialize the Client
Create a new file and initialize the PayX client with your API key.4. Initiate a Charge
Use thecharge.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 bePENDING.
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.