MTN MoMo API integration in Ghana: a simpler route
To charge an MTN MoMo wallet from your own software in Ghana, you can send one request to the berrapay API with the amount, the phone number and the network. The customer gets an approval prompt on their phone, and your system is told the result. The same request works for Telecel and AT by changing one word, so you integrate once.
Step by step
- 1
Get a test key
Use a test key (it starts with bp_test_) while you build: no real money moves. Keep keys on your server, never in a web page or app.
- 2
Send a charge
POST the amount, phone and network to /charges. The network is mtn, telecel or at.
- 3
Wait for approval
The customer approves on their handset. The charge is pending until they do, and it can be approved for 15 minutes.
- 4
Read the result
Listen for payment.succeeded or charge.failed, or read the charge's status.
Charge a phone
// Node.js: send an approval prompt to an MTN MoMo number
const res = await fetch("https://berrapay.com/api/v1/charges", {
method: "POST",
headers: { Authorization: "Bearer " + process.env.BERRAPAY_KEY, "Content-Type": "application/json" },
body: JSON.stringify({ amount: 12, phone: "0241234567", network: "mtn", description: "Waakye and egg" }),
});
const charge = await res.json();
// charge.status is "pending" until the customer approves, then "succeeded" or "failed"
// charge.pay_url is a page the customer can pay from if the prompt doesn't arriveAt a glance
- Endpoint
- POST /v1/charges
- Networks
- mtn, telecel, at
- Time to approve
- 15 minutes
- Statuses
- pending, succeeded, failed, expired, cancelled
- Only charge
- A phone whose owner asked to pay
Common questions
Is this MTN's own API?
No. MTN has its own developer programme for its network. This is the berrapay API, which reaches MTN, Telecel and AT through one integration and one account.
What if the customer doesn't get the prompt?
Give them the pay_url from the charge. They can pay from that page with any network or a card.
Can I prompt any number?
Only a number whose owner has asked to pay you. One number can only be sent a few prompts an hour.
What does it cost?
Payments are in Ghana cedis (GHS). The payer is charged 1% when they pay by Mobile Money, never more than GHS 25 on one payment, or 1.95% when they pay by card. It is added to what they pay, so you receive the full amount. There is no setup or monthly fee, and topping up and withdrawing are free. The full list is at berrapay.com/fees.
Ask an AI assistant about this
Opens the assistant in a new tab with a question about this page already typed. You can change it before sending.