Payments API for Uganda

Take mobile money payments with one API

Ask a customer to pay, get a signed callback when it succeeds, and see every payment and your balance in one portal.

Customers pay withMTN MoMoAirtel Money
A payment, start to finishExample
Customer paysUGX 28,000
Referenceorder-1042
StatusPending
Customer approves on their phoneSuccessful

Your server receives a signed collection.succeeded callback and the amount is added to your balance.

How you get started

1. Create an account

Sign up in a minute. You start in a sandbox with test payments and no real money.

2. Get a sandbox key

Create a key in the portal. It is shown once, so store it safely on your server.

3. Make a test payment

Send a payment request with your key and see the customer prompt result.

4. Handle callbacks

Get a signed callback when a payment succeeds or fails, and update your system.

Sandbox first. Test every outcome with no real money. A number ending 0000 is declined, 1111 stays pending, any other succeeds.

Reviewed go-live. When you are ready, request production access. We review your business and whitelist your server's IP address.

Safe retries. Send an Idempotency-Key with each request and a retry never charges a customer twice.

API reference

Base address: https://business.baigamats.com/api/v1. Send your key as Authorization: Bearer YOUR_KEY. Sandbox keys start with bgm_test_, live keys with bgm_live_. Amounts are in UGX.

POST/payments/collect

Idempotency-Key: order-1042

{
  "amount": 28000,
  "phone": "0771234567",
  "reference": "order-1042",
  "description": "Table 4 bill"
}

Returns 202 with status: "pending". The customer approves on their phone.

GET/payments/{id or your reference}

{
  "data": {
    "id": "99ecc2b7-...",
    "status": "successful",
    "amount_charged": 1500,
    "fee": 500,
    "amount_received": 1000,
    "currency": "UGX",
    "payer_phone": "0702758997",
    "merchant_reference": "order-1042"
  }
}

status is pending, successful or failed. Also: GET /balance.

Callbacks

Add a webhook address in the portal and subscribe to collection.succeeded and collection.failed. Each call is signed, and failed deliveries are retried.

Baigamats-Event: collection.succeeded
Baigamats-Signature: t=1730362222,v1=8f4a9e2b1c9d7e6f5a3b2c1d4e6f7a8b...
  • ✓Verify the signature with your webhook secret (HMAC-SHA256 of t.body).
  • ✓Process the event, then answer with any 2xx status.

Contact us

Questions about Baipay, pricing or going live? Send us a message and we will reply by email.

Start testing in the sandbox today

Payouts, bill payments and card payments are coming next.

Create account