Bridge API DocsBridge API Docs
Bridge API Docs
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_payment

Request Headers

Authorization: Basic <base64_encoded_credentials>
Content-Type: application/json

Request 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

ParameterTypeRequiredDescription
service_idintegerYesYour service identifier
referencestringYesPayment reference/description
customer_numberstringYesCustomer's phone number
transaction_idstringYesUnique transaction identifier
trans_typestringYesMust be "CTM" for collections
amountnumberYesPayment amount
nwstringYesNetwork provider (MTN, VOD, AIR)
nicknamestringYesCustomer's display name
payment_optionstringYesMust be "MOM" for mobile money
currency_codestringNoCurrency code (e.g., "GHS")
currency_valstringNoCurrency value
callback_urlstringYesURL to receive payment notifications
request_timestringYesRequest timestamp

Supported Networks

NetworkCodeDescription
MTNMTNMTN Mobile Money
TelecelVODTelecel Cash
AirtelTigoAIRAirtelTigo 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

  1. Initiate Payment: Send payment request with customer's phone number
  2. Customer Notification: Customer receives mobile money prompt
  3. Customer Confirmation: Customer authorizes payment on their device
  4. Payment Processing: Funds are transferred from customer to your account
  5. 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