Data Script API Gateway Documentation

Complete API documentation for integrating MTN data gifting, data sharing, transfer, eligibility check, and transaction status services.

Base URL

https://yourdomain.com/api/mtn.php

Request Method

POST

Content Type

Content-Type: application/json

Response Format

All responses are returned in JSON format.

Success Response
{
    "success": true,
    "data": {}
}
Error Response
{
    "success": false,
    "message": "Error description"
}

1. Data Gifting

Transfer a data bundle from one MTN subscriber to another.

Request
{
    "action": "gift",
    "sender": "2348012345678",
    "receiver": "2348098765432",
    "bundle_id": "100MB"
}
Parameters
Parameter Type Required Description
actionstringYesMust be gift
senderstringYesSponsor MSISDN
receiverstringYesBeneficiary MSISDN
bundle_idstringYesMTN Bundle ID
Example Response
{
    "success": true,
    "data": {
        "status": "SUCCESS",
        "transactionId": "TX123456789"
    }
}

2. Customer Data Share

Add a consumer to a provider's data sharing group.

Request
{
    "action": "datashare",
    "provider": "2348012345678",
    "consumer": "2348098765432"
}
Parameters
ParameterTypeRequiredDescription
actionstringYesMust be datashare
providerstringYesProvider MSISDN
consumerstringYesConsumer MSISDN

3. Activate Data Share Provider

Activate a provider for data sharing.

Request
{
    "action": "activate",
    "provider": "2348012345678"
}
Parameters
ParameterTypeRequiredDescription
actionstringYesMust be activate
providerstringYesProvider MSISDN

4. Check Data Share Eligibility

Verify whether a subscriber is eligible for data sharing.

Request
{
    "action": "eligibility",
    "provider": "2348012345678"
}
Parameters
ParameterTypeRequiredDescription
actionstringYesMust be eligibility
providerstringYesProvider MSISDN

5. Customer Summary

Retrieve customer sharing information and summary.

Request
{
    "action": "summary",
    "customer_id": "2348012345678"
}
Parameters
ParameterTypeRequiredDescription
actionstringYesMust be summary
customer_idstringYesCustomer Identifier

6. Data Transfer

Transfer data allocation between MTN customers.

Request
{
    "action": "transfer",
    "sender": "2348012345678",
    "receiver": "2348098765432",
    "amount": "500"
}
Parameters
ParameterTypeRequiredDescription
actionstringYesMust be transfer
senderstringYesSender MSISDN
receiverstringYesReceiver MSISDN
amountstringYesTransfer Amount

7. Transaction Status

Retrieve the status of a previous transaction.

Request
{
    "action": "status",
    "transaction_id": "TX123456789"
}
Parameters
ParameterTypeRequiredDescription
actionstringYesMust be status
transaction_idstringYesTransaction Reference

HTTP Status Codes

Code Meaning
200Request Successful
400Invalid Request
401Unauthorized
404Resource Not Found
500Internal Server Error

Notes

  1. All MSISDNs must be supplied in international format, for example 2348012345678.
  2. Requests must be sent as JSON.
  3. The API returns MTN response data in the data object.
  4. Transaction references should be stored for reconciliation and status checks.
  5. Invalid actions will return an error response.

Core Platform Features

🔐 OAuth Authentication

Secure token-based authentication for MTN APIs with automatic token management and renewal.

📊 Transaction Monitoring

View transaction history, status updates, and reconciliation reports from a central dashboard.

📡 Real-Time Callbacks

Receive instant notifications whenever MTN sends transaction updates.

👥 Customer Data Sharing

Manage providers and consumers within MTN Data Share groups.

🎁 Data Gifting

Transfer MTN data bundles directly to beneficiaries through API automation.

🔄 Data Transfer

Transfer data allocations between customers with full transaction tracking.

Enterprise Ready MTN Integration Platform

A complete MTN API gateway solution for developers, telecom service providers, VTU operators, aggregators, and enterprise businesses.

7+

MTN Services

100%

API Driven

24/7

Transaction Monitoring

PHP

Enterprise Framework

`