Skip to main content

Overview

This is the gateway of the Valuetopup system that allows other hosts to connect to it and perform transactions. This API is based on REST principles and uses JSON as the format for data interchange.

Authentication

Each call to the API is authenticated via UserId and Password. Authentication to the API is performed by HTTP Basic Authentication. Prepay Nation will provide a user id and password. Consumers send credentials in userId:password base64-encoded format in the Authorization header.

For example, let’s assume User Id = testuser and Password = test1234. Base64 format of “testuser:test1234” is dGVzdHVzZXI6dGVzdDEyMzQ= This must be in the header of each request – Authorization: Basic dGVzdHVzZXI6dGVzdDEyMzQ==

Response Model Structure

If the Valuetopup API and a response with the HTTP status code of 200, response will be provided in the following format:

{
    "responseCode": "string",
    "responseMessage": "string",
    "payLoad": object
}

Following is the field description:

Field Example value1 Example value2
responseCode 000 501
responseMessage null The Subscriber number is not valid
payload It will show request information only if responseCode is 000. Otherwise, it is always null. null
Transaction Status Successful Failed - It means the transaction is failed as the subscriber number is not valid.

IMPORTANT: Check for successful transaction you must check for 2 condition:

  1. The HTTP status code : 200 OK and
  2. responseCode in the body of the response is "000". If the status code is 200 and responseCode is not "000" then you must follow the API documentation for subsequent actions. If the HTTP status code is other than 200 then consider the transaction as failed.

Successful Transaction Example:

As we can see in the below response, we got HTTP status code: 200 OK Success from the server and also responseCode = "000". So we can say the transaction has been success.

***Http Status Code: 200 OK Success***
Response Body
{
    "responseCode": "000",
    "responseMessage": null,
    "payLoad": object
}

Failed Transaction Example:

As we can see in the below response, we got HTTP status code: 200 OK Success from the server but we got the responseCode = "501" Invalid Subscriber.So this is a Failed Transaction as subscriber number is not valid.

***Http Status Code: 200 OK Success***
Response Body
{
    "responseCode": "501",
    "responseMessage": "The Subscriber number is not valid",
    "payLoad": null
}

Environment

To facilitate integration to the API and for testing, two distinct environments are provided:

Sandbox environment can be used to access all API methods and perform transactions to test scenarios based on Integration test scenario sheet.

Production environmentactual transactions are performed, and it will charge to your account.

Timeout Mitigation

An exceptional scenario might occur in which the recharge transaction does not return a response within the timeout duration set by your system. This might cause your system to throw a timeout error and think that there was not response from Prepay Nation API. The timeout error does not mean that the original transaction has failed in the Prepay Nation system. It means that your system could not wait any longer than the set timeout duration for the response from Prepay nation API. If the original transaction is successful then your account will be charged.

To know the correct and final status of the original transaction we recommend that you implement the Check Status of transaction by customer unique correlation ID API method. This method will return you the final status of the original transaction.

Please follow the steps below: Send the corelationId value with every RTR or PIN transaction. This is the unique id from your system which will help us to identify the original transaction. In case of a request timeout error, call ""Transaction API -> Check Status of transaction by customer unique correlation ID"" method and pass the correlation id from step #1. You should call the Check Status of transaction by customer unique correlation ID method multiple times until you get a definite response of a success or a failure. Please refer to the documentation of ""Transaction API -> Check Status of transaction by customer unique correlation ID"" method.

Test simulation for Sandbox Environment

Scenarios to generate Timeout mitigation:

1.) To generate Timeout error for 120 seconds, follow the below steps: a.) Initiate Top-up: Start the process to top up the mobile number ending with "666666". b.) Wait for 120 seconds: Allow the system 175 seconds to process the transaction. c.) Check Transaction Status: Use the "Transaction API → Check Status of transaction by customer unique correlation ID" to check the status of the transaction. This API likely requires a unique correlation ID associated with the transaction to identify and retrieve its status. d.) Get Final Result: After the 120 seconds timeout, use the unique correlation ID to query the status of the transaction via the "Transaction API". This should give you the final result of the top-up transaction.

