Mamlaka
Payment API
Accept and send payments via mobile money, card, and bank transfer. Integrate seamlessly with M-Pesa, card gateways, and bank APIs across Africa.
REST API
JSON over HTTPS with JWT authentication
Callbacks
Async notifications for payment status
Multi-Channel
M-Pesa, Card, and Bank Transfer support
https://payments.mam-laka.com/api/v1Authentication
All authenticated endpoints require an Authorization: Bearer <token> header. First generate a token using Basic Auth via the endpoint.
Key Response Fields
secureIdEncrypted transaction identifier for secure referenceexternalIdYour merchant-provided reference IDtransactionStatusFinal state: COMPLETE, FAILED, or PENDINGtransactionReportDetailed status reportnetAmountAmount received after deductions/feescurrencyTransaction currency code (KES, USD, NGN, etc.)Authentication
Obtain a JWT token required for all subsequent API operations. Use Basic Auth with your merchant credentials.
/api/v1BASICGenerate Token
Obtain a JWT token using your merchant credentials via Basic Authentication. This token is required for all other API calls.
Request
curl -X GET 'https://payments.mam-laka.com/api/v1' \
-H 'Authorization: Basic <credentials>'Response
{
"token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
"expiresIn": 3600
}Mobile Money
Initiate STK Push payments (C2B) and money transfers (B2C) via mobile money providers like M-Pesa.
/api/v1/mobile/initiateBEARERSTK Push (C2B)
Initiate an STK push to request payment from a customer's mobile money account. The customer receives a prompt on their phone to authorize the payment.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
impalaMerchantId | string | Yes | Your merchant username/ID |
displayName | string | Yes | Business name displayed to the customer on STK prompt |
currency | string | Yes | Currency code (e.g. "KES") |
amount | number | Yes | Amount to charge |
payerPhone | string | Yes | Customer phone number in international format (e.g. "254...") |
mobileMoneySP | string | Yes | Mobile money service provider (e.g. "M-Pesa") |
externalId | string | Yes | Your unique reference for this transaction |
callbackUrl | string | Yes | URL to receive payment status callbacks |
Request
{
"impalaMerchantId": "your_merchant_id",
"displayName": "AVIATOR",
"currency": "KES",
"amount": 10,
"payerPhone": "254712345678",
"mobileMoneySP": "M-Pesa",
"externalId": "order_12345",
"callbackUrl": "https://your-app.com/callback"
}Response
{
"message": "Payment initiation successful",
"secureId": "qdml8553ZeInavKorBHzLA==",
"transactionId": "order_12345"
}/api/v1/mobile/transferBEARERMoney Transfer (B2C)
Transfer money from your merchant account to a customer's mobile money account.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
impalaMerchantId | string | Yes | Your merchant username/ID |
currency | string | Yes | Currency code (e.g. "KES") |
amount | number | Yes | Amount to transfer |
recipientPhone | string | Yes | Recipient phone number in international format (e.g. "254...") |
mobileMoneySP | string | Yes | Mobile money service provider (e.g. "M-Pesa") |
externalId | string | Yes | Your unique reference for this transaction |
callbackUrl | string | Yes | URL to receive transfer status callbacks |
Request
{
"impalaMerchantId": "your_merchant_id",
"currency": "KES",
"amount": 10,
"recipientPhone": "254712345678",
"mobileMoneySP": "M-Pesa",
"externalId": "transfer_12345",
"callbackUrl": "https://your-app.com/callback"
}Response
{
"message": "Payment initiation successful",
"secureId": "qdml8553ZeInavKorBHzLA==",
"transactionId": "a392-45d1-93c1-58f9447915e717138558"
}Card Payments
Process card payments through a secure hosted payment page. Customers are redirected to complete payment.
/api/v1/card/initiateBEARERInitiate Card Payment
Process card payments through a secure payment gateway. Returns a hosted payment link for the customer to complete the transaction.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
impalaMerchantId | string | Yes | Your merchant username/ID |
currency | string | Yes | Currency code (e.g. "USD") |
amount | number | Yes | Amount to charge |
mobileMoneySP | string | Yes | Must be "card" |
externalId | string | Yes | Your unique reference for this transaction |
redirectUrl | string | Yes | URL to redirect customer after payment completes |
callbackUrl | string | Yes | URL to receive payment status callbacks |
Request
{
"impalaMerchantId": "your_merchant_id",
"currency": "USD",
"amount": 1,
"mobileMoneySP": "card",
"externalId": "card_order_12345",
"redirectUrl": "https://your-app.com/payment-complete",
"callbackUrl": "https://your-app.com/callback"
}Response
{
"cardLink": "https://payments.mam-laka.com/pay?data=...",
"message": "card Payment initiation successful",
"secureId": "OWXJJDUMgPvh9XQhSBy9xg=="
}Bank Transfer
Receive payments via bank transfer. Generate virtual account details for customers to pay into.
/api/v1/bank/payinBEARERBank Transfer (Payin)
Receive payments via bank transfer from customers. Generates temporary bank account details for the customer to transfer funds to.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
externalId | string | Yes | Your unique reference for this transaction |
amount | number | Yes | Amount to collect |
currency | string | Yes | Currency code (e.g. "NGN") |
callbackUrl | string | Yes | URL to receive payment status callbacks |
customerName | string | Yes | Name of the paying customer |
customerEmail | string | Yes | Email of the paying customer |
accountName | string | Optional | Label shown to the payer (defaults to "Payment") |
Request
{
"externalId": "bank_order_12345",
"amount": 100,
"currency": "NGN",
"accountName": "Demo account",
"callbackUrl": "https://your-app.com/callback",
"customerName": "John Doe",
"customerEmail": "[email protected]"
}Response
{
"secureId": "PSJRU873PGPI",
"externalId": "bank_order_12345",
"status": "pending",
"message": "Bank transfer initiated. Customer should pay to the account below.",
"amount": 100,
"currency": "NGN",
"bankAccountName": "Demo account",
"bankAccountNumber": "5010875892",
"bankName": "vfd",
"bankCode": "566",
"expiryDate": "2026-03-14T01:26:36.263Z"
}Balance
Check your merchant account balances for payins and payouts.
/api/v1/balance/payinsBEARERPayins Balance
Retrieve the current balance of funds received from customers (payins).
Request
curl -X GET 'https://payments.mam-laka.com/api/v1/balance/payins' \
-H 'Authorization: Bearer <token>'Response
{
"balance": 15000,
"currency": "KES"
}/api/v1/balance/payoutsBEARERPayouts Balance
Retrieve the current balance available for payouts to customers.
Request
curl -X GET 'https://payments.mam-laka.com/api/v1/balance/payouts' \
-H 'Authorization: Bearer <token>'Response
{
"balance": 8500,
"currency": "KES"
}Transactions
Query the status of any transaction using its secure ID or external reference.
/api/v1/transaction/status/{transactionId}BEARERTransaction Status
Check the current status of any transaction using its secure ID or your external reference ID.
Request
curl -X GET 'https://payments.mam-laka.com/api/v1/transaction/status/{transactionId}' \
-H 'Authorization: Bearer <token>'Response
{
"secureId": "qdml8553ZeInavKorBHzLA==",
"externalId": "order_12345",
"amount": 10,
"currency": "KES",
"transactionStatus": "COMPLETE",
"transactionReport": "COMPLETE",
"netAmount": 10
}