Drive Recharge API Documentation
Check Offers and Submit Drive Recharge Requests
API Endpoints
POST https://rasi.top/api/ Content-Type: application/x-www-form-urlencoded
POST https://rasi.top/api/ Content-Type: application/x-www-form-urlencoded
POST https://rasi.top/api/ Content-Type: application/x-www-form-urlencoded
Check Available Drive Offers
Use check-drive.php endpoint to fetch active offers. You can filter by offer_type and/or operator_code.
Available Offer Types:
Operator Codes:
internet, minutes, bundle, ratecutter, entertainmentOperator Codes:
GP (Grameenphone), BL (Banglalink), RB (Robi), AT (Airtel), TT (TeleTalk)
| Parameter | Type | Description | Example |
|---|---|---|---|
| api_key | string | Your API key | XXXAPIKEY |
| api_secret | string | Your API secret | XXXSECRETKEY |
| offer_type | string | Filter offers by type (optional) | minutes |
| operator_code | string | Filter offers by operator (optional). Codes: GP (Grameenphone), BL (Banglalink), RB (Robi), AT (Airtel), TT (TeleTalk) | BL |
PHP Example
<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://rasi.top/api/check-drive.php",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_POST => true,
CURLOPT_POSTFIELDS => http_build_query([
"api_key" => "XXXAPIKEY",
"api_secret" => "XXXSECRETKEY",
"offer_type" => "minutes", // optional
"operator_code" => "BL" // optional
]),
]);
$response = curl_exec($curl);
curl_close($curl);
$data = json_decode($response, true);
print_r($data);
?>
Sample Response
{
"success": true,
"offers": [
{
"id": 5,
"operator_code": "BL",
"operator_name": "Banglalink",
"offer_name": "200 Minutes",
"offer_price": "207.00",
"user_commission": "4.00",
"offer_type": "minutes",
"validity": "5 Days"
},
{
"id": 8,
"operator_code": "BL",
"operator_name": "Banglalink",
"offer_name": "100 Minutes",
"offer_price": "120.00",
"user_commission": "2.00",
"offer_type": "minutes",
"validity": "3 Days"
}
]
}
Invalid Offer Type Example
{
"error": "Invalid offer type.",
"allowed_types": ["internet","minutes","bundle","ratecutter","entertainment"]
}
Submit Drive Recharge Request
Use drive-recharge.php endpoint to submit recharge requests.
| Parameter | Type | Description | Example |
|---|---|---|---|
| api_key | string | Your API key | XXXAPIKEY |
| api_secret | string | Your API secret | XXXSECRETKEY |
| offer_id | integer | Drive Offer ID | 5 |
| phone | string | Recipient mobile number | 01712xxxxxx |
PHP Example
<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://rasi.top/api/drive-recharge.php",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_POST => true,
CURLOPT_POSTFIELDS => http_build_query([
"api_key" => "XXXAPIKEY",
"api_secret" => "XXXSECRETKEY",
"offer_id" => 5,
"phone" => "01712xxxxxx"
]),
]);
$response = curl_exec($curl);
curl_close($curl);
$data = json_decode($response, true);
print_r($data);
?>
Sample Success Response
{
"success": true,
"transaction_id": R0354404A9451,
"status": "Processing",
"offer": "200 Minutes",
"amount": 207.00,
"commission": "4.00"
}
Error Responses
{
"error": "Missing required parameters."
}
{
"error": "Invalid API credentials."
}
{
"error": "Insufficient balance."
}
{
"error": "Invalid operator number for this offer."
}
Check Recharge Status
After submitting a recharge request, use check-status.php endpoint to check the current status of your transaction using the unique transaction_id.
| Parameter | Type | Description | Example |
|---|---|---|---|
| api_key | string | Your API key | XXXAPIKEY |
| api_secret | string | Your API secret | XXXSECRETKEY |
| transaction_id | string | Unique transaction ID returned by drive-recharge.php | R25AS4478SDFF5 |
PHP Example
<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://rasi.top/api/check-status.php",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_POST => true,
CURLOPT_POSTFIELDS => http_build_query([
"api_key" => "XXXAPIKEY",
"api_secret" => "XXXSECRETKEY",
"transaction_id" => "R25AS4478SDFF5"
]),
]);
$response = curl_exec($curl);
curl_close($curl);
$data = json_decode($response, true);
print_r($data);
?>
Sample Responses
1️⃣ Processing
{
"success": true,
"transaction_id": "R0354404A9451",
"status": "Processing",
"offer": "200 Minutes",
"amount": "207.00",
"commission": "4.00",
"phone": "017XXXXXXXX",
"operator": "GP",
"response": "Recharge request submitted"
}
2️⃣ Success
{
"success": true,
"transaction_id": "R0354404A9451",
"status": "Success",
"offer": "200 Minutes",
"amount": "207.00",
"commission": "4.00",
"phone": "017XXXXXXXX",
"operator": "GP",
"operator_transaction_id": "OP1234567890"
}
3️⃣ Cancelled
{
"success": true,
"transaction_id": "R0354404A9451",
"status": "Cancelled",
"offer": "200 Minutes",
"amount": "207.00",
"commission": "4.00",
"phone": "017XXXXXXXX",
"operator": "GP",
"cancel_note": "Insufficient balance"
}
Error Responses
{
"error": "Missing required parameters."
}
{
"error": "Invalid API credentials."
}
{
"error": "Transaction not found."
}