2.) To generate Timeout error for 90 seconds, follow the below steps: a.) Initiate Top-up: Start the process to top up the mobile number ending with "555555". b.) Wait for 90 Seconds: Allow the system 90 seconds to process the transaction. c.) Check Transaction Status: Use the "Transaction API → Check Status of transaction by customer unique correlation ID" to check the status of the transaction. This API requires a unique correlation ID associated with the transaction to identify and retrieve its status. d.) Get Final Result: After the 90-second timeout, use the unique correlation ID to query the status of the transaction via the "Transaction API → Check Status of transaction by customer unique correlation ID". This should give you the final result of the top-up transaction.

Scenarios to generate other errors:

3.) Out of Stock sku Error: Mobile Number should end with "510" to generate "Out of Stock" Error Request:

POST https://{HostName}/api/v1/transaction/topup HTTP/1.1
Authorization: Basic c3VwcmVldGFwaTp0ZXN0MTIzNA==
Content-Type: application/json

{
    "skuId": 1451,
    "correlationId": "dinesh666677",
    "mobile": "93989876510",
    "amount": 9,
    "transactionCurrencyCode": "USD"
}

Response:

{
    "responseCode": "510",
    "responseMessage": "The Sku is out of stock",
    "payLoad": null
}

4.) Invalid Denomination Error: mobile number start with "1876" and end with "888" having skuid=193 and amount < 4

Request:

POST https://{HostName}/api/v1/transaction/topup HTTP/1.1
Authorization: Basic c3VwcmVldGFwaTp0ZXN0MTIzNA==
Content-Type: application/json

{
    "skuId": 193,
    "correlationId": "dinesh666677",
    "mobile": "18763351888",
    "amount": 4,
    "transactionCurrencyCode": "USD"
}

Response:

{
    "responseCode": "001",
    "responseMessage": "The charge amount for Denomination Digicel Jamaica should be between 5.00 USD and 100.00 USD",
    "payLoad": null
}

5.) Account Not Activated Error: Mobile Number ending with "500" Request:

POST https://{HostName}/api/v1/transaction/topup HTTP/1.1
Authorization: Basic c3VwcmVldGFwaTp0ZXN0MTIzNA==
Content-Type: application/json                
{
    "skuId": 1451,
    "correlationId": "dinesh666677",
    "mobile": "93989876500",
    "amount": 9,
    "transactionCurrencyCode": "USD"
}

Response:

 {
    "responseCode": "500",
    "responseMessage": "The Account was not activated. a) Possible reasons are: Subscriber number is not found. b) Subscriber account is suspended c) Carrier's experienced internal error. Please try again",
    "payLoad": null
 }

Versioning

The API endpoints are prefixed with a version number to ensure seamless integration and to guarantee that future major changes to the API won't disrupt existing integrations. Within a major version, no breaking changes will be introduced, thus ensuring stability and compatibility. Further details regarding this distinction are elaborated in the subsequent subsection.

Non-Breaking Changes

Also referred to as backward-compatible alterations, these changes enable your integration to function seamlessly without necessitating additional adjustments on your end. They do not mandate a new version number and are implemented without prior notification.

Changes falling under this category are primarily "additive" in nature, as exemplified below:

  • Introduction of new API endpoints
  • Inclusion of optional fields in the request body and/or header
  • Addition of fields to the response body and/or header
  • Data modifications, including:
    • Addition of new Countries / Operators / Products / Services
    • Alteration of text and/or numeric field values, such as:
      • Country / Operator / Product / Service Names
      • Wholesale / Retail Prices and/or Rates
      • Status and Error Descriptions

💡 Before deploying, it is crucial to ensure that your integration is capable of accommodating non-breaking API changes to minimize potential disruptions to your service.

Breaking Changes

Conversely, breaking changes requires adjustments to how your integration functions. These adjustments usually happen when there are significant updates to the API, aimed at improving features or the platform. However, with the endpoints of the API prefixed with a corresponding version number, your existing integration is protected from any disruption due to the complete isolation of implementation differences between versions.

Examples of changes falling under this category include:

  • Removal and/or renaming of API endpoints
  • Addition of required fields to request body and/or header
  • Removal and/or renaming of fields from request body and/or header
  • Removal and/or renaming of fields from response body and/or header

💡 Upon the availability of a new API version, it is advisable to conduct testing in a sandbox environment to ensure seamless compatibility with your implementation before transitioning to the production environment.

Two-Step Bundle Purchase Flow with Loan Requirement

