Documentation

Our Recharge API enables you to earn money by offering seamless recharge services to your users. By integrating this API into your platform, you can provide a user-friendly experience for your customers, allowing them to easily recharge their mobile accounts. This not only enhances user satisfaction but also creates a steady revenue stream for your business, making it a valuable addition to your service offerings.


Checkpoint Tips:

To register, please visit: Here

  1. After registration, complete the following steps:
    • Navigate to the API Page from Here
    • Copy your credentials for further use

Recharge Request Process

Our live environment allows you to efficiently process recharge requests

API Endpoint to create a recharge request Method POST

/api/recharge/create

Request Parameter

Parameter Name Data Type Description
number string (11) Required - Mobile number for recharge
amount integer Required Minimum amount 20 tk
operator string Required - Operator code:
    • Grameenphone: GP
    • Robi: RB
    • Airtel: AT
    • Banglalink: BL
    • Teletalk: TT
type integer Type of sim: 1 for prepaid, 2 for Postpaid & 3 for Skitto

Request Headers

Header Name value
Content-Type application/json
CD-API-KEY Your API key here

Create Recharge Request

Live Environment:

API Endpoint to create a recharge request Method POST

/api/recharge/create

Recharge Request code



<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => '/api/recharge/create',
  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 =>'{"number":"017999******","amount":"20","type":"1","operator":"GP"} ',
  CURLOPT_HTTPHEADER => array(
    'Content-Type: application/json',
    'CD-API-KEY: SIYAFUVQdUMHpxHUc5KGmMlFloI0ohZXck7J4nQfvHTrzRaXEyvyZNPXOTgH'
  ),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;

?>

<?php
require 'vendor/autoload.php';

use GuzzleHttp\Client;

$client = new Client();
$response = $client->post('/api/recharge/create', [
   'json' => [
      'number' => '017999******"',
      'amount' => '20',
      'type' => '1',
      'operator' => 'GP',
   ],

    'headers' => [
        'Content-Type' => 'application/json',
        'CD-API-KEY' => 'SIYAFUVQdUMHpxHUc5KGmMlFloI0ohZXck7J4nQfvHTrzRaXEyvyZNPXOTgH'
    ]
]);

echo $response->getBody();
?>

                  

import requests

url = "/api/recharge/create"

payload = {
    "number": "017999******",
    "amount": "20",
    "type": "1",
    "operator": "GP",
}


headers = {
    'Content-Type': 'application/json',
    'CD-API-KEY': 'SIYAFUVQdUMHpxHUc5KGmMlFloI0ohZXck7J4nQfvHTrzRaXEyvyZNPXOTgH'
}

response = requests.post(url, json=payload, headers=headers)

print(response.text)
            
                    
                    
var xhr = new XMLHttpRequest();
xhr.open("POST", "/api/recharge/create", true);
xhr.setRequestHeader("Content-Type", "application/json");
xhr.setRequestHeader("CD-API-KEY", "SIYAFUVQdUMHpxHUc5KGmMlFloI0ohZXck7J4nQfvHTrzRaXEyvyZNPXOTgH");

xhr.onreadystatechange = function () {
    if (xhr.readyState === 4 && xhr.status === 200) {
        console.log(xhr.responseText);
    }
};

var data = JSON.stringify({
    "number": "017999******",
    "amount": "20",
    "type": "1",
    "operator": "GP"
});

xhr.send(data);

                    
                  
                    

const axios = require('axios');

let data = {
    "number": "017999******",
    "amount": "20",
    "type": "1",
    "operator": "GP"
};

let config = {
    method: 'post',
    url: '/api/recharge/create',
    headers: {
        'Content-Type': 'application/json',
        'CD-API-KEY': 'SIYAFUVQdUMHpxHUc5KGmMlFloI0ohZXck7J4nQfvHTrzRaXEyvyZNPXOTgH'
    },
    data: data
};

axios(config)
    .then(response => {
        console.log(JSON.stringify(response.data));
    })
    .catch(error => {
        console.error(error);
    });

                    
                  

Server Response

 * For Success Response
                
{
  "status": true,
  "message": "Flexiload- Request Submit Successfully",
  "trx_id": "162670202502102256558"
}
                
              
 * For Error Response
                
{
"status": false,
"error": "error response here"
}
                
              

Verify Recharge Process

We have made Live environment to verify Recharge.

API Endpoint to Verify recharge: Method POST

api/recharge/verify

Request Parameter

Parameter Name Data Type Description
ref_id string Required - This parameter can be retireved from the server success response

Verify Headers

Header Name value
Content-Type application/json
CD-API-KEY Your API key here

Verify Recharge Request

Live Environment:

API Endpoint to verify recharge Method POST

/api/recharge/verify

Recharge Verify code



<?php

$curl = curl_init();

