Collections
Debit a customer's mobile money wallet or bank account directly from your server — ideal when you already know the payer's number and have a flow to collect approval.
Direct charge vs checkout
With a direct charge the customer approves a prompt on their phone — no redirect. If you don't have the payer's number (or want a hosted page), use Checkout instead.
Charge a wallet
POST
/api/v1/transactions/collectInitiate a direct collection against a payer's mobile money wallet or bank account.
Authenticates with your API keys.
Body parameters
| Parameter | Description | |
|---|---|---|
amount | required | integerAmount in minor units (pesewas), whole cedis only. GHS 10.00 = 1000. Minimum GHS 1. |
currencydefault: GHS | required | stringISO currency code. |
channel | required | stringPayment rail to charge: mtn_momo, telecel_cash, airteltigo_money or bank_transfer. |
payerIdentifier | required | stringThe payer's momo number (+233…) or bank account details for bank_transfer. |
reference | required | stringYour unique idempotency reference, e.g. ORDER-12345. Sending the same reference twice won't double-charge. |
feeBearer | optional | stringpayer adds the fee to what the payer is charged; merchant deducts it from your settlement. Overrides your account default. |
description | optional | stringFree-text description shown on statements. |
callbackUrl | optional | stringOptional per-transaction redirect, mirroring checkout behaviour. |
metadata | optional | objectArbitrary JSON echoed back on webhooks. |
subaccountId | optional | stringSplit this collection with a subaccount. See Subaccounts. |
curl -X POST "https://api.namibrapay.com/api/v1/transactions/collect" \
-H "X-API-Key: pk_test_xxxxxxxxxxxxxxxx" \
-H "X-API-Secret: sk_test_xxxxxxxxxxxxxxxx" \
-H "Content-Type: application/json" \
-d '{
"amount": 1000,
"currency": "GHS",
"channel": "mtn_momo",
"payerIdentifier": "+233241234567",
"reference": "ORDER-67890",
"description": "Marketplace order #67890",
"metadata": { "cartId": "cart_991" }
}'200
{
"success": true,
"data": {
"reference": "NPR-k21jf9ds",
"status": "pending",
"amount": 1000,
"currency": "GHS",
"channel": "mtn_momo",
"fee": 15,
"merchantReference": "ORDER-67890"
}
}The charge starts as pending while the customer approves the prompt on their phone. The final status arrives by webhook; poll the verify endpoint if you prefer.
Channels
| Channel | Rail |
|---|---|
| mtn_momo | MTN Mobile Money |
| telecel_cash | Telecel Cash |
| airteltigo_money | AirtelTigo Money |
| bank_transfer | Bank transfer |
Verify a transaction
GET
/api/v1/transactions/{reference}Look up the current state of any transaction by its NamibraPay reference.
Authenticates with your API keys.
curl "https://api.namibrapay.com/api/v1/transactions/NPR-k21jf9ds" \
-H "X-API-Key: pk_test_xxxxxxxxxxxxxxxx" \
-H "X-API-Secret: sk_test_xxxxxxxxxxxxxxxx"200
{
"success": true,
"data": {
"reference": "NPR-k21jf9ds",
"merchantReference": "ORDER-67890",
"status": "success",
"amount": 1000,
"currency": "GHS",
"channel": "mtn_momo",
"fee": 15,
"metadata": { "cartId": "cart_991" },
"createdAt": "2026-10-26T09:14:03.000Z"
}
}A transaction moves through these statuses: pending → processing → success, or ends as failed / reversed.
Receipts
GET
/api/v1/transactions/{reference}/receiptRetrieve a receipt payload for a completed transaction.
Authenticates with your API keys.
curl "https://api.namibrapay.com/api/v1/transactions/NPR-k21jf9ds/receipt" \
-H "X-API-Key: pk_test_xxxxxxxxxxxxxxxx" \
-H "X-API-Secret: sk_test_xxxxxxxxxxxxxxxx"Reversals
POST
/api/v1/transactions/{id}/reverseReverse a settled transaction — e.g. for instant refunds or cancelling a mistaken charge.
Authenticates with your API keys.
curl -X POST "https://api.namibrapay.com/api/v1/transactions/NPR-k21jf9ds/reverse" \
-H "X-API-Key: pk_test_xxxxxxxxxxxxxxxx" \
-H "X-API-Secret: sk_test_xxxxxxxxxxxxxxxx" \
-H "Content-Type: application/json" \
-d '{ "reason": "Duplicate order" }'