Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
This page shares information on all updates and modifications to the Airtime API. Do you have a feature suggestion? Do let us know here.
NOTICE - UPCOMING CHANGE
In future releases, the commission parameter in the response data of the following endpoints will be deprecated.
/operators
More details on this can be found in the Get operator by ID and the Get operator by ISO code sections of the documentation
/operators/{operatorid}
/operators/auto-detect/phone/{phone}/countries/{iso}
/operators/countries/{countrycode}
Users are advised to work with the internationalDiscount or localDiscount parameter as it contains the same data on the operator.
Making an airtime top-up comes in handy for different applications - personal and businesslike. Reloadly's Airtime API handles these use cases by providing endpoints that grant you access to over 700 operators in more than 140 countries. With this outreach, you can send airtime and also subscribe to data bundles in different currencies. The most important data you will need to send airtime successfully is the recipient's mobile number. To further learn how to integrate this RESTful API into your application, you can check out this documentation. It contains a reference of each endpoint in the Airtime API.
This indicates the last time a top-up was made from the account
Authorization
string
Your access token is required as a bearer token in the request's header
Parameter
Type
Description
balance
number
This indicates the current account balance
currencyCode
string
This indicates the account's currency code
currencyName
string
This indicates the account's currency name
updatedAt
{
"balance":550.75,
"currencyCode":"USD",
"currencyName":"US Dollar",
"updatedAt":"2018-12-04 08:45:51"
}{
"timeStamp":"2021-05-11 21:14:00",
"message":"Full authentication is required to access this resource",
"path":"/accounts/balance",
"errorCode":"INVALID_TOKEN",
"infoLink":null,
"details":[
]
}{
"timestamp":"2021-05-11T21:14:29.629+0000",
"status":404,
"error":"Not Found",
"message":"No message available",
"path":"/accounts/balanc"
}curl --location --request GET 'https://topups.reloadly.com/accounts/balance' \
--header 'Accept: application/com.reloadly.topups-v1+json' \
--header 'Authorization: Bearer YOUR_ACCESS_TOKEN_HERE' \
--header 'Content-Type: application/json'using System;
using System.Threading.Tasks;
using System.Net.Http;
using System.Text;
using Newtonsoft.Json;
namespace WebAPIClient {
class Program {
static async Task Main(string[] args) {
await ApiCall();
}
private static async Task ApiCall() {
var message = new HttpRequestMessage(HttpMethod.Get, "https://topups.reloadly.com/accounts/balance");
message.Headers.TryAddWithoutValidation("Authorization", "Bearer YOUR_ACCESS_TOKEN_HERE");
message.Headers.TryAddWithoutValidation("Accept", "application/com.reloadly.topups-v1+json");
message.Headers.TryAddWithoutValidation("Content-Type", "application/json");
using
var httpClient = new HttpClient();
var response = await httpClient.SendAsync(message);
var responseBody = await response.Content.ReadAsStringAsync();
var result = JsonConvert.DeserializeObject < dynamic > (responseBody);
Console.WriteLine(result);
}
}
}string
package main
import (
"fmt"
"net/http"
"io/ioutil"
)
func main() {
url := "https://topups.reloadly.com/accounts/balance"
method := "GET"
client := &http.Client {
}
req, err := http.NewRequest(method, url, nil)
if err != nil {
fmt.Println(err)
return
}
req.Header.Add("Accept", "application/com.reloadly.topups-v1+json")
req.Header.Add("Authorization", "Bearer YOUR_ACCESS_TOKEN_HERE")
req.Header.Add("Content-Type", "application/json")
res, err := client.Do(req)
if err != nil {
fmt.Println(err)
return
}
defer res.Body.Close()
body, err := ioutil.ReadAll(res.Body)
if err != nil {
fmt.Println(err)
return
}
fmt.Println(string(body))
}OkHttpClient client = new OkHttpClient().newBuilder()
.build();
Request request = new Request.Builder()
.url("https://topups.reloadly.com/accounts/balance")
.method("GET", null)
.addHeader("Accept", "application/com.reloadly.topups-v1+json")
.addHeader("Authorization", "Bearer YOUR_ACCESS_TOKEN_HERE")
.addHeader("Content-Type", "application/json")
.build();
Response response = client.newCall(request).execute();var myHeaders = new Headers();
myHeaders.append("Accept", "application/com.reloadly.topups-v1+json");
myHeaders.append("Authorization", "Bearer YOUR_ACCESS_TOKEN_HERE");
myHeaders.append("Content-Type", "application/json");
var requestOptions = {
method: 'GET',
headers: myHeaders,
redirect: 'follow'
};
fetch("https://topups.reloadly.com/accounts/balance", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://topups.reloadly.com/accounts/balance',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => array(
'Accept: application/com.reloadly.topups-v1+json',
'Authorization: Bearer YOUR_ACCESS_TOKEN_HERE',
'Content-Type: application/json'
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;import requests
import json
url = "https://topups.reloadly.com/accounts/balance"
payload={}
headers = {
'Accept': 'application/com.reloadly.topups-v1+json',
'Authorization': 'Bearer YOUR_ACCESS_TOKEN_HERE',
'Content-Type': 'application/json'
}
response = requests.request("GET", url, headers=headers, data=payload)
print(response.text)includeBundles
boolean
Indicates if any airtime and data bundles being offered by the operator should be included in the API response. Default value is true
includeData
boolean
Indicates if any airtime or data plans being offered by the operator should be included in the API response. Default value is true
includePin
boolean
Indicates if PIN details for the operator should be included in the API response. Default value is true
suggested AmountsMap
boolean
Indicates if the suggestedAmountsMap field should be returned. Default value is false
Authorization*
string
Your access token is required as a bearer token in the request's header
{
"content":[
{
"operatorId":88,
"name":"Movistar Colombia",
"bundle":false,
"data":false,
"pin":false,
"supportsLocalAmounts"
Parameter
Type
Description
id/operatorId
integer
The ID of the operator
name
string
The operator's name
bundle
boolean
Indicates if the operator has any existing bundle plans
data
With the /operators/auto-detect/phone/{phone}/countries/{iso} endpoint, a user can retrieve the operator details of a mobile number and the ISO code of the country where the mobile number is registered
GET https://topups.reloadly.com/operators/auto-detect/phone/{phone}/countries/{countryisocode}
{
"timeStamp":"2021-05-12 08:06:03",
"message":"Full authentication is required to access this resource",
"path":"/operators",
"errorCode":"INVALID_TOKEN",
"infoLink":null,
"details":[
]
}{
"timestamp":"2021-05-12T08:00:42.221+0000",
"status":404,
"error":"Not Found",
"message":"No message available",
"path":"/operator"
}curl --location --request GET 'https://topups.reloadly.com/operators' \
--header 'Authorization: Bearer YOUR_ACCESS_TOKEN_HERE' \
--header 'Accept: application/com.reloadly.topups-v1+json' using System;
using System.Threading.Tasks;
using System.Net.Http;
using System.Text;
using Newtonsoft.Json;
namespace WebAPIClient {
class Program {
static async Task Main(string[] args) {
await ApiCall();
}
private static async Task ApiCall() {
var message = new HttpRequestMessage(HttpMethod.Get, "https://topups.reloadly.com/operators");
message.Headers.TryAddWithoutValidation("Authorization", "Bearer YOUR_ACCESS_TOKEN_HERE");
message.Headers.TryAddWithoutValidation("Accept", "application/com.reloadly.topups-v1+json");
using
var httpClient = new HttpClient();
var response = await httpClient.SendAsync(message);
var responseBody = await response.Content.ReadAsStringAsync();
var result = JsonConvert.DeserializeObject < dynamic > (responseBody);
Console.WriteLine(result);
}
}
}package main
import (
"fmt"
"net/http"
"io/ioutil"
)
func main() {
url := "https://topups.reloadly.com/operators"
method := "GET"
client := &http.Client {
}
req, err := http.NewRequest(method, url, nil)
if err != nil {
fmt.Println(err)
return
}
req.Header.Add("Authorization", "Bearer YOUR_ACCESS_TOKEN_HERE")
req.Header.Add("Accept", "application/com.reloadly.topups-v1+json")
res, err := client.Do(req)
if err != nil {
fmt.Println(err)
return
}
defer res.Body.Close()
body, err := ioutil.ReadAll(res.Body)
if err != nil {
fmt.Println(err)
return
}
fmt.Println(string(body))
}OkHttpClient client = new OkHttpClient().newBuilder()
.build();
Request request = new Request.Builder()
.url("https://topups.reloadly.com/operators")
.method("GET", null)
.addHeader("Authorization", "Bearer YOUR_ACCESS_TOKEN_HERE")
.addHeader("Accept", "application/com.reloadly.topups-v1+json")
.build();
Response response = client.newCall(request).execute();var request = require('request');
var options = {
'method': 'GET',
'url': 'https://topups.reloadly.com/operators',
'headers': {
'Authorization': 'Bearer YOUR_ACCESS_TOKEN_HERE',
'Accept': 'application/com.reloadly.topups-v1+json',
}
};
request(options, function (error, response) {
if (error) throw new Error(error);
console.log(response.body);
});<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://topups.reloadly.com/operators',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => array(
'Authorization: Bearer YOUR_ACCESS_TOKEN_HERE',
'Accept: application/com.reloadly.topups-v1+json',
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;import requests
import json
url = "https://topups.reloadly.com/operators"
payload={}
headers = {
'Authorization': 'Bearer YOUR_ACCESS_TOKEN_HERE',
'Accept': 'application/com.reloadly.topups-v1+json',
}
response = requests.request("GET", url, headers=headers, data=payload)
print(response.text)suggested Amounts
boolean
Indicates if the suggestedAmounts field should be returned. Default value is false
size
integer
This indicates the number of operators to be retrieved on a page. Default value is 200
page
integer
This indicates the page of the operator list being retrieved. Default value is 1
boolean
Indicates if the operator has any existing data plans.
pin
boolean
Indicates if the operator supports PIN transactions
supports
LocalAmounts
boolean
Indicates if the operator can make top-ups in local amounts
denominationType
string
Indicates if the operator makes top-ups through a fixed amount or a range of amounts. Options include FIXED and RANGE
senderCurrencyCode
string
Indicates the currency code of the account where the top-up is being made from
senderCurrency
Symbol
string
Indicates the currency symbol of the account where the top-up is being made from
destinationCurrencyCode
string
Indicates the currency code of the mobile number where the top-up is being sent to
destinationCurrencySymbol
string
Indicates the currency symbol of the mobile number where the top-up is being sent to
commission
integer
Indicates if the operator offers a commission or discount
international
Discount
integer
Indicates if the operator offers a discount for top-ups made to foreign numbers
localDiscount
integer
Indicates if the operator offers a discount for top-ups made to local numbers
mostPopularAmount
integer
Indicates the amount that is often used to make a top-up
mostPopular
LocalAmount
integer
Indicates the amount that is often used to make a top-up locally
minAmount
integer
Indicates the minimum amount that can be used to make a top-up
maxAmount
integer
Indicates the maximum amount that can be used to make a top-up
localMinAmount
integer
Indicates the minimum amount that can be used to make a top-up locally
localMaxAmount
integer
Indicates the maximum amount that can be used to make a top-up locally
isoName
string
Indicates the country's ISO code
name
string
Indicates the country's name
rate
integer
Indicates the FX rate at which the top-up will be made
currencyCode
string
Indicates the code of the currency at which the top-up will be made
logoURLs
string
These are links to SVG images of the operator's logos
fixedAmounts
integer
Indicates the fixed amounts that a top-up can be made in with the operator
fixedAmounts
Description
string
Indicates the descriptions for the operator's fixed amounts
localFixedAmounts
integer
Indicates the local fixed amounts that a top-up can be made in with the operator
localFixed
AmountsDescription
string
Indicates the descriptions for the operator's local fixed amounts
suggestedAmounts
integer
Indicates the suggested amounts that can be used to make a top-up with the operator
suggested
AmountsMap
string
Indicates the suggested amounts that can be mapped through
promotions
string
Indicates the promotions currently offered by the operator
Indicates the time the discount was first created by the operator
operatorId
string
Indicates the operator's ID
name
string
Indicates the operator's name
countryCode
string
Indicates the ISO code of the country where the operator is registered
data
boolean
Indicates if the operator has any existing data discounts
bundle
boolean
Indicates if the operator has any existing bundle discounts
status
boolean
Indicates if the operator has any existing discounts
size
integer
The number of operators offering discounts to be retrieved on a page. Default value is 200
page
integer
The page of the list of operators offering discounts. Default value is 1
Authorization*
string
Your access token is required as a bearer token in the request's header
Parameter
Type
Description
percentage
integer
Indicates the percentage discount for every top-up
international
Percentage
integer
Indicates the percentage discount for international top-ups
localPercentage
integer
Indicates the percentage discount for local top-ups
updatedAt
{
"content":[
{
"operator":{
"operatorId":1,
"name":"Afghan Wireless Afghanistan",
"countryCode":"AF",
"status":true,
"bundle":false
},
"percentage":10,
"internationalPercentage":10,
"localPercentage":0,
"updatedAt":"2018-06-26 03:36:16"
},
{
"operator":{
"operatorId":2,
"name":"MTN Afghanistan",
"countryCode":"AF",
"status":true,
"bundle":false
},
"percentage":10,
"internationalPercentage":10,
"localPercentage":0,
"updatedAt":"2018-06-26 03:36:16"
},
{
"operator":{
"operatorId":3,
"name":"Etisalat Afghanistan",
"countryCode":"AF",
"status":true,
"bundle":false
},
"percentage":10,
"internationalPercentage":10,
"localPercentage":0,
"updatedAt":"2018-06-26 03:36:16"
}
],
"pageable":{
"sort":{
"unsorted":true,
"sorted":false
},
"pageSize":3,
"pageNumber":0,
"offset":0,
"paged":true,
"unpaged":false
},
"totalPages":204,
"totalElements":611,
"last":false,
"sort":{
"unsorted":true,
"sorted":false
},
"first":true,
"numberOfElements":3,
"size":3,
"number":0
}integer
{
"timeStamp":"2021-06-09 23:24:30",
"message":"Full authentication is required to access this resource",
"path":"/operators/commissions",
"errorCode":"INVALID_TOKEN",
"infoLink":null,
"details":[
]
}{
"timestamp":"2021-06-09T23:22:56.125+0000",
"status":404,
"error":"Not Found",
"message":"No message available",
"path":"/operator/commissions"
}curl --location --request GET 'https://topups.reloadly.com/operators/commissions' \
--header 'Authorization: Bearer YOUR_ACCESS_TOKEN_HERE' \
--header 'Accept: application/com.reloadly.topups-v1+json' using System;
using System.Threading.Tasks;
using System.Net.Http;
using System.Text;
using Newtonsoft.Json;
namespace WebAPIClient {
class Program {
static async Task Main(string[] args) {
await ApiCall();
}
private static async Task ApiCall() {
var message = new HttpRequestMessage(HttpMethod.Get, "https://topups.reloadly.com/operators/commissions");
message.Headers.TryAddWithoutValidation("Authorization", "Bearer YOUR_ACCESS_TOKEN_HERE");
message.Headers.TryAddWithoutValidation("Accept", "application/com.reloadly.topups-v1+json");
using
var httpClient = new HttpClient();
var response = await httpClient.SendAsync(message);
var responseBody = await response.Content.ReadAsStringAsync();
var result = JsonConvert.DeserializeObject < dynamic > (responseBody);
Console.WriteLine(result);
}
}
}package main
import (
"fmt"
"net/http"
"io/ioutil"
)
func main() {
url := "https://topups.reloadly.com/operators/commissions"
method := "GET"
client := &http.Client {
}
req, err := http.NewRequest(method, url, nil)
if err != nil {
fmt.Println(err)
return
}
req.Header.Add("Authorization", "Bearer YOUR_ACCESS_TOKEN_HERE")
req.Header.Add("Accept", "application/com.reloadly.topups-v1+json")
res, err := client.Do(req)
if err != nil {
fmt.Println(err)
return
}
defer res.Body.Close()
body, err := ioutil.ReadAll(res.Body)
if err != nil {
fmt.Println(err)
return
}
fmt.Println(string(body))
}OkHttpClient client = new OkHttpClient().newBuilder()
.build();
Request request = new Request.Builder()
.url("https://topups.reloadly.com/operators/commissions")
.method("GET", null)
.addHeader("Authorization", "Bearer YOUR_ACCESS_TOKEN_HERE")
.addHeader("Accept", "application/com.reloadly.topups-v1+json")
.build();
Response response = client.newCall(request).execute();var request = require('request');
var options = {
'method': 'GET',
'url': 'https://topups.reloadly.com/operators/commissions',
'headers': {
'Authorization': 'Bearer YOUR_ACCESS_TOKEN_HERE',
'Accept': 'application/com.reloadly.topups-v1+json',
}
};
request(options, function (error, response) {
if (error) throw new Error(error);
console.log(response.body);
});<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://topups.reloadly.com/operators/commissions',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => array(
'Authorization: Bearer YOUR_ACCESS_TOKEN_HERE',
'Accept: application/com.reloadly.topups-v1+json',
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;import requests
import json
url = "https://topups.reloadly.com/operators/commissions"
payload={}
headers = {
'Authorization': 'Bearer YOUR_ACCESS_TOKEN_HERE',
'Accept': 'application/com.reloadly.topups-v1+json',
}
response = requests.request("GET", url, headers=headers, data=payload)
print(response.text)Authorization*
string
Your access token is required as a bearer token in the request's header
operatorId*
integer
The ID of the receiving mobile number's operator
amount*
integer
The top-up amount being sent to the receiving mobile number
{
"id":174,
"name":"Natcom Haiti",
"fxRate":465.00,
"currencyCode":"HTG"
}{
"timeStamp": "2021-05-11 22:34:35",
"message": "Full authentication is required to access this resource",
"path": "/operators/fx-rate",
"errorCode": "INVALID_TOKEN",
"infoLink":
{
"timestamp": "2021-05-11T23:46:00.418+0000",
"status": 404,
"error": "Not Found",
"message": "No message available",
"path": "/operator/fx-rate"
Parameter
Type
Description
id
integer
Indicates the ID of the operator
name
string
Indicates the operator's name
fxRate
integer
Indicates the exchange rate of the operator's currency to your account's currency. For example, if your account is in Indian Rupees( INR ) and you are making a top-up to a number registered to Natcom Haiti, the exchange rate returned will be 1.16 ( 1 INR = 1.16 HTG )
currencyCode
countryCode*
string
The ISO code of the country where the operator is registered
suggested AmountsMap
boolean
Indicates if the suggestedAmountsMap field should be returned. Default value is false
suggested Amounts
boolean
Indicates if the suggestedAmounts field should be returned. Default value is false
includePin
boolean
Indicates if PIN details for the operator should be included in the API response. Default value is True
includeData
boolean
Indicates if any airtime or data plans being offered by the operator should be included in the API response. Default value is true
Authorization*
string
Your access token is required as a bearer token in the request's header
{
"operatorId":88,
"name":"Movistar Colombia",
"bundle":false,
"data":false,
"pin":false,
"supportsLocalAmounts":false,
"denominationType":"RANGE",
Parameter
Type
Description
id/operatorId
integer
The ID of the operator
name
string
The operator's name
bundle
boolean
Indicates if the operator has any existing bundle plans
data
Parameter
Type
Description
geographical
RechargePlans
object
Indicates an object that contains the details of each geographical plan owned by the operator within a country
locationCode
string
This is an abbreviation for the geographical location that has a different recharge plan. Examples include “AP” for “Andhra Pradesh” or “DEL” for “Delhi”
locationName
string
This is the name of a geographical location that has a different recharge plan
fixedAmounts
countryIsoCode*
string
The ISO code of the country where the mobile number is registered
phone*
string
The mobile number whose operator is to be auto-detected
suggested AmountsMap
boolean
Indicates if the suggestedAmountsMap field should be returned. Default value is false
suggested Amounts
boolean
Indicates if the suggestedAmounts field should be returned. Default value is false
Authorization*
string
Your access token is required as a bearer token in the request's header
{
"operatorId":88,
"name":"Movistar Colombia",
"bundle":false,
"data":false,
"pin":false,
"supportsLocalAmounts":false,
"denominationType":"RANGE",
Parameter
Type
Description
id/operatorId
integer
This indicates the operator's ID
name
string
The operator's name
bundle
boolean
Indicates if the operator has any existing bundle plans
data
The fastest way to get started with the Airtime product is to make a top-up. This section covers how to get started with the Airtime API product. To make a top-up, you will need client credentials which you can get from signing up in the dashboard
Asides from the live environment, Reloadly provides a sandbox (also called test environment) where you can simulate real-life scenarios and use cases for each API endpoint. If you would like to first work with the test environment, you can check out the virtual sandbox in the section.
Once you have your client credentials, the next step is for you to retrieve your access token. Reloadly issues access tokens (also called bearer tokens) that are used to authorize API requests. Make a request to the https://auth.reloadly.com/oauth/token URL to obtain the appropriate access token
Once successful, you will get response data containing your access token, its privileges, and its lifespan
If you get an response with "errorCode": "INVALID_CREDENTIALS" you're most likely using the wrong set of credentials for the environment from where you want to get a token. Remember: the credentials used for Production are invalid in Sandbox and viceversa.
Now you've got your access token, the next step is to make a top-up on a mobile number. Reloadly spans across more than 700 operators in over 140 countries. This ensures you have a lot of options when making your first top-up. To top up a mobile number, you can make a POST request to the /topups endpoint
If this request is successful, you will get a response containing details of your top-up
You can test these steps out directly on our .
Great! You have gotten started with Reloadly in the fastest way possible. Feel free to modify the code samples above in order to get more practice with our API. You can also check out the rest of the documentation for a concise understanding of the Airtime product.
With the /operators/{operatorid}/commissions endpoint, you can retrieve the details of an active discount being carried out by an operator by making a request with the operator's ID
GET https://topups.reloadly.com/operators/{operatorid}/commissions
With the /promotions/country-codes/{countrycode} endpoint, you can retrieve the promotions going on in a country by using its ISO code
GET https://topups.reloadly.com/promotions/country-codes/{countrycode}
With the /operators/{operatorid} endpoint, a user can fetch details of an operator by making a request with the operator's ID
GET https://topups.reloadly.com/operators/{operatorid}
{
"timeStamp": "2021-05-11 23:43:04",
"message": "Fx rate is currently not available for this operator, please try again later or contact support.",
"path": "/operators/fx-rate",
"errorCode": "FX_RATE_NOT_AVAILABLE",
"infoLink": null,
"details": []
}curl --location --request POST 'https://topups.reloadly.com/operators/fx-rate' \
--header 'Authorization: Bearer YOUR_ACCESS_TOKEN_HERE' \
--header 'Accept: application/com.reloadly.topups-v1+json' \
--header 'Content-Type: application/json' \
--data-raw '{
"operatorId":"341",
"amount":"10"
}'using System;
using System.Threading.Tasks;
using System.Net.Http;
using System.Text;
using Newtonsoft.Json;
namespace WebAPIClient {
class Program {
static async Task Main(string[] args) {
await ApiCall();
}
private static async Task ApiCall() {
var json = JsonConvert.SerializeObject(new {
operator_id = "1",
amount = "1"
});
var message = new HttpRequestMessage(HttpMethod.Post, "https://topups.reloadly.com/operators/fx-rate");
message.Headers.TryAddWithoutValidation("Authorization", "Bearer YOUR_ACCESS_TOKEN_HERE");
message.Headers.TryAddWithoutValidation("Accept", "application/com.reloadly.topups-v1+json");
message.Headers.TryAddWithoutValidation("Content-Type", "application/json");
using
var httpClient = new HttpClient();
var response = await httpClient.SendAsync(message);
var responseBody = await response.Content.ReadAsStringAsync();
var result = JsonConvert.DeserializeObject < dynamic > (responseBody);
Console.WriteLine(result);
}
}
}package main
import (
"fmt"
"strings"
"net/http"
"io/ioutil"
)
func main() {
url := "https://topups.reloadly.com/operators/fx-rate"
method := "POST"
payload := strings.NewReader(`{
"operatorId":"341",
"amount":"10"
}`)
client := &http.Client {
}
req, err := http.NewRequest(method, url, payload)
if err != nil {
fmt.Println(err)
return
}
req.Header.Add("Authorization", "Bearer YOUR_ACCESS_TOKEN_HERE")
req.Header.Add("Accept", "application/com.reloadly.topups-v1+json")
req.Header.Add("Content-Type", "application/json")
res, err := client.Do(req)
if err != nil {
fmt.Println(err)
return
}
defer res.Body.Close()
body, err := ioutil.ReadAll(res.Body)
if err != nil {
fmt.Println(err)
return
}
fmt.Println(string(body))
}OkHttpClient client = new OkHttpClient().newBuilder()
.build();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n\t\"operatorId\":\"341\",\n\t\"amount\":\"10\"\n}");
Request request = new Request.Builder()
.url("https://topups.reloadly.com/operators/fx-rate")
.method("POST", body)
.addHeader("Authorization", "Bearer YOUR_ACCESS_TOKEN_HERE")
.addHeader("Accept", "application/com.reloadly.topups-v1+json")
.addHeader("Content-Type", "application/json")
.build();
Response response = client.newCall(request).execute();var request = require('request');
var options = {
'method': 'POST',
'url': 'https://topups.reloadly.com/operators/fx-rate',
'headers': {
'Authorization': 'Bearer YOUR_ACCESS_TOKEN_HERE',
'Accept': 'application/com.reloadly.topups-v1+json',
'Content-Type': 'application/json'
},
body: JSON.stringify({
"operatorId": "341",
"amount": "10"
})
};
request(options, function (error, response) {
if (error) throw new Error(error);
console.log(response.body);
});<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://topups.reloadly.com/operators/fx-rate',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_POSTFIELDS =>'{
"operatorId":"341",
"amount":"10"
}',
CURLOPT_HTTPHEADER => array(
'Authorization: Bearer YOUR_ACCESS_TOKEN_HERE',
'Accept: application/com.reloadly.topups-v1+json',
'Content-Type: application/json'
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;import requests
import json
url = "https://topups.reloadly.com/operators/fx-rate"
payload = json.dumps({
"operatorId": "341",
"amount": "10"
})
headers = {
'Authorization': 'Bearer YOUR_ACCESS_TOKEN_HERE',
'Accept': 'application/com.reloadly.topups-v1+json',
'Content-Type': 'application/json'
}
response = requests.request("POST", url, headers=headers, data=payload)
print(response.text){
"id":200,
"operatorId":200,
"name":"Airtel India",
"bundle":false,
"data":false,
"pin":false,
"supportsLocalAmounts":false,
"supportsGeographicalRechargePlans":true,
"denominationType":"FIXED",
"senderCurrencyCode":"NGN",
"senderCurrencySymbol":"₦",
"destinationCurrencyCode":"INR",
"destinationCurrencySymbol":"₹",
"commission":17.0,
"internationalDiscount":17.0,
"localDiscount":0.5,
"mostPopularAmount":null,
"mostPopularLocalAmount":null,
"minAmount":null,
"maxAmount":null,
"localMinAmount":null,
"localMaxAmount":null,
"country":{
"isoName":"IN",
"name":"India"
},
"fx":{
"rate":0.14094,
"currencyCode":"INR"
},
"logoUrls":[
"https://s3.amazonaws.com/rld-operator/48a34cc8-a395-43b2-848d-8caa7af71649-size-1.png",
"https://s3.amazonaws.com/rld-operator/48a34cc8-a395-43b2-848d-8caa7af71649-size-2.png",
"https://s3.amazonaws.com/rld-operator/48a34cc8-a395-43b2-848d-8caa7af71649-size-3.png"
],
"fixedAmounts":[
],
"fixedAmountsDescriptions":{
},
"localFixedAmounts":[
],
"localFixedAmountsDescriptions":{
},
"suggestedAmounts":[
],
"suggestedAmountsMap":{
},
"geographicalRechargePlans":[
{
"locationCode":"ASM",
"locationName":"Assam",
"fixedAmounts":[
69.87,
139.74,
706.92,
3542.82,
7085.64,
35432.31
],
"localAmounts":[
10.00,
20.00,
100.00,
500.00,
1000.00,
5000.00
],
"fixedAmountsPlanNames":{
"0.17":"Topup Plan",
"0.34":"Topup Plan",
"1.72":"Topup Plan",
"8.62":"Topup Plan",
"17.24":"Topup Plan",
"86.21":"Topup Plan"
},
"fixedAmountsDescriptions":{
"69.87":"Get Talktime of Rs. 7.47. Validity : 0 Days. Talk time : 7.47",
"139.74":"Get Talktime of Rs. 14.95. Validity : 0 Days. Talk time : 14.95",
"706.92":"Get Talktime of Rs. 81.75. Validity : 0 Days. Talk time : 81.75",
"3542.82":"Get Talktime of Rs. 423.73. Validity : 0 Days. Talk time : 423.73",
"7085.64":"Get Talktime of Rs. 847.46. Validity : 0 Days. Talk time : 847.46",
"35432.31":"Get Talktime of Rs. 4237.29. Validity : 0 Days. Talk time : 4237.29"
},
"localFixedAmountsPlanNames":{
"10.00":"Topup Plan",
"20.00":"Topup Plan",
"100.00":"Topup Plan",
"500.00":"Topup Plan",
"1000.00":"Topup Plan",
"5000.00":"Topup Plan"
},
"localFixedAmountsDescriptions":{
"10.00":"Get Talktime of Rs. 7.47. Validity : 0 Days. Talk time : 7.47",
"20.00":"Get Talktime of Rs. 14.95. Validity : 0 Days. Talk time : 14.95",
"100.00":"Get Talktime of Rs. 81.75. Validity : 0 Days. Talk time : 81.75",
"500.00":"Get Talktime of Rs. 423.73. Validity : 0 Days. Talk time : 423.73",
"1000.00":"Get Talktime of Rs. 847.46. Validity : 0 Days. Talk time : 847.46",
"5000.00":"Get Talktime of Rs. 4237.29. Validity : 0 Days. Talk time : 4237.29"
}
},
{
"locationCode":"PUN",
"locationName":"Punjab",
"fixedAmounts":[
69.87,
139.74,
706.92,
3542.82,
7085.64,
35432.31
],
"localAmounts":[
10.00,
20.00,
100.00,
500.00,
1000.00,
5000.00
],
"fixedAmountsPlanNames":{
"0.17":"Topup Plan",
"0.34":"Topup Plan",
"1.72":"Topup Plan",
"8.62":"Topup Plan",
"17.24":"Topup Plan",
"86.21":"Topup Plan"
},
"fixedAmountsDescriptions":{
"69.87":"Get Talktime of Rs. 7.47. Validity : 0 Days. Talk time : 7.47",
"139.74":"Get Talktime of Rs. 14.95. Validity : 0 Days. Talk time : 14.95",
"706.92":"Get Talktime of Rs. 81.75. Validity : 0 Days. Talk time : 81.75",
"3542.82":"Get Talktime of Rs. 423.73. Validity : 0 Days. Talk time : 423.73",
"7085.64":"Get Talktime of Rs. 847.46. Validity : 0 Days. Talk time : 847.46",
"35432.31":"Get Talktime of Rs. 4237.29. Validity : 0 Days. Talk time : 4237.29"
},
"localFixedAmountsPlanNames":{
"10.00":"Topup Plan",
"20.00":"Topup Plan",
"100.00":"Topup Plan",
"500.00":"Topup Plan",
"1000.00":"Topup Plan",
"5000.00":"Topup Plan"
},
"localFixedAmountsDescriptions":{
"10.00":"Get Talktime of Rs. 7.47. Validity : 0 Days. Talk time : 7.47",
"20.00":"Get Talktime of Rs. 14.95. Validity : 0 Days. Talk time : 14.95",
"100.00":"Get Talktime of Rs. 81.75. Validity : 0 Days. Talk time : 81.75",
"500.00":"Get Talktime of Rs. 423.73. Validity : 0 Days. Talk time : 423.73",
"1000.00":"Get Talktime of Rs. 847.46. Validity : 0 Days. Talk time : 847.46",
"5000.00":"Get Talktime of Rs. 4237.29. Validity : 0 Days. Talk time : 4237.29"
}
}
],
"promotions":[
]
}{
"timeStamp":"2021-05-17 15:51:26",
"message":"Invalid country code, see https://www.iban.com/country-codes",
"path":"/operators/countries/COT",
"errorCode":null,
"infoLink":null,
"details":[
]
}{
"timeStamp":"2021-05-12 07:17:42",
"message":"Full authentication is required to access this resource",
"path":"/operators/countries/SV",
"errorCode":"INVALID_TOKEN",
"infoLink":null,
"details":[
]
}curl --location --request GET 'https://topups.reloadly.com/operators/countries/PK?includeBundles=true&includeData=true&includePin=true&suggestedAmounts=true&suggestedAmountsMap=true' \
--header 'Authorization: Bearer YOUR_ACCESS_TOKEN_HERE' \
--header 'Accept: application/com.reloadly.topups-v1+json' \using System;
using System.Threading.Tasks;
using System.Net.Http;
using System.Text;
using Newtonsoft.Json;
namespace WebAPIClient {
class Program {
static async Task Main(string[] args) {
await ApiCall();
}
private static async Task ApiCall() {
var message = new HttpRequestMessage(HttpMethod.Get, "https://topups.reloadly.com/operators/countries/PK?includeBundles=true&includeData=true&includePin=true&suggestedAmounts=true&suggestedAmountsMap=true");
message.Headers.TryAddWithoutValidation("Authorization", "Bearer YOUR_ACCESS_TOKEN_HERE");
message.Headers.TryAddWithoutValidation("Accept", "application/com.reloadly.topups-v1+json");
using
var httpClient = new HttpClient();
var response = await httpClient.SendAsync(message);
var responseBody = await response.Content.ReadAsStringAsync();
var result = JsonConvert.DeserializeObject < dynamic > (responseBody);
Console.WriteLine(result);
}
}
}package main
import (
"fmt"
"net/http"
"io/ioutil"
)
func main() {
url := "https://topups.reloadly.com/operators/countries/PK?includeBundles=true&includeData=true&includePin=true&suggestedAmounts=true&suggestedAmountsMap=true"
method := "GET"
client := &http.Client {
}
req, err := http.NewRequest(method, url, nil)
if err != nil {
fmt.Println(err)
return
}
req.Header.Add("Authorization", "Bearer YOUR_ACCESS_TOKEN_HERE")
req.Header.Add("Accept", "application/com.reloadly.topups-v1+json")
res, err := client.Do(req)
if err != nil {
fmt.Println(err)
return
}
defer res.Body.Close()
body, err := ioutil.ReadAll(res.Body)
if err != nil {
fmt.Println(err)
return
}
fmt.Println(string(body))
}OkHttpClient client = new OkHttpClient().newBuilder()
.build();
Request request = new Request.Builder()
.url("https://topups.reloadly.com/operators/countries/PK?includeBundles=true&includeData=true&includePin=true&suggestedAmounts=true&suggestedAmountsMap=true")
.method("GET", null)
.addHeader("Authorization", "Bearer YOUR_ACCESS_TOKEN_HERE")
.addHeader("Accept", "application/com.reloadly.topups-v1+json")
.addHeader("Content-Type", "application/json")
.build();
Response response = client.newCall(request).execute();var request = require('request');
var options = {
'method': 'GET',
'url': 'https://topups.reloadly.com/operators/countries/PK?includeBundles=true&includeData=true&includePin=true&suggestedAmounts=true&suggestedAmountsMap=true',
'headers': {
'Authorization': 'Bearer YOUR_ACCESS_TOKEN_HERE',
'Accept': 'application/com.reloadly.topups-v1+json',
'Content-Type': 'application/json'
}
};
request(options, function (error, response) {
if (error) throw new Error(error);
console.log(response.body);
});
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://topups.reloadly.com/operators/countries/PK?includeBundles=true&includeData=true&includePin=true&suggestedAmounts=true&suggestedAmountsMap=true',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => array(
'Authorization: Bearer YOUR_ACCESS_TOKEN_HERE',
'Accept: application/com.reloadly.topups-v1+json',
'Content-Type: application/json'
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
import requests
import json
url = "https://topups.reloadly.com/operators/countries/PK?includeBundles=true&includeData=true&includePin=true&suggestedAmounts=true&suggestedAmountsMap=true"
payload={}
headers = {
'Authorization': 'Bearer YOUR_ACCESS_TOKEN_HERE',
'Accept': 'application/com.reloadly.topups-v1+json',
'Content-Type': 'application/json'
}
response = requests.request("GET", url, headers=headers, data=payload)
print(response.text){
"timeStamp":"2021-05-12 08:06:03",
"message":"Full authentication is required to access this resource",
"path":"",
"errorCode":"INVALID_TOKEN",
"infoLink":null,
"details":[
]
}{
"timestamp":"2021-05-17T14:40:02.376+0000",
"status":404,
"error":"Not Found",
"message":"No message available",
"path":"/operators/auto-detect/phon/03238482221/countries/PKcurl --location --request GET 'https://topups.reloadly.com/operators/auto-detect/phone/03238482221/countries/PK?suggestedAmountsMap=true&SuggestedAmounts=true' \
--header 'Authorization: Bearer YOUR_ACCESS_TOKEN_HERE' \
--header 'Accept: application/com.reloadly.topups-v1+json'using System;
using System.Threading.Tasks;
using System.Net.Http;
using System.Text;
using Newtonsoft.Json;
namespace WebAPIClient {
class Program {
static async Task Main(string[] args) {
await ApiCall();
}
private static async Task ApiCall() {
var message = new HttpRequestMessage(HttpMethod.Get, "https://topups.reloadly.com/operators/auto-detect/phone/03238482221/countries/PK?suggestedAmountsMap=true&SuggestedAmounts=true");
message.Headers.TryAddWithoutValidation("Authorization", "Bearer YOUR_ACCESS_TOKEN_HERE");
message.Headers.TryAddWithoutValidation("Accept", "application/com.reloadly.topups-v1+json");
using
var httpClient = new HttpClient();
var response = await httpClient.SendAsync(message);
var responseBody = await response.Content.ReadAsStringAsync();
var result = JsonConvert.DeserializeObject < dynamic > (responseBody);
Console.WriteLine(result);
}
}
}package main
import (
"fmt"
"net/http"
"io/ioutil"
)
func main() {
url := "https://topups.reloadly.com/operators/auto-detect/phone/03238482221/countries/PK?suggestedAmountsMap=true&SuggestedAmounts=true"
method := "GET"
client := &http.Client {
}
req, err := http.NewRequest(method, url, nil)
if err != nil {
fmt.Println(err)
return
}
req.Header.Add("Authorization", "Bearer YOUR_ACCESS_TOKEN_HERE")
req.Header.Add("Accept", "application/com.reloadly.topups-v1+json")
res, err := client.Do(req)
if err != nil {
fmt.Println(err)
return
}
defer res.Body.Close()
body, err := ioutil.ReadAll(res.Body)
if err != nil {
fmt.Println(err)
return
}
fmt.Println(string(body))
}OkHttpClient client = new OkHttpClient().newBuilder()
.build();
Request request = new Request.Builder()
.url("https://topups.reloadly.com/operators/auto-detect/phone/03238482221/countries/PK?suggestedAmountsMap=true&SuggestedAmounts=true")
.method("GET", null)
.addHeader("Authorization", "Bearer YOUR_ACCESS_TOKEN_HERE")
.addHeader("Accept", "application/com.reloadly.topups-v1+json")
.build();
Response response = client.newCall(request).execute();var request = require('request');
var options = {
'method': 'GET',
'url': 'https://topups.reloadly.com/operators/auto-detect/phone/03238482221/countries/PK?suggestedAmountsMap=true&SuggestedAmounts=true',
'headers': {
'Authorization': 'Bearer YOUR_ACCESS_TOKEN_HERE',
'Accept': 'application/com.reloadly.topups-v1+json'
}
};
request(options, function (error, response) {
if (error) throw new Error(error);
console.log(response.body);
});<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://topups.reloadly.com/operators/auto-detect/phone/03238482221/countries/PK?suggestedAmountsMap=true&SuggestedAmounts=true',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => array(
'Authorization: Bearer YOUR_ACCESS_TOKEN_HERE',
'Accept: application/com.reloadly.topups-v1+json'
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;import requests
import json
url = "https://topups.reloadly.com/operators/auto-detect/phone/03238482221/countries/PK?suggestedAmountsMap=true&SuggestedAmounts=true"
payload={}
headers = {
'Authorization': 'Bearer YOUR_ACCESS_TOKEN_HERE',
'Accept': 'application/com.reloadly.topups-v1+json'
}
response = requests.request("GET", url, headers=headers, data=payload)
print(response.text)