M-Pesa Verification

How to verify an M-Pesa receipt

M-Pesa is Safaricom's mobile money service operating in Ethiopia. Tuna verifies M-Pesa receipts using their JSON API and PDF parsing.

⚠️ Geo-blocked — M-Pesa's receipt endpoint is only accessible from Ethiopian IP addresses.

What you need

  • Transaction reference — Found on your M-Pesa receipt or SMS
  • Ethiopian IP — The endpoint is geo-blocked outside Ethiopia

Step-by-step verification

1

Find your reference number

Check your M-Pesa app or SMS notification. The reference is usually labeled "Transaction ID" or "Ref".

2

Select M-Pesa

Choose "M-Pesa" from the bank dropdown, or paste the reference — Tuna auto-detects M-Pesa references.

3

Verify

Tuna calls M-Pesa's API, parses the response, and returns structured data: amount, sender, receiver, date, and status.

API verification

# Verify an M-Pesa transaction
curl -X POST https://api.txna.me/verify \
-H "Content-Type: application/json" \
-d '{"bank": "mpesa", "ref": "TR1234567890"}'

Self-hosting

If you need to verify M-Pesa receipts from outside Ethiopia, you can self-host Tuna on an Ethiopian server:

git clone https://github.com/axialhash/tuna.git
cd tuna && docker compose up -d