Overview
Recharge API Overview
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.
Earn ৳25.00 commission for every 1000 tk recharge!
Setting Up Your API
Checkpoint Tips:
- To register, please visit https://sohojpaybd.com/sign-up.
- After registration, complete the following steps:
- Navigate to the API Page from https://sohojpaybd.com/user/recharge-api.
- Copy your credentials for further use.
Setting Up Your Mobile App
Checkpoint Tips:
- Download the mobile app from this link.
- Follow these steps to set up the app:
- Install the app, granting necessary permissions: https://scripts.sohojpaybd.com/SohojPayBD_Mobile_App.apk.
- Register your device in the user panel by visiting https://sohojpaybd.com/user/devices.
Recharge Request Process
Our Live environment allows you to efficiently process recharge requests.
REST API
API Endpoint to Create a Recharge Request:
Method: GET or POST
https://secure.sohojpaybd.com/recharge/request/create
Method: GET or POST
Request Parameters
| Parameter Name | Data Type | Description |
|---|---|---|
number |
string (11) | Required - Mobile number for recharge. |
type |
string (2) | Required - Type of plan: 1 for Prepaid, 2 for Postpaid. |
operator |
string |
Required - Operator code:
|
tran_id |
string | Required - Unique transaction ID (5-20 characters). |
amount |
string (50) | (Required If no package selected). |
package |
string | Optional - ['drive','regular']. |
package_id |
string | (Required if Drive Package Selected) |
Request Headers
| Header Name | Value |
|---|---|
Content-Type |
application/json |
SOHOJPAY-API-KEY |
Your API key |
Create Recharge Request
Live Environment:
API Endpoint for Create Recharge Request:https://secure.sohojpaybd.com/recharge/request/create
Recharge Request code
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://secure.sohojpaybd.com/recharge/request/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":"01521******","type":"1","operator":"TT","tran_id":"ABC450986","amount":"10"} ',
CURLOPT_HTTPHEADER => array(
'Content-Type: application/json',
'SOHOJPAY-API-KEY: NKfoJJL14oLhMBFzlpDchNVwS01L7VutKUcfYmWEk3clB50N7n'
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
?>
<?php
require 'vendor/autoload.php';
use GuzzleHttp\Client;
$client = new Client();
$response = $client->post('https://secure.sohojpaybd.com/recharge/request/create', [
'json' => [
'number' => '01521******',
'type' => '1',
'operator' => 'TT',
'tran_id' => 'ABC450986',
'amount' => '10'
],
'headers' => [
'Content-Type' => 'application/json',
'SOHOJPAY-API-KEY' => 'NKfoJJL14oLhMBFzlpDchNVwS01L7VutKUcfYmWEk3clB50N7n'
]
]);
echo $response->getBody();
?>
const axios = require('axios');
let data = {
"number": "01521******",
"type": "1",
"operator": "TT",
"tran_id": "ABC450986",
"amount": "10"
};
let config = {
method: 'post',
url: 'https://secure.sohojpaybd.com/recharge/request/create',
headers: {
'Content-Type': 'application/json',
'SOHOJPAY-API-KEY': 'NKfoJJL14oLhMBFzlpDchNVwS01L7VutKUcfYmWEk3clB50N7n'
},
data: data
};
axios(config)
.then(response => {
console.log(JSON.stringify(response.data));
})
.catch(error => {
console.error(error);
});
import requests
url = "https://secure.sohojpaybd.com/recharge/request/create"
payload = {
"number": "01521******",
"type": "1",
"operator": "TT",
"tran_id": "ABC450986",
"amount": "10"
}
headers = {
'Content-Type': 'application/json',
'SOHOJPAY-API-KEY': 'NKfoJJL14oLhMBFzlpDchNVwS01L7VutKUcfYmWEk3clB50N7n'
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)
var xhr = new XMLHttpRequest();
xhr.open("POST", "https://secure.sohojpaybd.com/recharge/request/create", true);
xhr.setRequestHeader("Content-Type", "application/json");
xhr.setRequestHeader("SOHOJPAY-API-KEY", "NKfoJJL14oLhMBFzlpDchNVwS01L7VutKUcfYmWEk3clB50N7n");
xhr.onreadystatechange = function () {
if (xhr.readyState === 4 && xhr.status === 200) {
console.log(xhr.responseText);
}
};
var data = JSON.stringify({
"number": "01521******",
"type": "1",
"operator": "TT",
"tran_id": "ABC450986",
"amount": "10"
});
xhr.send(data);
Server Response
Response:
{
"status": 1,
"message": "Recharge request is successful.",
}
| Field Name | Type | Description |
|---|---|---|
| Success Response | ||
| status | bool | TRUE |
| message | String | Message for Status |
| Error Response | ||
| status | bool | FALSE |
| message | String | Message associated with the error response |
Verify Recharge Process
We have made Live environment to verify Recharge.
REST API
API Endpoint for Verify Recharge:
Method:GET or POST
https://secure.sohojpaybd.com/recharge/request/verify
Method:GET or POST
Verify Parameters
| Param Name | Data Type | Description |
|---|---|---|
tran_id |
string | Mandatory -This parameter can be retrieved from the "transactionId" (GET parameter). |
Verify Headers
| Header Name | Value |
|---|---|
Content-Type |
"application/json" |
SOHOJPAY-API-KEY |
Your API KEY |
Verify Recharge Request
Live Environment:
API Endpoint for Verify Recharge: https://secure.sohojpaybd.com/recharge/request/verify
Recharge Verify code
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://secure.sohojpaybd.com/recharge/request/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 => '{"tran_id":"ABC450986"}',
CURLOPT_HTTPHEADER => array(
'Content-Type: application/json',
'SOHOJPAY-API-KEY: NKfoJJL14oLhMBFzlpDchNVwS01L7VutKUcfYmWEk3clB50N7n'
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
?>
<?php
require 'vendor/autoload.php';
use GuzzleHttp\Client;
use GuzzleHttp\Psr7\Request;
$client = new Client();
$headers = [
'Content-Type' => 'application/json',
'SOHOJPAY-API-KEY' => 'NKfoJJL14oLhMBFzlpDchNVwS01L7VutKUcfYmWEk3clB50N7n'
];
$body = '{"tran_id":"ABC450986"}';
$request = new Request('POST', 'https://secure.sohojpaybd.com/recharge/request/verify', $headers, $body);
$res = $client->sendAsync($request)->wait();
echo $res->getBody();
?>
const axios = require('axios');
const data = JSON.stringify({
"tran_id": "ABC450986"
});
const config = {
method: 'post',
url: 'https://secure.sohojpaybd.com/recharge/request/verify',
headers: {
'Content-Type': 'application/json',
'SOHOJPAY-API-KEY': 'NKfoJJL14oLhMBFzlpDchNVwS01L7VutKUcfYmWEk3clB50N7n'
},
data : data
};
axios(config)
.then(function (response) {
console.log(JSON.stringify(response.data));
})
.catch(function (error) {
console.log(error);
});
import requests
import json
url = "https://secure.sohojpaybd.com/recharge/request/verify"
payload = json.dumps({
"tran_id": "ABC450986"
})
headers = {
'Content-Type': 'application/json',
'SOHOJPAY-API-KEY': 'NKfoJJL14oLhMBFzlpDchNVwS01L7VutKUcfYmWEk3clB50N7n'
}
response = requests.request("POST", url, headers=headers, data=payload)
print(response.text)
var xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener("readystatechange", function() {
if(this.readyState === 4) {
console.log(this.responseText);
}
});
xhr.open("POST", "https://secure.sohojpaybd.com/recharge/request/verify");
xhr.setRequestHeader("Content-Type", "application/json");
xhr.setRequestHeader("SOHOJPAY-API-KEY", "NKfoJJL14oLhMBFzlpDchNVwS01L7VutKUcfYmWEk3clB50N7n");
var data = JSON.stringify({
"tran_id": "ABC450986"
});
xhr.send(data);
Verify Response
Response:
{
"status": "COMPLETED",
"tran_id": "ABC450986",
"number": "01521******",
"amount": "20",
"pre_balance": "114.204",
"post_balance": "94.204"
}
Response Details
| Field Name | Type | Description |
|---|---|---|
| Success Response | ||
| status | string | INITIATED or PENDING or COMPLETED or ERROR |
| trans_id | String | Unique ID while creating request |
| number | String | Recharge Mobile number |
| pre_balance | String | Merchant Balance Before Request |
| post_balance | String | Merchant Balance After Request |
| Error Response | ||
| status | bool | FALSE |
| message | String | Message associated with the error response |
Drive Pack Offer List Check API
We have made Live environment to get Drive Pack Offer List
REST API
API Endpoint for offer list:
Method:GET or POST
https://secure.sohojpaybd.com/recharge/request/package
Method:GET or POST
Parameters
| Param Name | Data Type | Description |
|---|---|---|
operator |
string |
Required - Operator code:
|
package |
string | Optional -['regular', 'drive']. |
Headers
| Header Name | Value |
|---|---|
Content-Type |
"application/json" |
SOHOJPAY-API-KEY |
Your API KEY |
Request
Live Environment:
API Endpoint for package list: https://secure.sohojpaybd.com/recharge/request/package
Response
Response:
{
"status": true,
"message": "Package Fetched Successfully",
"data": {
"drive": [
{
"title": "রবি চেক অফার ৩৫ জিবি ইন্টারনেট সারা বাংলাদেশ ৩০ দিন",
"price": "290.00",
"id": "2150",
"duration": "30",
"com": "0.00",
"operator": "Robi"
},
{
"title": "রবি ফ্যামিলি প্যাকেজ ৫ জিবি ইন্টারনেট সারা বাংলাদেশ ৩০ দিন [শর্তঃ- উক্ত নাম্বারে ব্যালেন্স থাকতে হবে।কোনো প্রকার লোন থাকা জাবে না।পূর্বে ফ্যামিলি প্যাকেজ নেওয়া থাকলে সেটার ঘর থেকে লিফ নিতে হবে]",
"price": "89.00",
"id": "2091",
"duration": "30",
"com": "0.00",
"operator": "Robi"
}
],
"regular": [
{
"title": "38tk 1GB 24hr",
"price": "38.00",
"id": "9495",
"duration": "30",
"com": "0.00",
"operator": "Robi"
},
{
"title": "34Tk-1p/sec,2Days ",
"price": "34.00",
"id": "9456",
"duration": "30",
"com": "0.00",
"operator": "Robi"
}
]
}
}
Response Details
| Field Name | Type | Description |
|---|---|---|
| Success Response | ||
| status | string | TRUE |
| message | String | Message associated with action |
| data | String | Based on package |
| Error Response | ||
| status | bool | FALSE |
| message | String | Message associated with the error response |
Balance Check Process
We have made Live environment to Balance Check.
REST API
API Endpoint for Balance Check:
Method:GET or POST
https://secure.sohojpaybd.com/recharge/request/balance
Method:GET or POST
Balance Checking Headers
| Header Name | Value |
|---|---|
Content-Type |
"application/json" |
SOHOJPAY-API-KEY |
Your API KEY |
Balance Check Request
Live Environment:
API Endpoint for Balance Check: https://secure.sohojpaybd.com/recharge/request/balance
Balance Check Code
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://secure.sohojpaybd.com/recharge/request/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 => 'POST',
CURLOPT_HTTPHEADER => array(
'Content-Type: application/json',
'SOHOJPAY-API-KEY: NKfoJJL14oLhMBFzlpDchNVwS01L7VutKUcfYmWEk3clB50N7n'
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
?>
<?php
require 'vendor/autoload.php';
use GuzzleHttp\Client;
use GuzzleHttp\Psr7\Request;
$client = new Client();
$headers = [
'Content-Type' => 'application/json',
'SOHOJPAY-API-KEY' => 'NKfoJJL14oLhMBFzlpDchNVwS01L7VutKUcfYmWEk3clB50N7n'
];
$request = new Request('POST', 'https://secure.sohojpaybd.com/recharge/request/balance', $headers);
$res = $client->sendAsync($request)->wait();
echo $res->getBody();
?>
const axios = require('axios');
const config = {
method: 'post',
url: 'https://secure.sohojpaybd.com/recharge/request/balance',
headers: {
'Content-Type': 'application/json',
'SOHOJPAY-API-KEY': 'NKfoJJL14oLhMBFzlpDchNVwS01L7VutKUcfYmWEk3clB50N7n'
},
};
axios(config)
.then(function (response) {
console.log(JSON.stringify(response.data));
})
.catch(function (error) {
console.log(error);
});
import requests
import json
url = "https://secure.sohojpaybd.com/recharge/request/balance"
headers = {
'Content-Type': 'application/json',
'SOHOJPAY-API-KEY': 'NKfoJJL14oLhMBFzlpDchNVwS01L7VutKUcfYmWEk3clB50N7n'
}
response = requests.request("POST", url, headers=headers)
print(response.text)
var xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener("readystatechange", function() {
if(this.readyState === 4) {
console.log(this.responseText);
}
});
xhr.open("POST", "https://secure.sohojpaybd.com/recharge/request/balance");
xhr.setRequestHeader("Content-Type", "application/json");
xhr.setRequestHeader("SOHOJPAY-API-KEY", "NKfoJJL14oLhMBFzlpDchNVwS01L7VutKUcfYmWEk3clB50N7n");
xhr.send();
Balance Check Response
Response:
{
"status": true,
"message": "Balance Fetched Successfully",
"balance": 9
}
Response Details
| Field Name | Type | Description |
|---|---|---|
| Success Response | ||
| status | boolean | true |
| message | String | Balance Fetched Successfully |
| balance | String | Balance associated with api account |
| Error Response | ||
| status | bool | FALSE |
| message | String | Message associated with the error response |