Introduction
#Welcome to the Malipo API documentation. We provide a simple yet powerful REST API to accept payments, manage subscriptions, and handle payouts across Africa.
Our API is organized around REST. Our API has predictable resource-oriented URLs, accepts form-encoded request bodies, returns JSON-encoded responses, and uses standard HTTP response codes, authentication, and verbs.
Base URL
https://pay-dev.tunzaa.co.tzAuthentication
#The Malipo API uses API keys to authenticate requests. You can view and manage your API keys in the Dashboard.
Exchange your api_key and secret_key for a time-limited Bearer token via POST /accounts/request/token. Keep your credentials secure and never expose them in client-side code or public repositories.
X-Environment header (sandbox or live).AI Integration (MCP)
#Malipo by Tunzaa supports the Model Context Protocol (MCP). Add this single config to any MCP-compatible editor (Claude Desktop, Cursor, Windsurf, etc.) and your AI assistant gets full context about the Malipo API.
Why use MCP?
By configuring the MCP server, you give your AI context about the Malipo API, enabling it to write integration code, debug errors, and answer questions specifically for your codebase.
- Claude Desktop: Settings > Developer > Edit Config, then paste the JSON into the
mcpServerssection. - Cursor: Settings > Features > MCP, then add a new server and paste the JSON config (or open
mcp.json). - Windsurf: Open the Cascade panel, click the MCPs icon, choose
View Raw Config, and paste the JSON into themcpServerssection.
Authentication
#Authenticate your requests using your API Key and Secret.
Get Access Token
#Method: POST
Exchange your API credentials for a time-limited Bearer token.
Payments
#Initiate and track mobile money transactions.
Initiate Payment
#Method: POST
Trigger a USSD push to the customer's mobile device. In sandbox mode you can simulate outcomes via the X-Sandbox-Scenario header (success, failure).
X-Sandbox-Scenario header (e.g., success or failure) to simulate transaction outcomes without real money moving.Check Payment Status
#Method: GET
Verify the final status of a transaction.
| Parameter | Type | Description |
|---|---|---|
| transactionIDRequired | string | The ID returned from initiation |
Installment Plans
#Manage Buy Now Pay Later (BNPL) plans.
Create Plan
#Method: POST
Create a new installment plan for a customer.
List Plans
#Method: GET
Retrieve a paginated list of installment plans.
| Parameter | Type | Description |
|---|---|---|
| page | number | Page number (default: 1) |
| page_size | number | Items per page (default: 20, max: 1000) |
Get Plan Details
#Method: GET
Retrieve full details for a specific installment plan including the customer, plan summary, and generated installments. Append ?include_payments=true to also receive completed payment history and progress totals.
| Parameter | Type | Description |
|---|---|---|
| plan_idRequired | number | The unique 6-digit plan identifier |
| include_payments | boolean | When true, adds payment_history and progress (paid/remaining/percentage) to the response |
Update Plan
#Method: PUT
Partially update a plan and/or its customer. Changing any critical plan field (start_date, end_date, total_amount, payment_frequency, or custom_interval) will regenerate the installment schedule. Other fields update in place without affecting installments.
| Parameter | Type | Description |
|---|---|---|
| plan_idRequired | number | The unique 6-digit plan identifier |
Cancel Plan
#Method: DELETE
Terminate an installment plan.
| Parameter | Type | Description |
|---|---|---|
| plan_idRequired | number | - |
Payment Links
#Create, send, and manage customer-facing payment links. Payment links support a public payment page and mobile money C2B push.
Create Payment Link
#Method: POST
Create a new payment link for the authenticated merchant. The link is immediately active and payable. Set `send_email` to true to also email the payment link to the recipient.
List Payment Links
#Method: GET
List payment links for the authenticated merchant. Admins can filter by merchant and status. Results are paginated.
| Parameter | Type | Description |
|---|---|---|
| page | number | Page number (default: 1) |
| page_size | number | Results per page (default: 20, max: 1000) |
| status | string | Filter by status: active, paid, void |
| merchant | string | Admin only: filter by merchant_id |
| q | string | Search by link ID, recipient name, description, merchant, or phone |
Get Payment Link
#Method: GET
Retrieve full details of a specific payment link.
| Parameter | Type | Description |
|---|---|---|
| invoice_idRequired | string | The payment link ID (e.g. INV-XXXXXXX) |
Update Payment Link
#Method: PATCH
Partially update a payment link. Only active (unpaid) links can be updated.
| Parameter | Type | Description |
|---|---|---|
| invoice_idRequired | string | The payment link ID |
Void Payment Link
#Method: DELETE
Void a payment link so it stops working. Allowed for the link's merchant or an admin. Paid links cannot be voided.
| Parameter | Type | Description |
|---|---|---|
| invoice_idRequired | string | The payment link ID |
Send Payment Link Email
#Method: POST
Send (or re-send) the payment link to the recipient's email.
| Parameter | Type | Description |
|---|---|---|
| invoice_idRequired | string | The payment link ID |
How Callbacks Work
#Configure your callback URL in merchant settings to receive automatic transaction status updates.
Callback Process
- Transaction Status Changes: When a payment completes or fails
- Malipo Sends POST: To your configured callback URL
- Your System Processes: Handle the update and respond with 200 OK
- Retry on Failure: Up to 5 attempts if response is not 200 OK
Callbacks
#Transaction status notifications sent from Malipo to your system.
Transaction Status Callback
#Method: POST
Malipo sends POST requests to your configured sandbox or live callback URL when a transaction completes, fails, or is linked to a payment link. The X-Signature header is an HMAC-SHA256 hex digest of the JSON payload (with alphabetically sorted keys) computed using the API secret key for the transaction's environment.
| Parameter | Type | Description |
|---|---|---|
| transaction_id | string | Unique identifier for the transaction on Malipo |
| reference_id | string | Reference for the transaction on the merchant's system |
| invoice_id | string | Payment link ID if the transaction was linked to a payment link, otherwise null |
| status | string | Current status of the transaction (COMPLETED, FAILED) |
| amount | string | Transaction amount |
| payment_date | string | Payment date (Format: YYYY-MM-DD HH:mm:ss) |
| timestamp | string | When the callback was sent (Format: YYYY-MM-DD HH:mm:ss) |
| remark | string | Human-readable note about the transaction status |
This is what you'll receive from Malipo
