DroploPay Documentation
DroploPay lets you accept bKash, Nagad, Rocket, Upay and bank payments on your website, app or panel — straight into your own personal or merchant accounts. Our Android SMS app reads the payment SMS on your phone and confirms each payment automatically.
How a payment works
- Your server calls Create Charge and gets a
payment_url. - The customer opens that page, picks a method and sends money.
- The SMS app (or you, manually) confirms the transaction.
- The customer returns to your
redirect_urlwith aninvoice_id, and yourwebhook_urlis called. - Your server calls Verify Payment and delivers the order when the status is
COMPLETED.
Quick Start
- Create an account at droplopay.com. You get your own panel, e.g.
yourname.droplo.online. - Add your payment methods in Gateways — your bKash, Nagad, Rocket numbers (Personal, Agent or Merchant) or bank accounts.
- Install the SMS app on the Android phone that receives those payment SMS (see below).
- Create an API key in Developers → API Keys with the abilities
payment:checkoutandpayment:verify. - Connect your site with a plugin, an SDK or the REST API.
- Make a small test payment and check that the order is marked paid.
https://yourname.droplo.online) is what plugins and SDKs ask for. The API lives at the same address plus /api.SMS Verification App
The DroploPay SMS app runs on an Android phone that has the SIMs receiving your bKash / Nagad / Rocket payment messages. When a payment SMS arrives, the app sends it securely to your panel, which matches the transaction ID and amount and completes the payment automatically.
- In your panel open SMS Data → Connect App and tap Download APK. Install it on the Android phone.
- Open the app and Login with QR Code — scan the QR shown in Connect App. Or log in with your panel address (e.g.
yourname.droplo.online), email and password. - Allow SMS permission and turn off battery optimisation for the app so it keeps running in the background.
- Incoming payment SMS now appear in SMS Data, and matching payments complete automatically.
PENDING until the SMS arrives or you change the status manually in Payments.Base URL & Authentication
Base URL
Every panel has its own API. Replace yourname.droplo.online with your panel address (or your own domain if you are self-hosted).
Authentication
Send your API key in the DROPLOPAY-API-KEY header with every request. Keys are created in Developers → API Keys and each key has abilities: payment:checkout, payment:verify, payment:refund.
Content-Type: application/json
Accept: application/json
DROPLOPAY-API-KEY: YOUR_API_KEYCreate Charge
Creates a payment and returns the URL of your hosted payment page. Requires payment:checkout.
Body parameters
| Parameter | Type | Description |
|---|---|---|
full_name required | string | Customer name shown on the payment page. |
email required | string | Customer email. |
amount required | string | Amount in BDT, e.g. "100" or "99.50". |
metadata | object | Any data you want back, e.g. {"order_id":"1001"}. Returned unchanged in Verify Payment and the webhook. |
redirect_url required | string | Where the customer goes after paying. invoice_id is added to it. |
return_type | string | GET (default) adds invoice_id to the URL; POST sends it as a form field. |
cancel_url required | string | Where the customer goes if they cancel. |
webhook_url | string | Your server endpoint that receives payment updates. |
Example
curl -X POST https://yourname.droplo.online/api/checkout-v2 \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "DROPLOPAY-API-KEY: YOUR_API_KEY" \
-d '{
"full_name": "John Doe",
"email": "john@example.com",
"amount": "100",
"metadata": { "order_id": "1001" },
"redirect_url": "https://yoursite.com/payment/success",
"return_type": "GET",
"cancel_url": "https://yoursite.com/payment/cancel",
"webhook_url": "https://yoursite.com/payment/webhook"
}'<?php
$ch = curl_init('https://yourname.droplo.online/api/checkout-v2');
curl_setopt_array($ch, [
CURLOPT_POST => true,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'Content-Type: application/json',
'Accept: application/json',
'DROPLOPAY-API-KEY: YOUR_API_KEY',
],
CURLOPT_POSTFIELDS => json_encode([
'full_name' => 'John Doe',
'email' => 'john@example.com',
'amount' => '100',
'metadata' => ['order_id' => '1001'],
'redirect_url' => 'https://yoursite.com/payment/success',
'cancel_url' => 'https://yoursite.com/payment/cancel',
'webhook_url' => 'https://yoursite.com/payment/webhook',
]),
]);
$res = json_decode((string) curl_exec($ch), true);
curl_close($ch);
if (!empty($res['status']) && !empty($res['payment_url'])) {
header('Location: ' . $res['payment_url']);
exit;
}
echo 'Payment could not be started: ' . ($res['message'] ?? 'Unknown error');{
"status": true,
"message": "Payment URL created",
"payment_url": "https://yourname.droplo.online/payment/7Hk2Qx9LmA"
}Verify Payment
Returns the current state of a payment. Requires payment:verify. Always call this before delivering an order — never trust the redirect URL alone.
Body parameters
| Parameter | Type | Description |
|---|---|---|
invoice_id required | string | The invoice_id you received on your redirect_url or webhook. |
Response fields
| Field | Type | Description |
|---|---|---|
status | string | COMPLETED, PENDING or ERROR. |
invoice_id | string | Payment ID. |
amount | string | Invoice amount in BDT. |
fee | string | Gateway charge added for the chosen method (if any). |
charged_amount | string | Total the customer paid. |
payment_method | string | e.g. bkash, nagad, rocket. |
sender_number | string | Number or account the customer paid from (if known). |
transaction_id | string | Provider transaction ID (TrxID). |
metadata | object | The metadata you sent in Create Charge. |
full_name, email | string | Customer details. |
date | string | Payment time, Y-m-d H:i:s. |
Example
curl -X POST https://yourname.droplo.online/api/verify-payment \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "DROPLOPAY-API-KEY: YOUR_API_KEY" \
-d '{ "invoice_id": "7Hk2Qx9LmA" }'<?php
$invoiceId = $_GET['invoice_id'] ?? '';
$ch = curl_init('https://yourname.droplo.online/api/verify-payment');
curl_setopt_array($ch, [
CURLOPT_POST => true,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ['Content-Type: application/json', 'Accept: application/json', 'DROPLOPAY-API-KEY: YOUR_API_KEY'],
CURLOPT_POSTFIELDS => json_encode(['invoice_id' => $invoiceId]),
]);
$p = json_decode((string) curl_exec($ch), true);
curl_close($ch);
if (($p['status'] ?? '') === 'COMPLETED') {
// Check the amount, then mark order $p['metadata']['order_id'] as paid (only once)
} elseif (($p['status'] ?? '') === 'PENDING') {
// Waiting for confirmation
} else {
// Not paid
}{
"full_name": "John Doe",
"email": "john@example.com",
"amount": "100.00",
"fee": "0.00",
"charged_amount": "100.00",
"invoice_id": "7Hk2Qx9LmA",
"metadata": { "order_id": "1001" },
"payment_method": "bkash",
"sender_number": "01712345678",
"transaction_id": "BKA1B2C3D4",
"date": "2026-11-26 13:30:00",
"status": "COMPLETED"
}Refund Payment
Marks a completed payment as refunded in your panel. Requires payment:refund. This endpoint records the refund — send the money back to the customer yourself through your bKash / Nagad / bank app.
Body parameters
| Parameter | Type | Description |
|---|---|---|
invoice_id required | string | The payment to refund. |
reason | string | Short note saved with the refund. |
curl -X POST https://yourname.droplo.online/api/refund-payment \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "DROPLOPAY-API-KEY: YOUR_API_KEY" \
-d '{ "invoice_id": "7Hk2Qx9LmA", "reason": "Customer request" }'{
"status": true,
"message": "Payment marked as refunded. Please send the money back to the customer manually.",
"invoice_id": "7Hk2Qx9LmA"
}Webhooks
When a payment's status changes, DroploPay sends a POST request with a JSON body to the webhook_url you gave in Create Charge. The body has the same fields as the Verify Payment response.
Anyone can call a URL, so never trust the webhook body alone. Read the invoice_id, confirm it with Verify Payment, then reply with HTTP 200.
<?php
$data = json_decode(file_get_contents('php://input'), true);
$invoiceId = $data['invoice_id'] ?? '';
if ($invoiceId === '') { http_response_code(400); exit('Bad request'); }
// Confirm with the API instead of trusting the body
$ch = curl_init('https://yourname.droplo.online/api/verify-payment');
curl_setopt_array($ch, [
CURLOPT_POST => true,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ['Content-Type: application/json', 'Accept: application/json', 'DROPLOPAY-API-KEY: YOUR_API_KEY'],
CURLOPT_POSTFIELDS => json_encode(['invoice_id' => $invoiceId]),
]);
$payment = json_decode((string) curl_exec($ch), true);
curl_close($ch);
if (($payment['status'] ?? '') === 'COMPLETED') {
// Mark order $payment['metadata']['order_id'] as paid (ignore repeats)
}
http_response_code(200);
echo 'OK';Errors & Statuses
On failure the API returns an HTTP error code and a JSON body:
{ "status": false, "message": "Invalid API key" }| HTTP code | Type | Description |
|---|---|---|
401 | Unauthorized | API key missing, invalid, inactive or expired. |
403 | Forbidden | The key does not have the ability needed for this endpoint. |
422 | Validation | A parameter is missing or invalid — message says which. |
429 | Too many requests | Slow down and retry after a few seconds. |
Payment statuses
| Status | Type | Description |
|---|---|---|
COMPLETED | final | Money received and confirmed. Deliver the order. |
PENDING | waiting | Customer submitted a transaction; waiting for SMS match or admin approval. |
ERROR | final | Not paid, rejected or invalid. Do not deliver. |
WooCommerce
Works with both the classic and the block checkout, and with HPOS.
- In WordPress go to Plugins → Add New → Upload Plugin and upload the plugin zip from GitHub, then activate it.
- Open WooCommerce → Settings → Payments → DroploPay.
- Enter your Panel URL (e.g.
https://yourname.droplo.online) and API Key. - If your store currency is not BDT, set the Exchange rate to BDT (e.g. 1 USD = 120 →
120). - Choose the order status after payment, save, and place a test order.
WHMCS
- Download the module from GitHub and upload the
modulesfolder into your WHMCS root, so you getmodules/gateways/droplopay.phpandmodules/gateways/callback/droplopay.php. - Go to System Settings → Payment Gateways and activate Droplo Pay.
- Fill in Panel URL (without
/api), API Key and, for non-BDT currencies, the exchange rate. - Pay a test invoice. The invoice is marked paid automatically after verification.
SMM Panel (Add Funds)
A drop-in add-funds module for PHP-based SMM panels. It credits the user's balance after a verified payment and never credits the same payment twice.
- Download from GitHub and upload the
droplopayfolder to your panel's public folder. - Edit
droplopay/config.php: panel URL, API key, your panel's database details, the users table / balance column, and how to read the logged-in user from the session. - Set currency, rate, min / max amount and an optional bonus.
- Link users to
https://yourpanel.com/droplopay/pay.phpfrom your Add Funds page.
'base_url' => 'https://yourname.droplo.online',
'api_key' => 'YOUR_API_KEY',
'module_url' => 'https://yourpanel.com/droplopay',
'users_table' => 'clients',
'user_id_column' => 'client_id',
'balance_column' => 'balance',PHP SDK
composer require droplopay/droplopay-php<?php
require 'vendor/autoload.php';
use DroploPay\DroploPay;
$dp = new DroploPay('https://yourname.droplo.online', 'YOUR_API_KEY');
// 1) Start a payment
$charge = $dp->createCharge([
'full_name' => 'John Doe',
'email' => 'john@example.com',
'amount' => '100',
'metadata' => ['order_id' => '1001'],
'redirect_url' => 'https://yoursite.com/success.php',
'cancel_url' => 'https://yoursite.com/cancel.php',
'webhook_url' => 'https://yoursite.com/webhook.php',
]);
header('Location: ' . $charge['payment_url']);
// 2) On success.php / webhook.php
$invoiceId = DroploPay::invoiceIdFromRequest();
if ($invoiceId && $dp->isPaid($invoiceId)) {
$payment = $dp->verifyPayment($invoiceId);
// mark $payment['metadata']['order_id'] as paid
}Errors throw DroploPay\DroploPayException; use getResponse() to see the API's reply.
Laravel
The service provider and DroploPay facade are registered automatically.
composer require droplopay/droplopay-laravel
php artisan vendor:publish --tag=droplopay-configDROPLOPAY_BASE_URL=https://yourname.droplo.online
DROPLOPAY_API_KEY=YOUR_API_KEYuse DroploPay\Laravel\Facades\DroploPay;
$charge = DroploPay::createCharge([
'full_name' => $user->name,
'email' => $user->email,
'amount' => (string) $order->total,
'metadata' => ['order_id' => $order->id],
'redirect_url' => route('payment.success'),
'cancel_url' => route('payment.cancel'),
'webhook_url' => route('payment.webhook'),
]);
return redirect()->away($charge['payment_url']);
// In payment.success / payment.webhook
if (DroploPay::isPaid($request->input('invoice_id'))) {
// mark order as paid
}Exclude your webhook route from CSRF protection.
Node.js
npm install github:droplopay/droplopay-nodeconst DroploPay = require('droplopay');
const dp = new DroploPay({
baseUrl: 'https://yourname.droplo.online',
apiKey: process.env.DROPLOPAY_API_KEY,
});
// Start a payment (Express)
app.post('/pay', async (req, res) => {
const charge = await dp.createCharge({
full_name: 'John Doe',
email: 'john@example.com',
amount: '100',
metadata: { order_id: '1001' },
redirect_url: 'https://yoursite.com/success',
cancel_url: 'https://yoursite.com/cancel',
webhook_url: 'https://yoursite.com/webhook',
});
res.redirect(charge.payment_url);
});
// Return page
app.get('/success', async (req, res) => {
const paid = await dp.isPaid(req.query.invoice_id);
res.send(paid ? 'Payment received' : 'Payment not completed');
});TypeScript types are included. Errors throw DroploPayError with status and response.
Install on Your Server
With a self-hosted license you run DroploPay on your own domain. The API, plugins and SDKs work the same — just use your own domain as the panel URL.
Requirements
- PHP 8.1 or newer with
pdo_mysql,curl,mbstringandfileinfo - MySQL or MariaDB database
- A domain or subdomain with SSL (HTTPS)
Installation
- Create a database and user in cPanel (MySQL Databases).
- Upload the package zip to your domain's folder and extract it.
- Open
https://yourdomain.com/installand follow the installer: server check → database details → license key → admin account. - Log in, add your payment methods in Gateways, connect the SMS app and create an API key.
License
Your license key looks like DPL-XXXX-XXXX-XXXX-XXXX and is shown in droplopay.com → My Licenses. Each plan allows a set number of domains (1, 3, 5 or 8). You can see the status, domains and available updates in your panel under License.
Security Checklist
- Keep API keys on your server only; give each key only the abilities it needs.
- Always call Verify Payment before delivering — never trust the redirect URL or webhook body alone.
- Check that the verified
amountandmetadata.order_idmatch your order. - Mark an order paid only once; ignore repeated
invoice_ids. - Use HTTPS for your
redirect_urlandwebhook_url. - Delete or disable keys you no longer use.
FAQ
Do I need a bKash / Nagad merchant account?
No. Personal, Agent and Merchant numbers are all supported — customers send money and the SMS app confirms it.
Does DroploPay hold my money?
No. Customers pay straight into your own accounts. DroploPay only verifies the payments.
A payment is stuck in PENDING. What now?
Check that the SMS app is online and the SMS is listed in SMS Data. You can also check your account and change the payment's status manually in Payments.
Can I charge in USD or another currency?
Payments are in BDT. The plugins have an exchange-rate setting that converts your store currency to BDT.
Support
Need help with an integration? Contact us:
- Email: support@droplopay.com
- Discord: discord.gg/kB5eECvszk
- Facebook: facebook.com/droplopay
- YouTube: youtube.com/@drolopay
- GitHub: github.com/droplopay