curl -X POST https://payx.company/api/v1/payout \
-H "x-api-key: px_live_v2_YOUR_SECRET_KEY" \
-H "Idempotency-Key: sample-unique-idempotency-key-12345" \
-H "Content-Type: application/json" \
-d '{
"amount": 250.00,
"phoneNumber": "0241234567",
"network": "MTN",
"payeeNote": "Supplier Payment"
}'
const { PayX } = require('payx-node');
const payx = new PayX({ apiKey: process.env.PAYX_SECRET_KEY });
const res = await payx.payouts.create({
amount: 250.00,
currency: 'GHS',
phoneNumber: '0241234567',
network: 'MTN',
idempotencyKey: 'sample-unique-idempotency-key-12345',
payeeNote: 'Supplier Payment'
});
console.log('Payout ID:', res.transactionId);
{
"message": "Payout initiated",
"transactionId": "tx_987654321",
"status": "PENDING"
}
API Reference
Create Payout
Send money to a mobile wallet
POST
/
payout
curl -X POST https://payx.company/api/v1/payout \
-H "x-api-key: px_live_v2_YOUR_SECRET_KEY" \
-H "Idempotency-Key: sample-unique-idempotency-key-12345" \
-H "Content-Type: application/json" \
-d '{
"amount": 250.00,
"phoneNumber": "0241234567",
"network": "MTN",
"payeeNote": "Supplier Payment"
}'
const { PayX } = require('payx-node');
const payx = new PayX({ apiKey: process.env.PAYX_SECRET_KEY });
const res = await payx.payouts.create({
amount: 250.00,
currency: 'GHS',
phoneNumber: '0241234567',
network: 'MTN',
idempotencyKey: 'sample-unique-idempotency-key-12345',
payeeNote: 'Supplier Payment'
});
console.log('Payout ID:', res.transactionId);
{
"message": "Payout initiated",
"transactionId": "tx_987654321",
"status": "PENDING"
}
Disburse funds directly to a mobile money wallet (MTN, Telecel, AirtelTigo).
Headers
string
required
A unique identifier (16–128 characters consisting of letters, numbers, hyphens, or underscores) to prevent duplicate transactions if a network timeout or retry occurs.
string
required
Your Secret API Key (
px_live_v2_... or px_test_v2_...). Alternatively, you can use the Authorization: Bearer <key> header.Body Parameters
number
required
The amount to send in GHS. Must be a positive number with at most 2 decimal places (e.g.
250.00).string
required
The recipient’s 10-digit mobile money number (e.g.,
0241234567).string
required
The network provider. Supported values:
MTN, TELECEL, AIRTELTIGO.string
default:"GHS"
The currency code. Currently only
GHS is supported.string
A note that will appear in the recipient’s transaction history.
string
A note for the merchant’s internal records.
string
Optional email address of the recipient.
object
Custom JSON data to associate with the payout.
Response
string
A summary of the initiation status.
string
The unique transaction identifier for status checks and reconciliation.
string
The initial status of the payout (e.g.,
PENDING or PROCESSING).curl -X POST https://payx.company/api/v1/payout \
-H "x-api-key: px_live_v2_YOUR_SECRET_KEY" \
-H "Idempotency-Key: sample-unique-idempotency-key-12345" \
-H "Content-Type: application/json" \
-d '{
"amount": 250.00,
"phoneNumber": "0241234567",
"network": "MTN",
"payeeNote": "Supplier Payment"
}'
const { PayX } = require('payx-node');
const payx = new PayX({ apiKey: process.env.PAYX_SECRET_KEY });
const res = await payx.payouts.create({
amount: 250.00,
currency: 'GHS',
phoneNumber: '0241234567',
network: 'MTN',
idempotencyKey: 'sample-unique-idempotency-key-12345',
payeeNote: 'Supplier Payment'
});
console.log('Payout ID:', res.transactionId);
{
"message": "Payout initiated",
"transactionId": "tx_987654321",
"status": "PENDING"
}