Some operators require customers to pay their outstanding loan amount during a bundle purchase. This scenario follows a specific transaction flow, referred to as a two-step process.

Step 1: Fetch Bundle API

Begin by calling the /catalog/bundles/ API. This API returns:

  • Bundles applicable to the customer's number
  • Loan information, if the customer has any outstanding dues

This ensures that the system can determine whether a loan payment is required before proceeding with the bundle purchase.

Step 2: Perform Bundle Purchase

If the response from Step 1 indicates that a loan payment is necessary, the bundle purchase must be executed in two steps:

  • The amount must include both the Face Value and Loan Amount
  • Pass this information along with the correct skuId, mobile number and transaction Currency to the /transaction/topup/ API

Reference Document

We’ve prepared a detailed document outlining:

  • Step-by-step instructions
  • Sequence diagram for the two-step flow

👉 Click here to open this document

Localization and Multilingual Response Support

The following APIs now support localization:

  1. Catalog SKUs: /api/v2/catalog/skus
  2. Catalog GiftCards: /api/v2/catalog/skus/giftcards
  3. Mobile Number Lookup: /api/v2/lookup/mobile/{mobile}

The fields below are returned in a localized format based on the requested language:

  • SkuName
  • ProductName
  • BenefitType
  • ProductDescription
  • OperatorName
  • AdditionalInformation

By default, API responses are provided in English. However, the system now supports additional languages such as Arabic.

To receive the response in another supported language (e.g., Arabic), the client must include the "Accept-Language" in header with the appropriate language code.

For Arabic, use 'ar'

Account

Check Balance

This method provides a real-time balance. For prepaid terms with Prepay Nation, the balance is returned with a negative sign to indicate available funds. For credit terms, the balance indicates the amount owed.

The transaction will only proceed if your wallet contains sufficient funds. We strongly advise utilizing this API method to monitor your wallet.

Authorizations:
basic

Responses

Request samples

curl -X GET "https://sandbox.valuetopup.com/api/v2/account/balance" \
  -H "Authorization: Basic YOUR_BASE64_CREDENTIALS" \
  -H "Accept: application/json"

Response samples

Content type
application/json
{
  • "responseCode": "",
  • "responseMessage": "",
  • "payLoad": 0.1
}

Catalog

Get a list of Countries

This method can be utilized to retrieve a list of all available countries.

Authorizations:
basic

Responses

Request samples

curl -X GET "https://sandbox.valuetopup.com/api/v2/catalog/countries" \
  -H "Authorization: Basic YOUR_BASE64_CREDENTIALS" \
  -H "Accept: application/json"

Response samples

Content type
application/json
{
  • "responseCode": "",
  • "responseMessage": "",
  • "payLoad": [
    ]
}

Get Operators List

Return the operators list

Authorizations:
basic
query Parameters
operatorId
integer <int32>

Operator Id

countryCode
string

Country Code

Responses

Request samples

curl -X GET "https://sandbox.valuetopup.com/api/v2/catalog/operators" \
  -H "Authorization: Basic YOUR_BASE64_CREDENTIALS" \
  -H "Accept: application/json"

Response samples

Content type
application/json
{
  • "responseCode": "",
  • "responseMessage": "",
  • "payLoad": [
    ]
}

Get a list of Products

Get a list of products available to the agent. You can use OperatorId to get a list of products from /getproducts API. Available Category Id Values: Pin = 1, Rtr = 2, Bill Pay = 4, Sim = 5, Gift Card = 6, eSim = 7.

Authorizations:
basic
query Parameters
operatorId
integer <int32>

Operator Id

categoryId
integer <int32>

Category Id

countryCode
string

Country Code

Responses

Request samples

curl -X GET "https://sandbox.valuetopup.com/api/v2/catalog/getproducts" \
  -H "Authorization: Basic YOUR_BASE64_CREDENTIALS" \
  -H "Accept: application/json"

Response samples

Content type
application/json
{
  • "responseCode": "",
  • "responseMessage": "",
  • "payLoad": [
    ]
}

Get list of Skus

This operation retrieves all products except Gift Card along with their SKU IDs.

Authorizations:
basic
query Parameters
productId
integer <int32>
skuId
integer <int32>
header Parameters
Accept-Language
string