curl_setopt_array($curl, array(
CURLOPT_URL => '/api/recharge/verify',
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 =>'{"trx_id":"162670202502102229266"} ',
CURLOPT_HTTPHEADER => array(
'Content-Type: application/json',
'CD-API-KEY: SIYAFUVQdUMHpxHUc5KGmMlFloI0ohZXck7J4nQfvHTrzRaXEyvyZNPXOTgH'
),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;

?>

<?php
require 'vendor/autoload.php';

use GuzzleHttp\Client;

$client = new Client();
$response = $client->post('/api/recharge/verify', [
'json' => [
'trx_id' => '162670202502102229266',
],

'headers' => [
'Content-Type' => 'application/json',
'CD-API-KEY' => 'SIYAFUVQdUMHpxHUc5KGmMlFloI0ohZXck7J4nQfvHTrzRaXEyvyZNPXOTgH'
]
]);

echo $response->getBody();
?>

          

import requests

url = "/api/recharge/verify"

payload = {
"trx_id": "162670202502102229266",
}


headers = {
'Content-Type': 'application/json',
'CD-API-KEY': 'SIYAFUVQdUMHpxHUc5KGmMlFloI0ohZXck7J4nQfvHTrzRaXEyvyZNPXOTgH'
}

response = requests.post(url, json=payload, headers=headers)

print(response.text)
    
            
            
var xhr = new XMLHttpRequest();
xhr.open("POST", "/api/recharge/verify", true);
xhr.setRequestHeader("Content-Type", "application/json");
xhr.setRequestHeader("CD-API-KEY", "SIYAFUVQdUMHpxHUc5KGmMlFloI0ohZXck7J4nQfvHTrzRaXEyvyZNPXOTgH");

xhr.onreadystatechange = function () {
if (xhr.readyState === 4 && xhr.status === 200) {
console.log(xhr.responseText);
}
};

var data = JSON.stringify({
"trx_id": "162670202502102229266",
});

xhr.send(data);

            
          
            

const axios = require('axios');

let data = {
"trx_id": "162670202502102229266",
};

let config = {
method: 'post',
url: '/api/recharge/verify',
headers: {
'Content-Type': 'application/json',
'CD-API-KEY': 'SIYAFUVQdUMHpxHUc5KGmMlFloI0ohZXck7J4nQfvHTrzRaXEyvyZNPXOTgH'
},
data: data
};

axios(config)
.then(response => {
console.log(JSON.stringify(response.data));
})
.catch(error => {
console.error(error);
});

            
          

Server Response

 * For Success Response
        
{
  "status": true,
  "data": {
      "status": "Completed",
      "trx_id": "162670202502102229266",
      "number": 17999*******,
      "amount": 20
  }
}
        
      
 * For Error Response
        
{
"status": false,
"error": "error response here"
}
        
      

Balance Check Process

We have made Live environment to Balance Check.

API Endpoint to Verify recharge: Method GET

/api/recharge/balance

Balance Checking Headers

Header Name value
Content-Type application/json
CD-API-KEY Your API key here

Balance Check Request

Live Environment:

API Endpoint to check Balance Method GET

https://autoflexisoftware.top/api/recharge/balance

Recharge Verify code



<?php

$curl = curl_init();

curl_setopt_array($curl, array(
CURLOPT_URL => '/api/recharge/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(
'Content-Type: application/json',
'CD-API-KEY: SIYAFUVQdUMHpxHUc5KGmMlFloI0ohZXck7J4nQfvHTrzRaXEyvyZNPXOTgH'
),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;

?>

<?php
require 'vendor/autoload.php';

use GuzzleHttp\Client;

$client = new Client();
$headers = [
  'Content-Type' => 'application/json',
  'SOHOJPAY-API-KEY' => 'SIYAFUVQdUMHpxHUc5KGmMlFloI0ohZXck7J4nQfvHTrzRaXEyvyZNPXOTgH'
];
$request = new Request('GET', '/api/recharge/balance', $headers);
$res = $client->sendAsync($request)->wait();
echo $res->getBody();
?>

          

import requests

url = "/api/recharge/balance"

headers = {
'Content-Type': 'application/json',
'CD-API-KEY': 'SIYAFUVQdUMHpxHUc5KGmMlFloI0ohZXck7J4nQfvHTrzRaXEyvyZNPXOTgH'
}

response = requests.request("GET", url, header=headers)

print(response.text)
    
            
            
var xhr = new XMLHttpRequest();
xhr.open("GET", "/api/recharge/balance", true);
xhr.setRequestHeader("Content-Type", "application/json");
xhr.setRequestHeader("CD-API-KEY", "SIYAFUVQdUMHpxHUc5KGmMlFloI0ohZXck7J4nQfvHTrzRaXEyvyZNPXOTgH");


xhr.send();

            
          
            

const axios = require('axios');

let config = {
method: 'get',
url: '/api/recharge/balance',
headers: {
'Content-Type': 'application/json',
'CD-API-KEY': 'SIYAFUVQdUMHpxHUc5KGmMlFloI0ohZXck7J4nQfvHTrzRaXEyvyZNPXOTgH'
},
};

axios(config)
.then(response => {
console.log(JSON.stringify(response.data));
})
.catch(error => {
console.error(error);
});

            
          

Server Response

 * For Success Response
        
{
"status": true,
"data": {
    "balance": 440
  }
}
        
      
 * For Error Response
        
{
"status": false,
"error": "error response here"
}