Create deposit requests, send withdrawals and receive signed webhooks. All amounts are in BDT. Requests and responses are JSON.
Send your API key in the X-API-KEY header on every request. Find it under API & webhooks after you sign in. Call the API from your server only.
Base URL: https://makebdpay.xyz/portal/api/v1 X-API-KEY: your_api_key Content-Type: application/json
POST /deposits. Redirect your customer to pay_url. They send the money and enter the TrxID there.
{
"merchant_order_id": "INV-20481", // your unique order id, 1-80 chars
"amount": 2000, // BDT, 2 decimals max
"provider": "bkash", // optional: bkash | nagad | rocket | upay
"customer_id": "user_77", // optional: your user reference
"return_url": "https://yoursite.com/wallet" // optional
}
Response (201):
{
"ok": true,
"data": {
"id": "dp_3f9a...", "merchant_order_id": "INV-20481",
"amount": 2000, "fee": 50, "net": 1950, "currency": "BDT",
"provider": "bkash", "status": "pending", "trx_id": null,
"expires_at": "2026-11-24T09:15:00+00:00", "paid_at": null,
"pay_url": "https://makebdpay.xyz/portal/pay/dp_3f9a..."
}
}
Sending the same merchant_order_id and amount again while the order is open returns the same order. Statuses: pending, awaiting (TrxID entered, confirming), paid, review (needs manual check), expired, failed.
GET /deposits/{id}, where id is our id or your merchant_order_id.
POST /withdrawals. The amount plus fee is held from your balance. An agent pays the customer and the withdrawal becomes paid.
{
"merchant_order_id": "WD-5521",
"amount": 1500,
"provider": "nagad",
"number": "01XXXXXXXXX",
"customer_id": "user_77" // optional
}
Statuses: pending, processing, paid, rejected, cancelled. GET /withdrawals/{id} returns the current state.
GET /balance returns available and held.
Set your webhook URL under API & webhooks. We POST JSON when something changes and retry failed deliveries for up to a day. Reply with any 2xx status to confirm. Events: deposit.paid, deposit.expired, deposit.failed, withdrawal.paid, withdrawal.rejected, ping.
{
"event": "deposit.paid",
"data": { "id": "dp_3f9a...", "merchant_order_id": "INV-20481", "amount": 2000, "fee": 50, "net": 1950, "status": "paid", "trx_id": "9G7K3L2M1P", ... },
"created_at": "2026-11-24T09:02:11+00:00"
}
Each request carries X-MBP-Timestamp and X-MBP-Signature. The signature is sha256= followed by the hex HMAC-SHA256 of timestamp + "." + raw request body, using your webhook secret. Check the signature and reject timestamps older than 5 minutes. The same event can arrive more than once, so credit each order only once.
// PHP
$body = file_get_contents('php://input');
$ts = $_SERVER['HTTP_X_MBP_TIMESTAMP'];
$sig = $_SERVER['HTTP_X_MBP_SIGNATURE'];
$calc = 'sha256=' . hash_hmac('sha256', $ts . '.' . $body, $WEBHOOK_SECRET);
if (!hash_equals($calc, $sig) || abs(time() - (int)$ts) > 300) { http_response_code(401); exit; }
// Node.js
const calc = 'sha256=' + crypto.createHmac('sha256', SECRET).update(ts + '.' + rawBody).digest('hex');
if (!crypto.timingSafeEqual(Buffer.from(calc), Buffer.from(sig))) return res.sendStatus(401);
# Python
calc = 'sha256=' + hmac.new(SECRET.encode(), (ts + '.').encode() + raw_body, hashlib.sha256).hexdigest()
if not hmac.compare_digest(calc, sig): abort(401)
Failures return {"ok": false, "error": "CODE", "message": "..."} with an HTTP status: 400 invalid input, 401 bad key, 402 balance too low, 403 IP not allowed, 404 not found, 409 duplicate order id, 429 too many requests, 503 no payment number available right now.