Language code for localized responses (for eg 'ar').

Refer Localization and Multilingual Response Support section for more details.

Responses

Request samples

curl -X GET "https://sandbox.valuetopup.com/api/v2/catalog/skus" \
  -H "Authorization: Basic YOUR_BASE64_CREDENTIALS" \
  -H "Accept: application/json"

Response samples

Content type
application/json
{
  • "responseCode": "",
  • "responseMessage": "",
  • "payLoad": [
    ]
}

Get Exchange Rate

Return the most current exchange of a Sku

Authorizations:
basic
path Parameters
skuId
required
integer <int32>

Sku Id

Responses

Request samples

curl -X GET "https://sandbox.valuetopup.com/api/v2/catalog/sku/exchangeRate/{skuId}" \
  -H "Authorization: Basic YOUR_BASE64_CREDENTIALS" \
  -H "Accept: application/json"

Response samples

Content type
application/json
{
  • "responseCode": "",
  • "responseMessage": "",
  • "payLoad": {
    }
}

Get a list of Error Codes

Authorizations:
basic

Responses

Request samples

curl -X GET "https://sandbox.valuetopup.com/api/v2/catalog/errors" \
  -H "Authorization: Basic YOUR_BASE64_CREDENTIALS" \
  -H "Accept: application/json"

Response samples

Content type
application/json
{
  • "responseCode": "",
  • "responseMessage": "",
  • "payLoad": [
    ]
}

Get list of Bundles

This operation returns list of dynamic bundles

Authorizations:
basic
path Parameters
productId
required
integer <int32>
mobileNumber
required
string

Responses

Request samples

curl -X GET "https://sandbox.valuetopup.com/api/v2/catalog/bundles/{productId}/{mobileNumber}" \
  -H "Authorization: Basic YOUR_BASE64_CREDENTIALS" \
  -H "Accept: application/json"

Response samples

Content type
application/json
{
  • "responseCode": "",
  • "responseMessage": "",
  • "payLoad": [
    ]
}

Get list of Gift Card Skus

This operation retrieves all Gift Card products along with their SKU IDs.

Note: If neither cursor nor a pageSize is provided, the default response will display only 100 Gift Card SKUs.

Authorizations:
basic
query Parameters
cursor
integer <int32>

The cursor is used to retrieve the next set of SKUs. For example, cursor=10, will retrieve SKUs starting from skuId : 10 based on the specified page size.

pageSize
integer <int32>

The number of items to retrieve starting with the cursor. The page size must be at least 1 and not more than 100.

productId
integer <int32>

Product Id - The ProductId can be obtained by the “/catalog/getproducts/” API.

skuId
integer <int32>

Sku Id of denomination

countryCode
string

ISO Country Code e.g. IN for India

header Parameters
Accept-Language
string

Language code for localized responses (for eg 'ar').

Refer Localization and Multilingual Response Support section for more details.

Responses

Request samples

curl -X GET "https://sandbox.valuetopup.com/api/v2/catalog/skus/giftcards" \
  -H "Authorization: Basic YOUR_BASE64_CREDENTIALS" \
  -H "Accept: application/json"

Response samples

Content type
application/json
{
  • "responseCode": "",
  • "responseMessage": "",
  • "payLoad": [
    ],
  • "next": 0,
  • "next_cursor": 0
}

eSIM

eSIM Transaction

This operation is used to buy eSIM products

Authorizations:
basic
Request Body schema: application/json
skuId
required
integer <int32>

Sku Id - The SkuId can be obtained by the “/catalog/skus/” API. The category of the carrier should be ‘eSIM’

correlationId
required
string [ 1 .. 50 ] characters

Unique ID of Customer System

Responses

Request samples

Content type
application/json
{
  • "skuId": 0,
  • "correlationId": ""
}

Response samples

Content type
application/json
{
  • "responseCode": "",
  • "responseMessage": "",
  • "payLoad": {
    }
}

Get Remaining Data Balance of Bundle

This operation is used to check the current data balance of eSIM

Authorizations:
basic
path Parameters
Iccid
required
string

Iccid which you received from eSIM order response

Responses

Request samples

curl -X GET "https://sandbox.valuetopup.com/api/v2/esim/status/{Iccid}" \
  -H "Authorization: Basic YOUR_BASE64_CREDENTIALS" \
  -H "Accept: application/json"

