Api reference
Mobile Money Payment
Process payments via mobile money (MTN, Vodafone, AirtelTigo)
Mobile Money Payment
Process payments through mobile money networks including MTN, Vodafone, and AirtelTigo. This is ideal for collecting payments from customers who prefer mobile money transactions.
Overview
Mobile money payments allow customers to pay using their mobile money accounts. The payment is processed through the customer's mobile money provider and funds are transferred to your account.
Endpoint
POST https://api.bridgeagw.com/make_paymentRequest Headers
Authorization: Basic <base64_encoded_credentials>
Content-Type: application/jsonRequest Body
{
"service_id": 1,
"reference": "Payment for Order #123",
"customer_number": "0541234567",
"transaction_id": "TXN_001",
"trans_type": "CTM",
"amount": 10.50,
"nw": "MTN",
"nickname": "John Doe",
"payment_option": "MOM",
"currency_code": "GHS",
"currency_val": "1",
"callback_url": "https://your-site.com/webhook/payment-status",
"request_time": "2025-01-15 14:30:00"
}Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
service_id | integer | Yes | Your service identifier |
reference | string | Yes | Payment reference/description |
customer_number | string | Yes | Customer's phone number |
transaction_id | string | Yes | Unique transaction identifier |
trans_type | string | Yes | Must be "CTM" for collections |
amount | number | Yes | Payment amount |
nw | string | Yes | Network provider (MTN, VOD, AIR) |
nickname | string | Yes | Customer's display name |
payment_option | string | Yes | Must be "MOM" for mobile money |
currency_code | string | No | Currency code (e.g., "GHS") |
currency_val | string | No | Currency value |
callback_url | string | Yes | URL to receive payment notifications |
request_time | string | Yes | Request timestamp |
Supported Networks
| Network | Code | Description |
|---|---|---|
| MTN | MTN | MTN Mobile Money |
| Telecel | VOD | Telecel Cash |
| AirtelTigo | AIR | AirtelTigo Money |
Response
Success Response (202)
{
"response_message": "Request successfully received for processing",
"response_code": "202"
}Error Response (401)
{
"response_message": "You are not allowed to use this service",
"response_code": "100"
}Example Usage
cURL
curl -X POST "https://api.bridgeagw.com/make_payment" \
-H "Authorization: Basic <your_credentials>" \
-H "Content-Type: application/json" \
-d '{
"service_id": 1,
"reference": "Payment for Order #123",
"customer_number": "0541234567",
"transaction_id": "TXN_001",
"trans_type": "CTM",
"amount": 10.50,
"nw": "MTN",
"nickname": "John Doe",
"payment_option": "MOM",
"currency_code": "GHS",
"currency_val": "1",
"callback_url": "https://your-site.com/webhook/payment-status",
"request_time": "2025-01-15 14:30:00"
}'JavaScript
const response = await fetch('https://api.bridgeagw.com/make_payment', {
method: 'POST',
headers: {
'Authorization': 'Basic <your_credentials>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
service_id: 1,
reference: "Payment for Order #123",
customer_number: "0541234567",
transaction_id: "TXN_001",
trans_type: "CTM",
amount: 10.50,
nw: "MTN",
nickname: "John Doe",
payment_option: "MOM",
currency_code: "GHS",
currency_val: "1",
callback_url: "https://your-site.com/webhook/payment-status",
request_time: "2025-01-15 14:30:00"
})
});
const result = await response.json();
console.log(result);Python
import requests
url = "https://api.bridgeagw.com/make_payment"
headers = {
"Authorization": "Basic <your_credentials>",
"Content-Type": "application/json"
}
data = {
"service_id": 1,
"reference": "Payment for Order #123",
"customer_number": "0541234567",
"transaction_id": "TXN_001",
"trans_type": "CTM",
"amount": 10.50,
"nw": "MTN",
"nickname": "John Doe",
"payment_option": "MOM",
"currency_code": "GHS",
"currency_val": "1",
"callback_url": "https://your-site.com/webhook/payment-status",
"request_time": "2025-01-15 14:30:00"
}
response = requests.post(url, headers=headers, json=data)
result = response.json()
print(result)Payment Flow
- Initiate Payment: Send payment request with customer's phone number
- Customer Notification: Customer receives mobile money prompt
- Customer Confirmation: Customer authorizes payment on their device
- Payment Processing: Funds are transferred from customer to your account
- Callback Notification: You receive confirmation via webhook
Callbacks
After initiating a payment, you'll receive callbacks at your callback_url with the transaction status. See the Callbacks section for more details.
Best Practices
- Phone Number Format: Use the correct format for each country
- Transaction IDs: Ensure they are unique across all your transactions
- Amount Validation: Validate amounts before sending requests
- Error Handling: Implement proper error handling for failed payments
- Testing: Always test with small amounts first
Common Use Cases
- E-commerce: Online store payments
- Service Payments: Utility bills, subscriptions
- Donations: Charity and fundraising
- Marketplace: Peer-to-peer transactions
- Digital Services: App purchases, digital content
Notes
- Mobile money payments are processed in real-time
- Customer must have sufficient mobile money balance
- Some networks may have transaction limits
- Always provide clear payment descriptions
- Monitor callback responses for payment status updates