Variation Codes API

This section contains the recommended flow for getting variation codes for products that have variations on the VTpass RESTful API.

This section shows how to get variation codes in a generic form even though you can find something similar on the individual.

 

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.

 

 

GET VARIATION CODES

Using a GET method, the VTpass variation codes for GOTV bouquets [for instance] can be accessed with the endpoint below:

Live:   https://vtpass.com/api/service-variations?serviceID=gotv

Sandbox: https://sandbox.vtpass.com/api/service-variations?serviceID=gotv

FIELDS Mandatory/Optional TYPE DESCRIPTION
serviceID M string The service ID will definitely change to get variation codes for other product/service

 

EXPECTED RESPONSE

{  
   "response_description":"000",
   "content": {
      "ServiceName":"GOTV Payment",
      "serviceID":"gotv",
      "convinience_fee":"100 %",
      "variations":[  
         {  
            "variation_code":"gotv-lite",
            "name":"GOtv Lite N400",
            "variation_amount":"400.00",
            "fixedPrice":"Yes"
         },
         {  
            "variation_code":"gotv-value",
            "name":"GOtv value N1250",
            "variation_amount":"1250.00",
            "fixedPrice":"Yes"
         },
         ...
      ],
   }
}

NOTE: The service ID will definitely change to get variation codes for other product/service