Response samples

Content type
application/json
{
  • "responseCode": "",
  • "responseMessage": "",
  • "payLoad": [
    ]
}

Lookup

Mobile Number Lookup

Get operator and product information for a specific mobile number. Pass mobile number along with country code to validate MSISDN.

Sandbox environment - We only support phone number lookup for Jamaica, India, Pakistan, and Mexico. Please utilize any phone number with a valid country code from these countries for testing purposes in the Sandbox environment.

Production environment - We provide support for all countries excluding the United States and Spain.

Note: Providing end users with the choice to make a final operator selection is crucial. Occasionally, the results obtained from a lookup request may not accurately reflect the most up-to-date information, particularly after a recent porting of the mobile number to a new operator. Introducing this extra step enhances accuracy and enhances the user experience as a whole.

Authorizations:
basic
path Parameters
mobile
required
integer <int64>

Mobile Number with country code

header Parameters
Accept-Language
string

Language code for localized responses (for eg 'ar').

Refer Localization and Multilingual Response Support section for more details.

Responses

Request samples

curl -X GET "https://sandbox.valuetopup.com/api/v2/lookup/mobile/{mobile}" \
  -H "Authorization: Basic YOUR_BASE64_CREDENTIALS" \
  -H "Accept: application/json"

Response samples

Content type
application/json
{
  • "responseCode": "",
  • "responseMessage": "",
  • "payLoad": [
    ]
}

Bill Payment

This operation is used to fetch bill detail

Authorizations:
basic
query Parameters
skuId
integer <int32>

Sku Id of Product

accountNumber
string

bill account number

Responses

Request samples

curl -X GET "https://sandbox.valuetopup.com/api/v2/lookup/billpay/fetch-account-detail" \
  -H "Authorization: Basic YOUR_BASE64_CREDENTIALS" \
  -H "Accept: application/json"

Response samples

Content type
application/json
{
  • "responseCode": "",
  • "responseMessage": "",
  • "payLoad": {
    }
}

Promotion

Get a List of current promotions

Retrieve a list of all currently active promotions.

Authorizations:
basic

Responses

Request samples

curl -X GET "https://sandbox.valuetopup.com/api/v2/promotion/current" \
  -H "Authorization: Basic YOUR_BASE64_CREDENTIALS" \
  -H "Accept: application/json"

Response samples

Content type
application/json
{
  • "responseCode": "",
  • "responseMessage": "",
  • "payLoad": [
    ]
}

Get a List of Upcoming promotions

Retrieve a list of all future promotions.

Authorizations:
basic

Responses

Request samples

curl -X GET "https://sandbox.valuetopup.com/api/v2/promotion/upcoming" \
  -H "Authorization: Basic YOUR_BASE64_CREDENTIALS" \
  -H "Accept: application/json"

Response samples

Content type
application/json
{
  • "responseCode": "",
  • "responseMessage": "",
  • "payLoad": [
    ]
}

Transaction

Mobile Topup

This operation facilitates mobile number top-up. Agents can initiate this request by providing the SkuId, obtained from the Product API, along with the amount, mobile, and correlationId. It's crucial for the agent to include a correlationId, serving as a unique transaction identifier within their system, which can be utilized for reconciliation purposes.

Sandbox Environment: For testing purposes, any number can be passed. However, it's essential to ensure that the mobile number adheres to country-specific formatting guidelines. For example, in Jamaica, the country code is 1876, and the number length is 7 digits. Thus, any number in the format 1876XXXXXXX can be used.

Authorizations:
basic
Request Body schema: application/json

Topup request

skuId
required
integer <int32>

Sku Id - The SkuId can be obtained by the Products API. The category of the carrier should be ‘RTR’

amount
required
number <double>

Top-up Amount - It is by default in Customer Wallet Currency if "transactionCurrencyCode" is not defined. Otherwise, it is based on the "transactionCurrencyCode" field. For example, if the Customer wallet currency is GBP and "TransactionCurrencyCode" is not specified, then the system considers the amount in GBP. However, the customer can send the amount in the destination currency by defining the destination currency code in the "transactionCurrencyCode" field, for example, INR for India or NGN for Nigeria.

mobile
required
string non-empty

Mobile number of the subscriber. it should be as per carrier guideline.

