Introduction
#Welcome to the Tunzaa Pay 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.tz/api/v1Authentication
#The Tunzaa API uses API keys to authenticate requests. You can view and manage your API keys in the Dashboard.
Your API keys accept key-value pairs of api_key and secret_key. Ensure you keep your keys secure! Do not share your secret API keys in publicly accessible areas such as GitHub, client-side code, and so forth.
AI Integration (MCP)
#Tunzaa Pay supports the Model Context Protocol (MCP), allowing you to integrate directly with AI assistants like Claude Desktop, Cursor, and Windsurf.
Why use MCP?
By configuring the MCP server, you give your AI context about the Tunzaa API, enabling it to write integration code, debug errors, and answer questions specifically for your codebase.
claude_desktop_config.jsonAuthentication
#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.
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: POST
Retrieve a paginated list of installment plans.
Get Plan Details
#Method: GET
Get detailed information about a specific plan.
| Parameter | Type | Description |
|---|---|---|
| plan_idRequired | number | - |
Update Plan
#Method: PUT
Modify an existing plan's details.
| Parameter | Type | Description |
|---|---|---|
| plan_idRequired | number | - |
Cancel Plan
#Method: DELETE
Terminate an installment plan.
| Parameter | Type | Description |
|---|---|---|
| plan_idRequired | number | - |