Bill Payment API Documentation
Provider list দেখা, provider অনুযায়ী service list নেওয়া, bill payment request submit করা এবং order status check করার জন্য এই guide follow করুন।
Getting Started
Bill Payment API ব্যবহার করার জন্য প্রথমে user account create করুন। তারপর user dashboard থেকে API Key এবং Secret Key সংগ্রহ করুন।
1. Account
Register করে account খুলুন।
2. API Key
API Keys page থেকে key নিন।
3. Provider
প্রথমে provider list check করুন।
4. Submit
Provider ও service select করে payment submit করুন।
POST method দিয়ে করতে হবে।
API Key এবং Secret Key server-side থেকে ব্যবহার করুন।
Base Endpoint
Authentication Parameters
| Parameter | Required | Description |
|---|---|---|
api_key |
Yes | User dashboard থেকে পাওয়া API Key। |
api_secret |
Yes | User dashboard থেকে পাওয়া Secret Key। |
1. Provider Check
Active bill provider list পাওয়ার জন্য এই API ব্যবহার করুন।
Request Parameters
| Parameter | Required | Example |
|---|---|---|
api_key |
Yes | YOUR_API_KEY |
api_secret |
Yes | YOUR_SECRET_KEY |
cURL Example
curl -X POST "https://nurr.top/api/bill-payment.php?action=provider_check" \ -d "api_key=YOUR_API_KEY" \ -d "api_secret=YOUR_SECRET_KEY"
PHP Example
$ch = curl_init("https://nurr.top/api/bill-payment.php?action=provider_check");
curl_setopt_array($ch, [
CURLOPT_POST => true,
CURLOPT_POSTFIELDS => [
"api_key" => "YOUR_API_KEY",
"api_secret" => "YOUR_SECRET_KEY"
],
CURLOPT_RETURNTRANSFER => true
]);
$response = curl_exec($ch);
curl_close($ch);
$data = json_decode($response, true);
print_r($data);
Success Response
{
"success": true,
"providers": [
{
"id": 1,
"name": "DESCO",
"logo": "desco.png",
"status": "active"
}
]
}
2. Service Check
Provider Check থেকে পাওয়া provider_id দিয়ে
ওই provider-এর active service list নিন।
Request Parameters
| Parameter | Required | Example | Description |
|---|---|---|---|
api_key |
Yes | YOUR_API_KEY | আপনার API Key। |
api_secret |
Yes | YOUR_SECRET_KEY | আপনার Secret Key। |
provider_id |
Yes | 1 | Provider Check response থেকে পাওয়া provider ID। |
cURL Example
curl -X POST "https://nurr.top/api/bill-payment.php?action=service_check" \ -d "api_key=YOUR_API_KEY" \ -d "api_secret=YOUR_SECRET_KEY" \ -d "provider_id=1"
PHP Example
$ch = curl_init("https://nurr.top/api/bill-payment.php?action=service_check");
curl_setopt_array($ch, [
CURLOPT_POST => true,
CURLOPT_POSTFIELDS => [
"api_key" => "YOUR_API_KEY",
"api_secret" => "YOUR_SECRET_KEY",
"provider_id" => "1"
],
CURLOPT_RETURNTRANSFER => true
]);
$response = curl_exec($ch);
curl_close($ch);
$data = json_decode($response, true);
print_r($data);
Success Response
{
"success": true,
"provider": {
"id": 1,
"name": "DESCO"
},
"services": [
{
"id": "5",
"provider_id": "1",
"name": "DESCO Prepaid",
"logo": "desco-prepaid.png",
"module_name": "meter_number,bill_month,contact_number",
"module_fields": [
"meter_number",
"bill_month",
"contact_number"
]
}
]
}
module_fields array-তে যে field থাকবে,
Submit API-তে সেই field গুলো পাঠাতে হবে।
3. Submit Bill Payment
Bill payment request submit করার জন্য এই API ব্যবহার করুন।
Request Parameters
| Parameter | Required | Example | Description |
|---|---|---|---|
api_key |
Yes | YOUR_API_KEY | আপনার API Key। |
api_secret |
Yes | YOUR_SECRET_KEY | আপনার Secret Key। |
provider_id |
Yes | 1 | Provider Check থেকে পাওয়া ID। |
service_id |
Yes | 5 | Service Check থেকে পাওয়া ID। |
amount |
Yes | 500 | Bill amount। |
meter_number |
Conditional | 123456789 | Service-এর module_fields অনুযায়ী পাঠাতে হবে। |
bill_month |
Conditional | 2026-04 | যদি module_fields-এ থাকে, পাঠাতে হবে। |
contact_number |
Conditional | 017XXXXXXXX | যদি module_fields-এ থাকে, পাঠাতে হবে। |
cURL Example
curl -X POST "https://nurr.top/api/bill-payment.php?action=submit" \ -d "api_key=YOUR_API_KEY" \ -d "api_secret=YOUR_SECRET_KEY" \ -d "provider_id=1" \ -d "service_id=5" \ -d "amount=500" \ -d "meter_number=123456789" \ -d "bill_month=2026-04" \ -d "contact_number=017XXXXXXXX"
Alternative Bill Month Format
curl -X POST "https://nurr.top/api/bill-payment.php?action=submit" \ -d "api_key=YOUR_API_KEY" \ -d "api_secret=YOUR_SECRET_KEY" \ -d "provider_id=1" \ -d "service_id=5" \ -d "amount=500" \ -d "meter_number=123456789" \ -d "bill_month_month=04" \ -d "bill_month_year=2026"
PHP Example
$ch = curl_init("https://nurr.top/api/bill-payment.php?action=submit");
curl_setopt_array($ch, [
CURLOPT_POST => true,
CURLOPT_POSTFIELDS => [
"api_key" => "YOUR_API_KEY",
"api_secret" => "YOUR_SECRET_KEY",
"provider_id" => "1",
"service_id" => "5",
"amount" => "500",
"meter_number" => "123456789",
"bill_month" => "2026-04",
"contact_number" => "017XXXXXXXX"
],
CURLOPT_RETURNTRANSFER => true
]);
$response = curl_exec($ch);
curl_close($ch);
$data = json_decode($response, true);
print_r($data);
Success Response
{
"success": true,
"order_number": "NURR-AB12CD34EF56",
"status": "Processing",
"provider": "DESCO",
"service": "DESCO Prepaid",
"module_data": {
"meter_number": "123456789",
"contact_number": "017XXXXXXXX"
},
"bill_month": "2026-04",
"amount": "500.00",
"total_amount": "500.00"
}
Processing আসলে request received হয়েছে।
Final result জানতে Status Check API ব্যবহার করুন।
4. Status Check
Submit API থেকে পাওয়া order_number দিয়ে status check করুন।
Request Parameters
| Parameter | Required | Example |
|---|---|---|
api_key |
Yes | YOUR_API_KEY |
api_secret |
Yes | YOUR_SECRET_KEY |
order_number |
Yes | NURR-AB12CD34EF56 |
cURL Example
curl -X POST "https://nurr.top/api/bill-payment.php?action=status_check" \ -d "api_key=YOUR_API_KEY" \ -d "api_secret=YOUR_SECRET_KEY" \ -d "order_number=NURR-AB12CD34EF56"
PHP Example
$ch = curl_init("https://nurr.top/api/bill-payment.php?action=status_check");
curl_setopt_array($ch, [
CURLOPT_POST => true,
CURLOPT_POSTFIELDS => [
"api_key" => "YOUR_API_KEY",
"api_secret" => "YOUR_SECRET_KEY",
"order_number" => "NURR-AB12CD34EF56"
],
CURLOPT_RETURNTRANSFER => true
]);
$response = curl_exec($ch);
curl_close($ch);
$data = json_decode($response, true);
print_r($data);
Processing Response
{
"success": true,
"order_number": "NURR-AB12CD34EF56",
"status": "Processing",
"provider": "DESCO",
"service": "DESCO Prepaid",
"module_data": {
"meter_number": "123456789"
},
"bill_month": "2026-04",
"amount": "500.00",
"debit_amount": "500.00",
"total_amount": "500.00",
"response": "Bill payment request submitted"
}
Success Response
{
"success": true,
"order_number": "NURR-AB12CD34EF56",
"status": "Success",
"provider": "DESCO",
"service": "DESCO Prepaid",
"module_data": {
"meter_number": "123456789"
},
"bill_month": "2026-04",
"amount": "500.00",
"debit_amount": "500.00",
"total_amount": "500.00",
"token_number": "1234-5678-9012"
}
Cancelled Response
{
"success": true,
"order_number": "NURR-AB12CD34EF56",
"status": "Cancelled",
"provider": "DESCO",
"service": "DESCO Prepaid",
"module_data": {
"meter_number": "123456789"
},
"bill_month": "2026-04",
"amount": "500.00",
"debit_amount": "500.00",
"total_amount": "500.00",
"cancel_note": "Invalid customer information"
}
Error Responses
| HTTP Code | Error | Meaning |
|---|---|---|
| 400 | Invalid action. |
Action missing অথবা ভুল। |
| 401 | Invalid API credentials. |
API Key বা Secret Key ভুল। |
| 404 | Invalid provider ID. |
Provider পাওয়া যায়নি বা inactive। |
| 404 | Invalid service or provider. |
Service/provider match করেনি বা inactive। |
| 404 | Transaction not found. |
Order number পাওয়া যায়নি। |
| 422 | Missing required parameters. |
Required parameter missing। |
| 422 | Missing required module data. |
Service-এর required module field missing। |
| 422 | Missing bill_month. |
Bill month required কিন্তু পাঠানো হয়নি। |
| 422 | Insufficient balance. |
Account balance কম। |
| 500 | Transaction failed |
Request process করা যায়নি। |
Error JSON Example
{
"error": "Missing required parameters."
}
Module Field Error Example
{
"error": "Missing required module data.",
"field": "meter_number"
}