NamibraPay

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/collect
Initiate a direct collection against a payer's mobile money wallet or bank account.

Authenticates with your API keys.

Body parameters

ParameterDescription
amountrequiredintegerAmount in minor units (pesewas), whole cedis only. GHS 10.00 = 1000. Minimum GHS 1.
currencydefault: GHSrequiredstringISO currency code.
channelrequiredstringPayment rail to charge: mtn_momo, telecel_cash, airteltigo_money or bank_transfer.
payerIdentifierrequiredstringThe payer's momo number (+233…) or bank account details for bank_transfer.
referencerequiredstringYour unique idempotency reference, e.g. ORDER-12345. Sending the same reference twice won't double-charge.
feeBeareroptionalstringpayer adds the fee to what the payer is charged; merchant deducts it from your settlement. Overrides your account default.
descriptionoptionalstringFree-text description shown on statements.
callbackUrloptionalstringOptional per-transaction redirect, mirroring checkout behaviour.
metadataoptionalobjectArbitrary JSON echoed back on webhooks.
subaccountIdoptionalstringSplit 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

ChannelRail
mtn_momoMTN Mobile Money
telecel_cashTelecel Cash
airteltigo_moneyAirtelTigo Money
bank_transferBank 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}/receipt
Retrieve 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}/reverse
Reverse 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" }'