9mobile VTU API Integration

This section contains the recommended flow for integrating 9mobile VTU (formally Etisalat) services on the VTpass RESTful API.

 

Authentication

The VTpass API uses Basic Authentication.

It should be passed as a concatenated string like this

username:password

Please use the following details for authentication

Username: YourVtpassEmail

Password: YourPassword

Please create your authentication details by following the instructions here.

 

Available Endpoints

To integrate the VTpass 9mobile VTU RESTful API, the endpoints below applies:

  • Purchase Product
  • Query transaction status

 

Purchase products

Using a POST method, 9mobile VTU services can be purchased with the endpoint below:

Live: https://vtpass.com/api/pay

Sandbox: https://sandbox.vtpass.com/api/pay

ServiceID: etisalat

 

On Sandbox, test phone number: 08011111111

To simulate a failed transaction, please use any number apart from the one provided above as phone number.

 

 

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
amount M Number The amount you wish to topup
phone M Number The phone number of the recipient of this service

 

EXPECTED RESPONSE

{  
   "code":"000",
   "response_description":"TRANSACTION SUCCESSFUL",
   "requestId":"SAND0192837465738253A1HSD",
   "transactionId":"1563873435424",
   "amount":"50.00",
   "transaction_date":{  
      "date":"2019-07-23 10:17:16.000000",
      "timezone_type":3,
      "timezone":"Africa/Lagos"
   },
   "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

{
    "code": "000",
    "content": {
        "transactions": {
            "status": "delivered",
            "product_name": "9mobile Airtime VTU",
            "unique_element": "08011111111",
            "unit_price": 1000,
            "quantity": 1,
            "service_verification": null,
            "channel": "api",
            "commission": 30,
            "total_amount": 970,
            "discount": null,
            "type": "Airtime Recharge",
            "email": "sandbox@vtpass.com",
            "phone": "07061933309",
            "name": null,
            "convinience_fee": 0,
            "amount": 1000,
            "platform": "api",
            "method": "api",
            "transactionId": "1586355555375"
        }
    },
    "response_description": "TRANSACTION SUCCESSFUL",
    "requestId": "3476wj2jjjajahhhaa768hjjdhshdddsh",
    "amount": "1000.00",
    "transaction_date": {
        "date": "2020-04-08 15:19:15.000000",
        "timezone_type": 3,
        "timezone": "Africa/Lagos"
    },
    "purchased_code": ""
}