The Direct Charge API allows you to initiate a mobile money collection without needing a hosted checkout page. This is ideal for mobile apps or custom checkout flows where you handle the user interface.
Authentication
Include your Secret Key in the Authorization header as a Bearer token.
Request Body
Customer’s email address for notifications and receipts.
Customer’s phone number with country prefix (e.g., 237612345678).
Payment Details
Amount in smallest currency unit (e.g., “5000” for 5000 XAF).
The currency code. Currently supports XAF (Cameroon, etc.) and XOF (Senegal, Ivory Coast, etc.).
ISO 2-letter country code (e.g., CM, CI, SN, GH, KE).Recommended to omit: If omitted, the system automatically detects the country based on the phone number prefix. Only provide if you want to enforce a specific country.
Mobile network operator code. Common values: MTN, ORANGE, AIRTEL, MPESA, VODAFONE.Recommended to omit: If omitted, the system automatically detects the operator based on the phone number pattern.
Brief description of the charge, displayed to the customer.
Your unique order reference for internal tracking.
Configuration
Who pays the transaction fees:
merchant: Commission is deducted from your balance.
customer: Fee is added to the amount the customer pays.
The URL to redirect the customer to after payment completion (if applicable).
Custom JSON object for storing your own data with this transaction.
Response
Unique identifier for the transaction.
PaveWay’s unique public reference for this transaction (e.g., PWG_...).
Current status of the charge. Usually pending immediately after request, until the user processes the USSD prompt.
The amount being charged.
The detected mobile network operator (e.g., MTN, ORANGE).
A descriptive message for the user, usually instructing them to check their phone.
{
"status_code": 200,
"response_type": "success",
"data": {
"id": "658dc...",
"payment_ref": "PWG_abc123",
"status": "pending",
"amount": "5000",
"currency": "XAF",
"payment_method": "mobile_money_franco",
"network": "MTN",
"message": "Payment processing. Please check your phone for the USSD prompt."
}
}