ZenoPay API Technical Reference v1.0

Introduction

This document provides the complete technical reference for ZenoPay's Mobile Money Payments API for Tanzania. It covers all endpoints, request/response formats, and webhook implementations.

Production URL: All API requests must be made to https://zenoapi.com

Authentication

All API requests require authentication via an API key sent in the request header:

x-api-key: YOUR_API_KEY

Note: Replace YOUR_API_KEY with the key provided in your ZenoPay dashboard.

Base URL

The base URL for all API endpoints is:

https://zenoapi.com

All endpoint paths are relative to this base URL.

POST 1. Initiate Mobile Money Payment

Initiate a mobile money payment transaction via USSD push.

Endpoint

/api/payments/mobile_money_tanzania

Request Parameters

Parameter Type Required Description Example
order_id string Yes Unique transaction identifier (UUID recommended) "3rer407fe-3ee8-4525-456f-ccb95de38250"
buyer_email string Yes Payer's valid email address "customer@example.com"
buyer_name string Yes Payer's full name (no special characters) "John Joh"
buyer_phone string Yes Tanzanian mobile number (format: 07XXXXXXXX) "0744963858"
amount number Yes Transaction amount in TZS (no decimals) 1000
webhook_url string No URL for receiving payment status updates "https://yourdomain.com/webhook"

Example Request

{
  "order_id": "3rer407fe-3ee8-4525-456f-ccb95de38250",
  "buyer_email": "customer@example.com",
  "buyer_name": "John Joh",
  "buyer_phone": "0744963858",
  "amount": 1000,
  "webhook_url": "https://yourdomain.com/webhook"
}

Responses

Success Response (200 OK)

{
  "status": "success",
  "resultcode": "000",
  "message": "Request in progress. You will receive a callback shortly",
  "order_id": "3rer407fe-3ee8-4525-456f-ccb95de38250"
}

Error Responses

HTTP Status Response Body Description
400 Bad Request {"status":"error","message":"Invalid request payload"} Missing or invalid parameters
401 Unauthorized {"status":"error","message":"Invalid API Key"} Invalid or missing API key
500 Server Error {"status":"error","message":"Internal server error"} Server-side processing error

GET 2. Check Order Status

Check the current status of a payment order.

Endpoint

/api/payments/order-status?order_id={order_id}

Query Parameters

Parameter Type Required Description
order_id string Yes The order_id from the payment initiation response

Example Request

curl -X GET "https://zenoapi.com/api/payments/order-status?order_id=3rer407fe-3ee8-4525-456f-ccb95de38250" \
-H "x-api-key: YOUR_API_KEY"

Success Response (200 OK)

{
  "reference": "0936183435",
  "resultcode": "000",
  "result": "SUCCESS",
  "message": "Order fetch successful",
  "data": [
    {
      "order_id": "3rer407fe-3ee8-4525-456f-ccb95de38250",
      "creation_date": "2025-05-19 08:40:33",
      "amount": "1000",
      "payment_status": "COMPLETED",
      "transid": "CEJ3I3SETSN",
      "channel": "MPESA-TZ",
      "reference": "0936183435",
      "msisdn": "255744963858"
    }
  ]
}

Response Fields

Field Type Description
payment_status string Current status (COMPLETED, PENDING, FAILED)
channel string Payment channel (MPESA-TZ, TIGO-TZ, AIRTEL-TZ)
transid string Mobile money transaction reference
msisdn string Customer phone number in international format

Webhook Notifications

ZenoPay can send automatic notifications to your server when payment status changes to COMPLETED.

Setup Instructions

  1. Include the webhook_url parameter in your payment initiation request
  2. Ensure your endpoint is publicly accessible via HTTPS
  3. Implement verification of the x-api-key header
  4. Return HTTP 200 OK response to acknowledge receipt

Example Payment Request with Webhook

{
  "order_id": "3rer407fe-3ee8-4525-456f-ccb95de38250",
  "buyer_email": "customer@example.com",
  "buyer_name": "John Joh",
  "buyer_phone": "0744963858",
  "amount": 1000,
  "webhook_url": "https://yourdomain.com/webhook"
}

Webhook Payload

When a payment status changes to COMPLETED, ZenoPay will POST a JSON payload to your webhook URL.

Headers

x-api-key: YOUR_API_KEY
Content-Type: application/json

Payload Example

{
  "order_id": "677e43274d7cb",
  "payment_status": "COMPLETED",
  "reference": "1003020496",
  "metadata": {}
}

Payload Fields

Field Type Description
order_id string Original order ID from payment request
payment_status string Always "COMPLETED" for webhooks
reference string Mobile money transaction reference
metadata object Additional transaction data (currently empty)
Important: Webhooks are only triggered for COMPLETED payments. For other statuses, use the order status endpoint.

Support & Resources

Get help with integration, troubleshooting, and account management through our comprehensive support channels.

Support Channels

Support Channel Contact Information Response Time
Email Support support@zenopay.net 24 hours
WhatsApp 0793166166 Business hours (8AM - 5PM EAT)
Documentation zenopay-docs.netlify.app 24/7

Common Integration Issues

Issue Solution
Invalid API Key Ensure your API key is correctly set in the request headers as x-api-key: YOUR_API_KEY
Phone Number Format Use Tanzanian format (0744001122) without country code or + sign
Webhook Not Receiving Check your webhook URL is publicly accessible and returns 200 OK. Test with webhook.site first.
SSL Certificate Ensure your webhook endpoint uses valid SSL certificate (Let's Encrypt offers free certificates)
Timeout Issues Set request timeout to at least 60 seconds for payment requests
Payment Status Not Updating Mobile money payments can take several minutes to complete. Use webhooks or poll the status endpoint periodically.

Implementation Guides

Additional Resources

Isaiah Nyalali
Isaiah's Integration Tip
API Developer & Documentation Author

When debugging API issues, I always recommend including these in your support requests:

  • Test API key (mask the first few characters for security)
  • Request samples (both successful and failing ones)
  • Timestamps in UTC format
  • Expected vs actual behavior

This helps me reproduce and resolve issues much faster. Feel free to follow me on LinkedIn!