NICTBD.COM Drive Offer Recharge API Documentation
Use NICTBD.COM Drive Offer API to check active internet, minutes, bundle, rate cutter and entertainment offers, submit offer recharge requests and verify order status from your own website, Laravel application, mobile app backend or custom merchant system.
Overview
NICTBD.COM Drive Offer API allows approved merchants to fetch active offers, submit offer recharge requests and check request status using secure API credentials. This API is useful for selling internet packs, minute packs, bundle offers, rate cutter packs and entertainment offers from a merchant website or app backend.
Core Features
API Flow
Processing. Use the status check API to get the latest
result before confirming final delivery status to your customer.
API Credentials
Merchant can collect API credentials from NICTBD.COM Merchant Dashboard after approval.
| Credential | Required | Example | Usage |
|---|---|---|---|
| store_id | Required | STORE-2-FRXECLKM |
Identifies your merchant store. |
| api_key | Required | pk_live_xxxxxxxxx |
Merchant API key. |
| api_secret | Required | sk_live_xxxxxxxxx |
Private API secret. Keep it hidden and secure. |
approved. Inactive or unapproved merchants cannot use this API.
API Endpoint
Use the same endpoint with different action query values.
https://www.nictbd.com/api/drive-offer?action=check
https://www.nictbd.com/api/drive-offer?action=submit
https://www.nictbd.com/api/drive-offer?action=status_check
Headers
Accept: application/json Content-Type: application/x-www-form-urlencoded
Content-Type: application/json.
API Actions
| Action | Method | Purpose | Required Main Fields |
|---|---|---|---|
check |
POST | Get active offer list. | store_id, api_key, api_secret |
submit |
POST | Submit selected offer request. | store_id, api_key, api_secret, offer_id, phone |
status_check |
POST | Check latest request status. | store_id, api_key, api_secret, order_number |
Offer Types
You can filter offers using offer_type when calling the check action.
| Offer Type | Description |
|---|---|
internet |
Internet data offers. |
minutes |
Voice minute offers. |
bundle |
Combo bundle offers. |
ratecutter |
Rate cutter offers. |
entertainment |
Entertainment related packs. |
Supported Operators
| Operator Code | Operator Name | Allowed Number Prefix | Example Number |
|---|---|---|---|
GP |
Grameenphone | 013, 017 |
01700000000 |
BL |
Banglalink | 014, 019 |
01900000000 |
RB |
Robi | 018 |
01800000000 |
AT |
Airtel | 016 |
01600000000 |
TT |
Teletalk | 015 |
01500000000 |
Integration Examples
cURL Examples
curl -X POST "https://www.nictbd.com/api/drive-offer?action=check" \ -H "Accept: application/json" \ -d "store_id=YOUR_STORE_ID" \ -d "api_key=YOUR_API_KEY" \ -d "api_secret=YOUR_API_SECRET" \ -d "operator_code=GP" \ -d "offer_type=internet"
curl -X POST "https://www.nictbd.com/api/drive-offer?action=submit" \ -H "Accept: application/json" \ -d "store_id=YOUR_STORE_ID" \ -d "api_key=YOUR_API_KEY" \ -d "api_secret=YOUR_API_SECRET" \ -d "offer_id=12" \ -d "phone=01700000000"
curl -X POST "https://www.nictbd.com/api/drive-offer?action=status_check" \ -H "Accept: application/json" \ -d "store_id=YOUR_STORE_ID" \ -d "api_key=YOUR_API_KEY" \ -d "api_secret=YOUR_API_SECRET" \ -d "order_number=R6A1B2C3D4E5F6"
PHP cURL Example
<?php
$url = 'https://www.nictbd.com/api/drive-offer?action=submit';
$data = [
'store_id' => 'YOUR_STORE_ID',
'api_key' => 'YOUR_API_KEY',
'api_secret' => 'YOUR_API_SECRET',
'offer_id' => '12',
'phone' => '01700000000',
];
$ch = curl_init($url);
curl_setopt_array($ch, [
CURLOPT_POST => true,
CURLOPT_POSTFIELDS => http_build_query($data),
CURLOPT_RETURNTRANSFER => true,
CURLOPT_TIMEOUT => 60,
CURLOPT_HTTPHEADER => [
'Accept: application/json',
],
]);
$response = curl_exec($ch);
$error = curl_error($ch);
curl_close($ch);
if ($error) {
echo 'Curl Error: ' . $error;
exit;
}
$result = json_decode($response, true);
if (!empty($result['success']) && $result['success'] === true) {
echo 'Request Submitted. Order: ' . $result['order_number'];
} else {
echo 'Request Failed. Reason: ' . ($result['error'] ?? 'Unknown error');
}
print_r($result);
Laravel HTTP Client Example
use Illuminate\Support\Facades\Http;
$response = Http::asForm()
->acceptJson()
->timeout(60)
->post('https://www.nictbd.com/api/drive-offer?action=submit', [
'store_id' => config('services.nictbd.store_id'),
'api_key' => config('services.nictbd.api_key'),
'api_secret' => config('services.nictbd.api_secret'),
'offer_id' => 12,
'phone' => '01700000000',
]);
$result = $response->json();
if (($result['success'] ?? false) === true) {
// Request submitted
// Save order_number and check status later if needed
} else {
// Request failed
// Show $result['error']
}
Node.js Example
const payload = new URLSearchParams({
store_id: "YOUR_STORE_ID",
api_key: "YOUR_API_KEY",
api_secret: "YOUR_API_SECRET",
offer_id: "12",
phone: "01700000000"
});
const response = await fetch("https://www.nictbd.com/api/drive-offer?action=submit", {
method: "POST",
headers: {
"Accept": "application/json",
"Content-Type": "application/x-www-form-urlencoded"
},
body: payload
});
const result = await response.json();
if (result.success === true) {
console.log("Request Submitted:", result.order_number);
} else {
console.log("Request Failed:", result.error);
}
Python Example
import requests
payload = {
"store_id": "YOUR_STORE_ID",
"api_key": "YOUR_API_KEY",
"api_secret": "YOUR_API_SECRET",
"offer_id": "12",
"phone": "01700000000"
}
response = requests.post(
"https://www.nictbd.com/api/drive-offer?action=submit",
data=payload,
headers={"Accept": "application/json"},
timeout=60
)
result = response.json()
if result.get("success") is True:
print("Request Submitted:", result.get("order_number"))
else:
print("Request Failed:", result.get("error"))
Check Offers Response
Use action=check to get active offer list. You can filter by operator_code
and offer_type.
Request Parameters
| Field | Required | Example | Description |
|---|---|---|---|
| store_id | Required | STORE-2-FRXECLKM |
Your Store ID. |
| api_key | Required | pk_live_xxxxxxxxx |
Your API Key. |
| api_secret | Required | sk_live_xxxxxxxxx |
Your API Secret. |
| operator_code | Optional | GP |
Filter offers by operator. |
| offer_type | Optional | internet |
Filter offers by type. |
Success Response
{
"success": true,
"offers": [
{
"id": "12",
"operator_code": "GP",
"operator_name": "Grameenphone",
"offer_name": "1GB Internet",
"offer_price": "99.0000",
"merchant_commission": "2.0000",
"user_commission": "2.0000",
"offer_type": "internet",
"validity": "7 Days"
}
]
}
Submit Request Response
Use action=submit with selected offer_id and customer mobile number.
A successful submit response means the request has been accepted for processing.
Request Parameters
| Field | Required | Example | Description |
|---|---|---|---|
| store_id | Required | STORE-2-FRXECLKM |
Your Store ID. |
| api_key | Required | pk_live_xxxxxxxxx |
Your API Key. |
| api_secret | Required | sk_live_xxxxxxxxx |
Your API Secret. |
| offer_id | Required | 12 |
Offer ID from check response. |
| phone | Required | 01700000000 |
Customer mobile number. |
Success Response
{
"success": true,
"order_number": "R6A1B2C3D4E5F6",
"status": "Processing",
"offer": "1GB Internet",
"offer_type": "internet",
"validity": "7 Days",
"phone": "017XXXX0000",
"operator": "GP",
"amount": "99.00",
"commission": "2.00",
"total_amount": "97.00",
"before_balance": "500.00",
"after_balance": "401.00"
}
order_number and use status check API to get final order result.
Status Check Response
Use action=status_check with order_number to check latest request status.
Request Parameters
| Field | Required | Example | Description |
|---|---|---|---|
| store_id | Required | STORE-2-FRXECLKM |
Your Store ID. |
| api_key | Required | pk_live_xxxxxxxxx |
Your API Key. |
| api_secret | Required | sk_live_xxxxxxxxx |
Your API Secret. |
| order_number | Required | R6A1B2C3D4E5F6 |
Order number from submit response. |
Processing Response
{
"success": true,
"order_number": "R6A1B2C3D4E5F6",
"status": "Processing",
"offer": "1GB Internet",
"offer_type": "internet",
"validity": "7 Days",
"amount": "99.00",
"commission": "2.00",
"total_amount": "97.00",
"phone": "017XXXX0000",
"operator": "GP",
"response": "Recharge request submitted"
}
Success Response
{
"success": true,
"order_number": "R6A1B2C3D4E5F6",
"status": "Success",
"offer": "1GB Internet",
"offer_type": "internet",
"validity": "7 Days",
"amount": "99.00",
"commission": "2.00",
"total_amount": "97.00",
"phone": "017XXXX0000",
"operator": "GP",
"operator_transaction_id": "123456789"
}
Cancelled Response
{
"success": true,
"order_number": "R6A1B2C3D4E5F6",
"status": "Cancelled",
"offer": "1GB Internet",
"offer_type": "internet",
"validity": "7 Days",
"amount": "99.00",
"commission": "2.00",
"total_amount": "97.00",
"phone": "017XXXX0000",
"operator": "GP",
"cancel_note": "Request could not be completed."
}
Error Responses
Missing API Credentials
{
"success": false,
"error": "Missing API credentials."
}
Invalid API Credentials
{
"success": false,
"error": "Invalid API credentials."
}
Merchant Verification Not Approved
{
"success": false,
"error": "Merchant verification is not approved."
}
Invalid Offer Type
{
"success": false,
"error": "Invalid offer type.",
"allowed_types": [
"internet",
"minutes",
"bundle",
"ratecutter",
"entertainment"
]
}
Invalid Offer ID
{
"success": false,
"error": "Invalid offer ID."
}
Invalid Operator Number
{
"success": false,
"error": "Invalid operator number for this offer."
}
Insufficient Balance
{
"success": false,
"error": "Insufficient balance."
}
Transaction Not Found
{
"success": false,
"error": "Transaction not found."
}
Security Guidelines
- Call Drive Offer API only from your backend server.
- Never expose
api_secretin frontend JavaScript, mobile app source code or public repository. - Keep credentials inside environment variables or secure configuration.
- Validate phone number and operator before submitting request.
- Use
order_numberfrom submit response to check final status. - Do not show final success to customer until status check returns
Success. - Contact support immediately if API Secret is leaked.
Important Notes
| Topic | Explanation |
|---|---|
| Merchant Approval | Only approved merchants can use Drive Offer API. |
| Check Action | Use check action to get latest available offer list. |
| Submit Action | Use submit action to submit selected offer request. |
| Status Check | Use status_check action to check latest order status. |
| Phone Operator | Customer mobile number must match the selected offer operator. |
| Final Status | Final result should be confirmed using status check API. |
| API Security | Always keep api_secret private and call this API from backend only. |