9mobile Data Subscription API
This section contains the recommended flow for integrating 9mobile Data Subscription services on the VTpass RESTful API.
Authentication
Learn about authentication from here.
Available Endpoints
To integrate the VTpass 9mobile Data Subscription Payment RESTful API, the endpoints below applies:
- Get Variation Codes: this returns variation codes for various 9mobile Data (subscription plans)
- Purchase Product (Using the variation code gotten in the first step)
- Query transaction status
GET VARIATION CODES
Using a GET method, the VTpass variation codes for 9mobile Data subscription plans can be accessed with the endpoint below:
Live: https://vtpass.com/api/service-variations?serviceID=etisalat-data
Sandbox: https://sandbox.vtpass.com/api/service-variations?serviceID=etisalat-data
FIELDS | Mandatory/Optional | TYPE | DESCRIPTION |
N/A | N/A | N/A | N/A |
EXPECTED RESPONSE
{ "response_description": "000", "content": { "ServiceName": "9mobile Data", "serviceID": "etisalat-data", "convinience_fee": "0 %", "variations": [ { "variation_code": "eti-100", "name": "9mobile Data - 100 Naira - 100MB - 1 day", "variation_amount": "100.00", "fixedPrice": "Yes" }, { "variation_code": "eti-200", "name": "9mobile Data - 200 Naira - 650MB - 1 day", "variation_amount": "200.00", "fixedPrice": "Yes" }, { "variation_code": "eti-500", "name": "9mobile Data - 500 Naira - 500MB - 30 Days", "variation_amount": "500.00", "fixedPrice": "Yes" }, { "variation_code": "eti-1000", "name": "9mobile Data - 1000 Naira - 1.5GB - 30 days", "variation_amount": "1000.00", "fixedPrice": "Yes" }, { "variation_code": "eti-2000", "name": "9mobile Data - 2000 Naira - 4.5GB Data - 30 Days", "variation_amount": "2000.00", "fixedPrice": "Yes" }, { "variation_code": "eti-5000", "name": "9mobile Data - 5000 Naira - 15GB Data - 30 Days", "variation_amount": "5000.00", "fixedPrice": "Yes" }, { "variation_code": "eti-10000", "name": "9mobile Data - 10000 Naira - 40GB - 30 days", "variation_amount": "10000.00", "fixedPrice": "Yes" }, { "variation_code": "eti-15000", "name": "9mobile Data - 15000 Naira - 75GB - 30 Days", "variation_amount": "15000.00", "fixedPrice": "Yes" }, { "variation_code": "eti-27500", "name": "9mobile Data - 27,500 Naira - 30GB - 90 days", "variation_amount": "27500.00", "fixedPrice": "Yes" }, { "variation_code": "eti-55000", "name": "9mobile Data - 55,000 Naira - 60GB - 180 days", "variation_amount": "55000.00", "fixedPrice": "Yes" }, { "variation_code": "eti-110000", "name": "9mobile Data - 110,000 Naira - 120GB - 365 days", "variation_amount": "110000.00", "fixedPrice": "Yes" }, { "variation_code": "eti-300", "name": "9mobile 1GB + 100MB (1 day) - 300 Naira", "variation_amount": "300.00", "fixedPrice": "Yes" }, { "variation_code": "eti-2500", "name": "9mobile 11GB (7GB+ 4GB Night) - 2,500 Naira - 30 days", "variation_amount": "2500.00", "fixedPrice": "Yes" }, { "variation_code": "eti-7000", "name": "9mobile 35 GB - 7,000 Naira - 30 days", "variation_amount": "7000.00", "fixedPrice": "Yes" }, { "variation_code": "eti-20000", "name": "9mobile 125GB - 20,000 Naira - 30 days", "variation_amount": "20000.00", "fixedPrice": "Yes" }, { "variation_code": "eti-1000", "name": "9mobile 4GB (2GB + 2GB Night) - 1000 Naira", "variation_amount": "1000.00", "fixedPrice": "Yes" }, { "variation_code": "eti-1500-7", "name": "9mobile 7GB (6GB+1GB Night) - 7 days", "variation_amount": "1500.00", "fixedPrice": "Yes" }, { "variation_code": "eti-150-1", "name": "9mobile 200MB (100MB + 100MB night) + 300secs - 1 day", "variation_amount": "150.00", "fixedPrice": "Yes" } ], "varations": [ { "variation_code": "eti-100", "name": "9mobile Data - 100 Naira - 100MB - 1 day", "variation_amount": "100.00", "fixedPrice": "Yes" }, { "variation_code": "eti-200", "name": "9mobile Data - 200 Naira - 650MB - 1 day", "variation_amount": "200.00", "fixedPrice": "Yes" }, { "variation_code": "eti-500", "name": "9mobile Data - 500 Naira - 500MB - 30 Days", "variation_amount": "500.00", "fixedPrice": "Yes" }, { "variation_code": "eti-1000", "name": "9mobile Data - 1000 Naira - 1.5GB - 30 days", "variation_amount": "1000.00", "fixedPrice": "Yes" }, { "variation_code": "eti-2000", "name": "9mobile Data - 2000 Naira - 4.5GB Data - 30 Days", "variation_amount": "2000.00", "fixedPrice": "Yes" }, { "variation_code": "eti-5000", "name": "9mobile Data - 5000 Naira - 15GB Data - 30 Days", "variation_amount": "5000.00", "fixedPrice": "Yes" }, { "variation_code": "eti-10000", "name": "9mobile Data - 10000 Naira - 40GB - 30 days", "variation_amount": "10000.00", "fixedPrice": "Yes" }, { "variation_code": "eti-15000", "name": "9mobile Data - 15000 Naira - 75GB - 30 Days", "variation_amount": "15000.00", "fixedPrice": "Yes" }, { "variation_code": "eti-27500", "name": "9mobile Data - 27,500 Naira - 30GB - 90 days", "variation_amount": "27500.00", "fixedPrice": "Yes" }, { "variation_code": "eti-55000", "name": "9mobile Data - 55,000 Naira - 60GB - 180 days", "variation_amount": "55000.00", "fixedPrice": "Yes" }, { "variation_code": "eti-110000", "name": "9mobile Data - 110,000 Naira - 120GB - 365 days", "variation_amount": "110000.00", "fixedPrice": "Yes" }, { "variation_code": "eti-300", "name": "9mobile 1GB + 100MB (1 day) - 300 Naira", "variation_amount": "300.00", "fixedPrice": "Yes" }, { "variation_code": "eti-2500", "name": "9mobile 11GB (7GB+ 4GB Night) - 2,500 Naira - 30 days", "variation_amount": "2500.00", "fixedPrice": "Yes" }, { "variation_code": "eti-7000", "name": "9mobile 35 GB - 7,000 Naira - 30 days", "variation_amount": "7000.00", "fixedPrice": "Yes" }, { "variation_code": "eti-20000", "name": "9mobile 125GB - 20,000 Naira - 30 days", "variation_amount": "20000.00", "fixedPrice": "Yes" }, { "variation_code": "eti-1000", "name": "9mobile 4GB (2GB + 2GB Night) - 1000 Naira", "variation_amount": "1000.00", "fixedPrice": "Yes" }, { "variation_code": "eti-1500-7", "name": "9mobile 7GB (6GB+1GB Night) - 7 days", "variation_amount": "1500.00", "fixedPrice": "Yes" }, { "variation_code": "eti-150-1", "name": "9mobile 200MB (100MB + 100MB night) + 300secs - 1 day", "variation_amount": "150.00", "fixedPrice": "Yes" } ] } }
PURCHASE PRODUCT
Using a POST method, 9mobile Data bundle can with the endpoint below:
Live: https://vtpass.com/api/pay
Sandbox: https://sandbox.vtpass.com/api/pay
ServiceID: etisalat-data
The sandbox environment provides specific scenarios to simulate success, failure, or unexpected outcomes for data purchases. Use the examples below to test and observe how your integration behaves.
Refer to the table below to find the correct phone number for simulating various API responses:
Phone Number | Event | Description |
08011111111 |
Successful | Returns a successful response for testing data purchases. |
201000000000 |
Pending | Simulates an unexpected pending response. |
500000000000 |
Unexpected Response | Simulates an expected response, used to test how your system handles anomalies. |
400000000000 |
No Response | Simulates a scenario where the API returns no response. |
300000000000 |
Timeout | Simulates a timeout scenario for testing response handling under delays. |
Any random phone number other than the above | Failed | Simulates a failed scenario for testing error handling for transaction failure. |
NEEDED PAYLOAD
FIELDS | Mandatory/Optional | TYPE | DESCRIPTION |
request_id | M | String | This is a unique reference with which you can use to identify and query the status of a given transaction after the transaction has been executed. |
serviceID | M | String | Service ID as specified by VTpass. In this case, it is etisalat-data |
billersCode | M | String | The phone number you wish to make the Subscription payment on |
variation_code | M | String | The code of the variation (as specified in the GET VARIATIONS method as variation_code). |
amount | O | Number | The amount of the variation (as specified in the GET VARIATIONS endpoint as variation_amount)
This amount will be ignored as the variation code determine the price of the data bundle. |
phone | M | Number | The phone number of the customer or recipient of this service |
EXPECTED RESPONSE
{ "code": "000", "content": { "transactions": { "status": "delivered", "product_name": "9mobile Data", "unique_element": "08011111111", "unit_price": "100", "quantity": 1, "service_verification": null, "channel": "api", "commission": 3, "total_amount": 97, "discount": null, "type": "Data Services", "email": "sandbox@sandbox.vtpass.com", "phone": "123450987623", "name": null, "convinience_fee": 0, "amount": "100", "platform": "api", "method": "api", "transactionId": "17415998339264364147458602", "commission_details": { "amount": 3, "rate": "3.00", "rate_type": "percent", "computation_type": "default" } } }, "response_description": "TRANSACTION SUCCESSFUL", "requestId": "2025031010436619827", "amount": 100, "transaction_date": "2025-03-10T09:43:53.000000Z", "purchased_code": "" }
QUERY TRANSACTION STATUS
Using a POST method, transaction status can be queried with the endpoint below:
Live: https://vtpass.com/api/requery
Sandbox: https://sandbox.vtpass.com/api/requery
FIELDS | Mandatory/Optional | TYPE | DESCRIPTION |
request_id | M | String |
This is the reference with which you sent when purchasing a transaction after the transaction has been executed. |
EXPECTED RESPONSE
{ "response_description": "TRANSACTION SUCCESSFUL", "code": "000", "content": { "transactions": { "status": "delivered", "product_name": "9mobile Data", "unique_element": "08011111111", "unit_price": 100, "quantity": 1, "service_verification": null, "channel": "api", "commission": 3, "total_amount": 97, "discount": null, "type": "Data Services", "email": "sandbox@sandbox.vtpass.com", "phone": "123450987623", "name": null, "extras": null, "convinience_fee": 0, "amount": 100, "platform": "api", "method": "wallet", "transactionId": "17415998339264364147458602", "product_id": 10, "commission_details": { "amount": 3, "rate": "3.00", "rate_type": "percent", "computation_type": "default" } } }, "requestId": "2025031010436619827", "amount": 100, "transaction_date": "2025-03-10T09:43:53.000000Z", "purchased_code": "" }
You can check out the complete list of RESPONSE CODES HERE.