Direct Mobile Money Charge
curl --request POST \
--url https://api-sandbox.pavewaygroup.com/v1/charges/mobile-money \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"firstname": "<string>",
"lastname": "<string>",
"email": "<string>",
"phone": "<string>",
"amount": "<string>",
"currency": "<string>",
"country": "<string>",
"network": "<string>",
"description": "<string>",
"merchant_reference": "<string>",
"fee_bearer": "<string>",
"redirect_url": "<string>",
"metadata": {}
}
'import requests
url = "https://api-sandbox.pavewaygroup.com/v1/charges/mobile-money"
payload = {
"firstname": "<string>",
"lastname": "<string>",
"email": "<string>",
"phone": "<string>",
"amount": "<string>",
"currency": "<string>",
"country": "<string>",
"network": "<string>",
"description": "<string>",
"merchant_reference": "<string>",
"fee_bearer": "<string>",
"redirect_url": "<string>",
"metadata": {}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
firstname: '<string>',
lastname: '<string>',
email: '<string>',
phone: '<string>',
amount: '<string>',
currency: '<string>',
country: '<string>',
network: '<string>',
description: '<string>',
merchant_reference: '<string>',
fee_bearer: '<string>',
redirect_url: '<string>',
metadata: {}
})
};
fetch('https://api-sandbox.pavewaygroup.com/v1/charges/mobile-money', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api-sandbox.pavewaygroup.com/v1/charges/mobile-money",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'firstname' => '<string>',
'lastname' => '<string>',
'email' => '<string>',
'phone' => '<string>',
'amount' => '<string>',
'currency' => '<string>',
'country' => '<string>',
'network' => '<string>',
'description' => '<string>',
'merchant_reference' => '<string>',
'fee_bearer' => '<string>',
'redirect_url' => '<string>',
'metadata' => [
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api-sandbox.pavewaygroup.com/v1/charges/mobile-money"
payload := strings.NewReader("{\n \"firstname\": \"<string>\",\n \"lastname\": \"<string>\",\n \"email\": \"<string>\",\n \"phone\": \"<string>\",\n \"amount\": \"<string>\",\n \"currency\": \"<string>\",\n \"country\": \"<string>\",\n \"network\": \"<string>\",\n \"description\": \"<string>\",\n \"merchant_reference\": \"<string>\",\n \"fee_bearer\": \"<string>\",\n \"redirect_url\": \"<string>\",\n \"metadata\": {}\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api-sandbox.pavewaygroup.com/v1/charges/mobile-money")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"firstname\": \"<string>\",\n \"lastname\": \"<string>\",\n \"email\": \"<string>\",\n \"phone\": \"<string>\",\n \"amount\": \"<string>\",\n \"currency\": \"<string>\",\n \"country\": \"<string>\",\n \"network\": \"<string>\",\n \"description\": \"<string>\",\n \"merchant_reference\": \"<string>\",\n \"fee_bearer\": \"<string>\",\n \"redirect_url\": \"<string>\",\n \"metadata\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-sandbox.pavewaygroup.com/v1/charges/mobile-money")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"firstname\": \"<string>\",\n \"lastname\": \"<string>\",\n \"email\": \"<string>\",\n \"phone\": \"<string>\",\n \"amount\": \"<string>\",\n \"currency\": \"<string>\",\n \"country\": \"<string>\",\n \"network\": \"<string>\",\n \"description\": \"<string>\",\n \"merchant_reference\": \"<string>\",\n \"fee_bearer\": \"<string>\",\n \"redirect_url\": \"<string>\",\n \"metadata\": {}\n}"
response = http.request(request)
puts response.read_body{
"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."
}
}
Payments API
Direct Mobile Money Charge
Directly collect payment from a mobile money wallet.
POST
/
charges
/
mobile-money
Direct Mobile Money Charge
curl --request POST \
--url https://api-sandbox.pavewaygroup.com/v1/charges/mobile-money \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"firstname": "<string>",
"lastname": "<string>",
"email": "<string>",
"phone": "<string>",
"amount": "<string>",
"currency": "<string>",
"country": "<string>",
"network": "<string>",
"description": "<string>",
"merchant_reference": "<string>",
"fee_bearer": "<string>",
"redirect_url": "<string>",
"metadata": {}
}
'import requests
url = "https://api-sandbox.pavewaygroup.com/v1/charges/mobile-money"
payload = {
"firstname": "<string>",
"lastname": "<string>",
"email": "<string>",
"phone": "<string>",
"amount": "<string>",
"currency": "<string>",
"country": "<string>",
"network": "<string>",
"description": "<string>",
"merchant_reference": "<string>",
"fee_bearer": "<string>",
"redirect_url": "<string>",
"metadata": {}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
firstname: '<string>',
lastname: '<string>',
email: '<string>',
phone: '<string>',
amount: '<string>',
currency: '<string>',
country: '<string>',
network: '<string>',
description: '<string>',
merchant_reference: '<string>',
fee_bearer: '<string>',
redirect_url: '<string>',
metadata: {}
})
};
fetch('https://api-sandbox.pavewaygroup.com/v1/charges/mobile-money', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api-sandbox.pavewaygroup.com/v1/charges/mobile-money",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'firstname' => '<string>',
'lastname' => '<string>',
'email' => '<string>',
'phone' => '<string>',
'amount' => '<string>',
'currency' => '<string>',
'country' => '<string>',
'network' => '<string>',
'description' => '<string>',
'merchant_reference' => '<string>',
'fee_bearer' => '<string>',
'redirect_url' => '<string>',
'metadata' => [
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api-sandbox.pavewaygroup.com/v1/charges/mobile-money"
payload := strings.NewReader("{\n \"firstname\": \"<string>\",\n \"lastname\": \"<string>\",\n \"email\": \"<string>\",\n \"phone\": \"<string>\",\n \"amount\": \"<string>\",\n \"currency\": \"<string>\",\n \"country\": \"<string>\",\n \"network\": \"<string>\",\n \"description\": \"<string>\",\n \"merchant_reference\": \"<string>\",\n \"fee_bearer\": \"<string>\",\n \"redirect_url\": \"<string>\",\n \"metadata\": {}\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api-sandbox.pavewaygroup.com/v1/charges/mobile-money")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"firstname\": \"<string>\",\n \"lastname\": \"<string>\",\n \"email\": \"<string>\",\n \"phone\": \"<string>\",\n \"amount\": \"<string>\",\n \"currency\": \"<string>\",\n \"country\": \"<string>\",\n \"network\": \"<string>\",\n \"description\": \"<string>\",\n \"merchant_reference\": \"<string>\",\n \"fee_bearer\": \"<string>\",\n \"redirect_url\": \"<string>\",\n \"metadata\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-sandbox.pavewaygroup.com/v1/charges/mobile-money")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"firstname\": \"<string>\",\n \"lastname\": \"<string>\",\n \"email\": \"<string>\",\n \"phone\": \"<string>\",\n \"amount\": \"<string>\",\n \"currency\": \"<string>\",\n \"country\": \"<string>\",\n \"network\": \"<string>\",\n \"description\": \"<string>\",\n \"merchant_reference\": \"<string>\",\n \"fee_bearer\": \"<string>\",\n \"redirect_url\": \"<string>\",\n \"metadata\": {}\n}"
response = http.request(request)
puts response.read_body{
"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."
}
}
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 theAuthorization header as a Bearer token.
Request Body
Customer Information
string
required
Customer’s first name.
string
required
Customer’s last name.
string
required
Customer’s email address for notifications and receipts.
string
required
Customer’s phone number with country prefix (e.g.,
237612345678).Payment Details
string
required
Amount in smallest currency unit (e.g., “5000” for 5000 XAF).
string
default:"XAF"
The currency code. Currently supports
XAF (Cameroon, etc.) and XOF (Senegal, Ivory Coast, etc.).string
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.string
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.string
required
Brief description of the charge, displayed to the customer.
string
required
Your unique order reference for internal tracking.
Configuration
string
default:"merchant"
Who pays the transaction fees:
merchant: Commission is deducted from your balance.customer: Fee is added to the amount the customer pays.
string
The URL to redirect the customer to after payment completion (if applicable).
object
Custom JSON object for storing your own data with this transaction.
Response
string
Unique identifier for the transaction.
string
PaveWay’s unique public reference for this transaction (e.g.,
PWG_...).string
Current status of the charge. Usually
pending immediately after request, until the user processes the USSD prompt.string
The amount being charged.
string
The currency code.
string
The detected mobile network operator (e.g.,
MTN, ORANGE).string
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."
}
}