correlationId
required
string [ 1 .. 50 ] characters

Unique ID of Customer System

senderMobile
string or null

Sender Mobile Number

boostPin
string or null [ 0 .. 6 ] characters

4 to 6 digits PIN of Boost Mobile number. This is required only when recharge is for Boost Mobile.

numberOfPlanMonths
integer <int32>

This field is used to buy Lyca Bundle for multiple Months. E.g. If user wants to buy 19 USD Lyca Bundle for 3 months then request should contain 3.

transactionCurrencyCode
string or null

This field is optional. It is used to send amount in destination currency. If customer wanted to send amount in destination country currency than pass ISO currency code of that country in this field. You should check FaceValueCurrency field of /catalog/skus api to check what currency you can pass in this field.
e.g. customer wants to send amount in NGN currency. Then he will pass "NGN"

Array of objects or null (AdditionalInfo)

Some product requires additional information to process transactions. you need to provide that information here in name value pair. You can get this information from Catalog

Responses

Request samples

Content type
application/json
{
  • "skuId": 0,
  • "amount": 0.1,
  • "mobile": "",
  • "correlationId": "",
  • "senderMobile": "",
  • "boostPin": "",
  • "numberOfPlanMonths": 0,
  • "transactionCurrencyCode": "",
  • "additionalInfos": [
    ]
}

Response samples

Content type
application/json
{
  • "responseCode": "",
  • "responseMessage": "",
  • "payLoad": {
    }
}

Pin Transaction

This operation is used to buy PIN products

Authorizations:
basic
Request Body schema: application/json

Pin Request Object

skuId
required
integer <int32>

Sku Id - The SkuId can be obtained by the Products API. The category of the carrier should be PIN

correlationId
required
string [ 1 .. 50 ] characters

Unique ID of Customer System

recipient
string or null

System will use this information to deliver PIN through SMS. Pass mobile number along with country code.Mobile number must belong to same country for which you are buying PIN.e.g.ATT PIN - 1XXXXXXXXXX

Array of objects or null (AdditionalInfo)

Some product requires additional information to process transactions. you need to provide that information here in name value pair. You can get this information from Catalog

Responses

Request samples

Content type
application/json
{
  • "skuId": 0,
  • "correlationId": "",
  • "recipient": "",
  • "additionalInfos": [
    ]
}

Response samples

Content type
application/json
{
  • "responseCode": "",
  • "responseMessage": "",
  • "payLoad": {
    }
}

Bill Payment

This operation is used to perform Bill Payment

Authorizations:
basic
Request Body schema: application/json
skuId
required
integer <int32>

Sku Id - The SkuId can be obtained by the Products API. The category of the carrier should be billpay

amount
required
number <double>

Topup Amount

accountNumber
required
string non-empty

Account number on the Bill or Mobile number in case pf Postpaid Mobile Bill

mobileNumber
string or null

Mobile Number

checkDigits
string or null

Check digits

correlationId
required
string [ 1 .. 50 ] characters

Unique Id of Customer

senderMobile
string or null

Sender Mobile

senderName
string or null

Sender Name

transactionCurrencyCode
string or null <= 3 characters

It tells us currency of "Amount". If it is null or empty then system considers customer wallet currency

Array of objects or null (AdditionalInfo)

Some product requires additional information to process transactions. you need to provide that information here in name value pair. You can get this information from Catalog

Responses

Request samples

Content type
application/json
{
  • "skuId": 0,
  • "amount": 0.1,
  • "accountNumber": "",
  • "mobileNumber": "",
  • "checkDigits": "",
  • "correlationId": "",
  • "senderMobile": "",
  • "senderName": "",
  • "transactionCurrencyCode": "",
  • "additionalInfos": [
    ]
}

Response samples

Content type
application/json
{
  • "responseCode": "",
  • "responseMessage": "",
  • "payLoad": {
    }
}

Check Status of transaction by correlation ID

This operation is used to check status of Transaction Status. This is very useful API method to check status of original transaction in case if you don't get response of original transaction within the timeout set by your system. To know the correct and final status of the original transaction we recommend that you to implement this API method to check status. This method will return you final status of the original transaction.

