Payment Service Provider

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

Base URL
https://payments.mam-laka.com/api/v1

Authentication

All authenticated endpoints require an Authorization: Bearer <token> header. First generate a token using Basic Auth via the endpoint.

PUBLICBASIC AUTHBEARER

Key Response Fields

secureIdEncrypted transaction identifier for secure reference
externalIdYour merchant-provided reference ID
transactionStatusFinal state: COMPLETE, FAILED, or PENDING
transactionReportDetailed status report
netAmountAmount received after deductions/fees
currencyTransaction currency code (KES, USD, NGN, etc.)

Authentication

Obtain a JWT token required for all subsequent API operations. Use Basic Auth with your merchant credentials.

GET/api/v1BASIC

Generate Token

Obtain a JWT token using your merchant credentials via Basic Authentication. This token is required for all other API calls.

Request

cURL
curl -X GET 'https://payments.mam-laka.com/api/v1' \
  -H 'Authorization: Basic <credentials>'

Response

Success (200)
1234
{
  "token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
  "expiresIn": 3600
}

Mobile Money

Initiate STK Push payments (C2B) and money transfers (B2C) via mobile money providers like M-Pesa.

POST/api/v1/mobile/initiateBEARER

STK 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

ParameterTypeRequiredDescription
impalaMerchantIdstringYesYour merchant username/ID
displayNamestringYesBusiness name displayed to the customer on STK prompt
currencystringYesCurrency code (e.g. "KES")
amountnumberYesAmount to charge
payerPhonestringYesCustomer phone number in international format (e.g. "254...")
mobileMoneySPstringYesMobile money service provider (e.g. "M-Pesa")
externalIdstringYesYour unique reference for this transaction
callbackUrlstringYesURL to receive payment status callbacks

Request

Request Body
12345678910
{
  "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

Success (200)
12345
{
  "message": "Payment initiation successful",
  "secureId": "qdml8553ZeInavKorBHzLA==",
  "transactionId": "order_12345"
}
POST/api/v1/mobile/transferBEARER

Money Transfer (B2C)

Transfer money from your merchant account to a customer's mobile money account.

Parameters

ParameterTypeRequiredDescription
impalaMerchantIdstringYesYour merchant username/ID
currencystringYesCurrency code (e.g. "KES")
amountnumberYesAmount to transfer
recipientPhonestringYesRecipient phone number in international format (e.g. "254...")
mobileMoneySPstringYesMobile money service provider (e.g. "M-Pesa")
externalIdstringYesYour unique reference for this transaction
callbackUrlstringYesURL to receive transfer status callbacks

Request

Request Body
123456789
{
  "impalaMerchantId": "your_merchant_id",
  "currency": "KES",
  "amount": 10,
  "recipientPhone": "254712345678",
  "mobileMoneySP": "M-Pesa",
  "externalId": "transfer_12345",
  "callbackUrl": "https://your-app.com/callback"
}

Response

Success (200)
12345
{
  "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.

POST/api/v1/card/initiateBEARER

Initiate Card Payment

Process card payments through a secure payment gateway. Returns a hosted payment link for the customer to complete the transaction.

Parameters

ParameterTypeRequiredDescription
impalaMerchantIdstringYesYour merchant username/ID
currencystringYesCurrency code (e.g. "USD")
amountnumberYesAmount to charge
mobileMoneySPstringYesMust be "card"
externalIdstringYesYour unique reference for this transaction
redirectUrlstringYesURL to redirect customer after payment completes
callbackUrlstringYesURL to receive payment status callbacks

Request

Request Body
123456789
{
  "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

Success (200)
12345
{
  "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.

POST/api/v1/bank/payinBEARER

Bank Transfer (Payin)

Receive payments via bank transfer from customers. Generates temporary bank account details for the customer to transfer funds to.

Parameters

ParameterTypeRequiredDescription
externalIdstringYesYour unique reference for this transaction
amountnumberYesAmount to collect
currencystringYesCurrency code (e.g. "NGN")
callbackUrlstringYesURL to receive payment status callbacks
customerNamestringYesName of the paying customer
customerEmailstringYesEmail of the paying customer
accountNamestringOptionalLabel shown to the payer (defaults to "Payment")

Request

Request Body
123456789
{
  "externalId": "bank_order_12345",
  "amount": 100,
  "currency": "NGN",
  "accountName": "Demo account",
  "callbackUrl": "https://your-app.com/callback",
  "customerName": "John Doe",
  "customerEmail": "[email protected]"
}

Response

Success (200)
12345678910111213
{
  "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.

GET/api/v1/balance/payinsBEARER

Payins Balance

Retrieve the current balance of funds received from customers (payins).

Request

cURL
curl -X GET 'https://payments.mam-laka.com/api/v1/balance/payins' \
  -H 'Authorization: Bearer <token>'

Response

Success (200)
1234
{
  "balance": 15000,
  "currency": "KES"
}
GET/api/v1/balance/payoutsBEARER

Payouts Balance

Retrieve the current balance available for payouts to customers.

Request

cURL
curl -X GET 'https://payments.mam-laka.com/api/v1/balance/payouts' \
  -H 'Authorization: Bearer <token>'

Response

Success (200)
1234
{
  "balance": 8500,
  "currency": "KES"
}

Transactions

Query the status of any transaction using its secure ID or external reference.

GET/api/v1/transaction/status/{transactionId}BEARER

Transaction Status

Check the current status of any transaction using its secure ID or your external reference ID.

Request

cURL
curl -X GET 'https://payments.mam-laka.com/api/v1/transaction/status/{transactionId}' \
  -H 'Authorization: Bearer <token>'

Response

Success (200)
123456789
{
  "secureId": "qdml8553ZeInavKorBHzLA==",
  "externalId": "order_12345",
  "amount": 10,
  "currency": "KES",
  "transactionStatus": "COMPLETE",
  "transactionReport": "COMPLETE",
  "netAmount": 10
}