1. Get your API Keys
Log in to your PayX Dashboard and navigate to the Developer Settings tab. Copy yourTest Secret Key (px_test_v2_...).
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 v2 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.
PayX JS Checkout
Integrate our secure inline modal checkout.