Please follow the steps below - 1. Send the corelationId value with every RTR or PIN transaction. This is the unique id from your system which will help us to identify the original transaction. 2. In case of a request timeout error, call Transaction Check Status (/transaction/status) method and pass the correlation id from step #1. 3. You should call the Transaction Check Status (/transaction/status) method multiple times until you get a definite response of a success or a failure. Please refer to the documentation of Transaction Check Status (/transaction/status) method.

If the response code is "852," it means the transaction is still in progress. Any other response code should be considered the final status of the transaction. This could either be successful ("000") or failed (any code other than "000").

Prepay nation Timeout = 2 minute

Authorizations:
basic
path Parameters
correlationId
required
string

Correlation ID which you send in actual topup api method.

Responses

Request samples

curl -X GET "https://sandbox.valuetopup.com/api/v2/transaction/status/{correlationId}" \
  -H "Authorization: Basic YOUR_BASE64_CREDENTIALS" \
  -H "Accept: application/json"

Response samples

Content type
application/json
{
  • "responseCode": "",
  • "responseMessage": "",
  • "payLoad": {
    }
}

Gift Card

This operation is used to buy Gift card.

Important Note: Gift card processing may take longer than usual. If you receive response code 852 with the message "Gift card processing is in progress." it means the transaction is still being processed. In this case, you must check the transaction status using the Check Status API (/transaction/status/{correlationId}) to obtain the final result. Please refer to the "Check Status of transaction by correlation ID" endpoint documentation for more details.

Response code 852 indicates the transaction is in progress. Any other response code represents the final transaction status - either success (000) or failure (any code other than 000).

Authorizations:
basic
Request Body schema: application/json

Gift card Object

skuId
required
integer <int32>

Sku Id - The SkuId can be obtained by the Products API. The category of the product should be Giftcard

amount
required
number <double>

Amount

correlationId
required
string [ 1 .. 50 ] characters

Unique ID of Customer System

firstName
string or null

First Name

lastName
string or null

Last Name

recipient
string or null

Mobile Number

transactionCurrencyCode
string or null

This field is optional. It is used to send amount in destination currency. If customer wanted to send amount in destination country currency than pass ISO currency code of that country in this field. e.g. customer wants to send amount in NGN currency. Then he will pass "NGN"

Array of objects or null (AdditionalInfo)

Some product requires additional information to process transactions. you need to provide that information here in name value pair. You can get this information from Catalog

Responses

Request samples

Content type
application/json
{
  • "skuId": 0,
  • "amount": 0.1,
  • "correlationId": "",
  • "firstName": "",
  • "lastName": "",
  • "recipient": "",
  • "transactionCurrencyCode": "",
  • "additionalInfos": [
    ]
}

Response samples

Content type
application/json
{
  • "responseCode": "",
  • "responseMessage": "",
  • "payLoad": {
    }
}

Fetch Gift card information

Authorizations:
basic
path Parameters
id
required
integer <int64>

Transaction Id which you receive in Gift card Operation

Responses

Request samples

curl -X GET "https://sandbox.valuetopup.com/api/v2/transaction/giftcard/fetch/{id}" \
  -H "Authorization: Basic YOUR_BASE64_CREDENTIALS" \
  -H "Accept: application/json"

Response samples

Content type
application/json
{
  • "responseCode": "",
  • "responseMessage": "",
  • "payLoad": {
    }
}

Sim Activation

This operation is used to activate sim.

Authorizations:
basic
Request Body schema: application/json
skuId
required
integer <int32>

Sku Id - The SkuId can be obtained by the Product API. The category of the carrier should be Sim

simNumber
required
string non-empty

Sim Number

zipCode
required
integer <int32>

Zip Code

language
string or null

Language

email
string or null

Email

correlationId
required
string [ 1 .. 50 ] characters

Unique Id of Customer System

numberOfPlanMonths
integer <int32>

This field is used to buy Lyca Bundle for multiple Months.

areaCode
string or null

Area Code

imei
string or null

IMEI

Array of objects or null (AdditionalInfo)

Some product requires additional information to process transactions. you need to provide that information here in name value pair. You can get this information from Catalog

Responses

Request samples

Content type
application/json
{
  • "skuId": 0,
  • "simNumber": "",
  • "zipCode": 0,
  • "language": "",
  • "email": "",
  • "correlationId": "",
  • "numberOfPlanMonths": 0,
  • "areaCode": "",
  • "imei": "",
  • "additionalInfos": [
    ]
}

Response samples

Content type
application/json
{
  • "responseCode": "",
  • "responseMessage": "",
  • "payLoad": {
    }
}

Sim Port in

This operation is used to port in Sim.

Authorizations:
basic
Request Body schema: application/json
skuId
required
integer <int32>

Sku Id - The SkuId can be obtained by the Products API. The category of the carrier should be SIM

simNumber
required
string non-empty

Sim Number

zipCode
required
integer <int32>

Zip Code

language
string or null

Language

email
string or null

Email

correlationId
required
string [ 1 .. 50 ] characters

Unique Id of Customer System

numberOfPlanMonths
integer <int32>

Number of Plan Months

areaCode
string or null <= 3 characters

Area Code

imei
string or null

IMEI

operatorCode
string or null

Operator Code

mobileNumber
string or null

Mobile Number which need to be port

accountNumber
string or null

Account Number of existsing carrier

passwordPin
string or null

Password

firstName
string or null

First Name

lastName
string or null

Last Name

address
string or null

Address

city
string or null

City

state
string or null

State

accountHolderZip
string or null

Account Holder Zip

equipmentType
string or null

Equipement Type

streetNumber
string or null

Street Number

streetName
string or null

Street Name

contactNumber
string or null

Contact Number

Array of objects or null (AdditionalInfo)

Some product requires additional information to process transactions. you need to provide that information here in name value pair. You can get this information from Catalog

Responses

Request samples

Content type
application/json
{
  • "skuId": 0,
  • "simNumber": "",
  • "zipCode": 0,
  • "language": "",
  • "email": "",
  • "correlationId": "",
  • "numberOfPlanMonths": 0,
  • "areaCode": "",
  • "imei": "",
  • "operatorCode": "",
  • "mobileNumber": "",
  • "accountNumber": "",
  • "passwordPin": "",
  • "firstName": "",
  • "lastName": "",
  • "address": "",
  • "city": "",
  • "state": "",
  • "accountHolderZip": "",
  • "equipmentType": "",
  • "streetNumber": "",
  • "streetName": "",
  • "contactNumber": "",
  • "additionalInfos": [
    ]
}

Response samples

Content type
application/json
{
  • "responseCode": "",
  • "responseMessage": "",
  • "payLoad": {
    }
}

Check Port in Status

This operation is used to check port in status

Authorizations:
basic
path Parameters
id
required
integer <int64>

Transaction Id which you received from Port In response

Responses

Request samples

curl -X GET "https://sandbox.valuetopup.com/api/v2/transaction/sim/portin/status/{id}" \
  -H "Authorization: Basic YOUR_BASE64_CREDENTIALS" \
  -H "Accept: application/json"

Response samples

Content type
application/json
{
  • "responseCode": "",
  • "responseMessage": "",
  • "payLoad": {
    }
}

Estimated Cost

This operation is used to get the estimate cost of product

Authorizations:
basic
Request Body schema: application/json

Cost request

skuId
required
integer <int32>

Sku Id - The SkuId can be obtained by the Products API.

amount
required
number <double>

Amount - It is by default in Customer Wallet Currency if "transactionCurrencyCode" is not defined. Otherwise, it is based on the "transactionCurrencyCode" field. For example, if the Customer wallet currency is GBP and "TransactionCurrencyCode" is not specified, then the system considers the amount in GBP. However, the customer can send the amount in the destination currency by defining the destination currency code in the "transactionCurrencyCode" field, for example, INR for India or NGN for Nigeria.

transactionCurrencyCode
string or null

This field is optional. It is used to send amount in destination currency. If customer wanted to send amount in destination country currency than pass ISO currency code of that country in this field. You should check FaceValueCurrency field of /catalog/skus api to check what currency you can pass in this field.
e.g. customer wants to send amount in NGN currency. Then he will pass "NGN". The 'TransactionCurrencyCode' must be in uppercase (e.g. USD, AFN, EUR, etc.)

Responses

Request samples

Content type
application/json
{
  • "skuId": 0,
  • "amount": 0.1,
  • "transactionCurrencyCode": ""
}

Response samples

Content type
application/json
{
  • "responseCode": "",
  • "responseMessage": "",
  • "payLoad": {
    }
}