OpenAPI Platform

OpenAPI Integration SpecificationJSON / UTF-8

Standard host-to-host (H2H) API for automated BDT collections and payouts.

Base URL: https://api.lv-pay.cfd
AUTH

Authentication & Signature Standard

ASCII sort + uppercase MD5

Every request needs your merchant credentials and a signature (sign). Exclude sign, sign_type and empty fields, sort the remaining parameters alphabetically by key (A-Z), join them as key1=val1&key2=val2, append &key=YOUR_SECRET_KEY, and take the uppercase MD5 hash.

Signature formulasign = strtoupper( md5( "amount=1000.00&merOrderNo=DEP_01&mer_no=LVPAY_XXXXXXXXXXXX&payMethod=bkash&timestamp=1793450000&key=" + secret_key ) )
ParameterFormatRequirementExampleDescription
mer_no / appIdString(32)REQUIREDLVPAY_XXXXXXXXXXXXYour App ID (merchant identifier)
secret_keyString(28)REQUIREDk3j9...Secret key for signing. Keep it on your server only.
timestampString(10)REQUIRED1793450000Current Unix time. Must be within 15 minutes of server time.
signString(32)REQUIRED5D41402A...Uppercase MD5 signature
Send requests as POST with a JSON body. Every response uses the same JSON envelope.
API 01

Live Balance Query API

Real-time ledger

Returns the live available BDT balance of your merchant account.

POSThttps://api.lv-pay.cfd/open/api/merchant/balance
ParameterFormatRequirementDescription
mer_noStringREQUIREDYour App ID (merchant identifier)
timestamp / signStringREQUIREDSee Authentication

Request payload

JSON
{
  "mer_no": "LVPAY_XXXXXXXXXXXX",
  "timestamp": "1793450000",
  "sign": "UPPERCASE_MD5_SIGNATURE"
}

Response JSON

JSON
{
  "code": 200,
  "success": true,
  "status": "SUCCESS",
  "message": "Merchant balance retrieved successfully.",
  "data": {
    "mer_no": "LVPAY_XXXXXXXXXXXX",
    "merchant_id": "MID123456",
    "allowed_currencies": "BDT",
    "bdt_balance": "5000.00",
    "inr_balance": "0.00",
    "usdt_balance": "0.00",
    "wallets": {
      "BDT": { "currency": "BDT", "balance": "5000.00", "supported_methods": ["bkash", "nagad"] }
    }
  },
  "timestamp": 1793450000,
  "datetime": "2026-12-03 12:00:00"
}
API 02

Inbound Deposit Order API (Pay-In)

Cashier checkout and IPN

Creates a deposit session for bKash or Nagad. Send the customer to the returned payment page.

POSThttps://api.lv-pay.cfd/open/api/order/in
ParameterFormatRequirementDescription
mer_noStringREQUIREDYour App ID (merchant identifier)
merOrderNoString(100)REQUIREDUnique invoice ID from your system. Duplicates are rejected.
amountDecimalREQUIREDAmount in BDT (for example 1000.00), within the platform limits.
payMethodStringREQUIREDbkash or nagad
notifyUrlURLREQUIREDPublic https address that receives the payment result (webhook)
returnUrlURLREQUIREDPage the customer returns to after checkout
response_typeStringOPTIONALSet to json to receive payment_url in the response instead of a redirect
timestamp / signStringREQUIREDSee Authentication

Request payload

JSON
{
  "mer_no": "LVPAY_XXXXXXXXXXXX",
  "merOrderNo": "DEP_20261203_8842",
  "amount": "1000.00",
  "payMethod": "bkash",
  "notifyUrl": "https://merchant-site.com/webhook/notify.php",
  "returnUrl": "https://merchant-site.com/payment-success",
  "response_type": "json",
  "timestamp": "1793450000",
  "sign": "UPPERCASE_MD5_SIGNATURE"
}

JSON response preview

JSON
{
  "code": 200,
  "success": true,
  "status": "SUCCESS",
  "message": "Payment session created successfully.",
  "data": {
    "order_no": "DEP_1793450000",
    "sys_no": "SP202612031200001234",
    "cashier_order_id": "DEP_20261203120000_1234",
    "currency": "BDT",
    "method": "bkash",
    "amount": "1000.00",
    "expire_at": "2026-12-03 12:15:00",
    "payment_url": "https://cashier.lv-pay.cfd/payment/?order_id=DEP_20261203120000_1234"
  },
  "timestamp": 1793450000,
  "datetime": "2026-12-03 12:00:00"
}

PHP integration sample

PHP
<?php
$apiUrl    = "https://api.lv-pay.cfd/open/api/order/in";
$appId     = "LVPAY_XXXXXXXXXXXX";          // Your App ID (mer_no)
$secretKey = "YOUR_SECRET_KEY";             // Keep this on the server only

$payload = [
    'mer_no'        => $appId,
    'merOrderNo'    => 'DEP_' . time(),     // unique per merchant
    'amount'        => '1000.00',
    'payMethod'     => 'bkash',             // bkash | nagad
    'notifyUrl'     => 'https://merchant-site.com/webhook/notify.php',
    'returnUrl'     => 'https://merchant-site.com/payment-success',
    'response_type' => 'json',
    'timestamp'     => (string)time(),
];

// Sign: sort by key, skip empty values, append &key=SECRET, MD5 uppercase
$d = $payload; ksort($d); $pairs = [];
foreach ($d as $k => $v) if ($v !== '' && $v !== null) $pairs[] = $k . '=' . trim((string)$v);
$payload['sign'] = strtoupper(md5(implode('&', $pairs) . '&key=' . $secretKey));

$ch = curl_init($apiUrl);
curl_setopt_array($ch, [
    CURLOPT_POST => true, CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER => ['Content-Type: application/json'],
    CURLOPT_POSTFIELDS => json_encode($payload),
]);
$res = json_decode(curl_exec($ch), true);
curl_close($ch);

if (!empty($res['success'])) { header('Location: ' . $res['data']['payment_url']); exit; }
echo $res['message'] ?? 'Error';
API 03

Deposit Status Query API

Order verification

Checks the current status of a deposit order.

POSThttps://api.lv-pay.cfd/open/api/query/in

Request payload

JSON
{
  "mer_no": "LVPAY_XXXXXXXXXXXX",
  "order_no": "DEP_20261203_8842",
  "timestamp": "1793451200",
  "sign": "UPPERCASE_MD5_SIGNATURE"
}

Response JSON

JSON
{
  "code": 200,
  "success": true,
  "status": "SUCCESS",
  "message": "Deposit order status retrieved successfully.",
  "data": {
    "mer_no": "LVPAY_XXXXXXXXXXXX",
    "merchant_id": "MID123456",
    "order_no": "DEP_20261203_8842",
    "sys_no": "SP202612031200001234",
    "method": "bkash",
    "amount": "1000.00",
    "fee": "25.00",
    "net_amount": "975.00",
    "trade_state": "SUCCESS",
    "status": "paid",
    "created_at": "2026-12-03 12:00:00"
  },
  "timestamp": 1793450000,
  "datetime": "2026-12-03 12:01:00"
}

Status values

trade_stateStatusMeaning
SUCCESSpaidPayment confirmed and credited
PENDINGpendingWaiting for the customer or payment verification
FAILEDfailedPayment could not be verified
EXPIREDexpiredPayment window ended without payment
API 04

Outbound Payout API (Disbursement)

Auto settlement

Pays out to a bKash or Nagad wallet. The request is accepted as PROCESSING and paid after review.

POSThttps://api.lv-pay.cfd/open/api/order/out
ParameterFormatRequirementDescription
mer_noStringREQUIREDYour App ID (merchant identifier)
order_noString(100)REQUIREDUnique payout reference from your system. Duplicates are rejected.
amountDecimalREQUIREDAmount in BDT within the allowed range. Fees are deducted from your balance.
methodStringREQUIREDbkash or nagad
accountString(11)REQUIRED11-digit wallet number starting with 01
nameStringREQUIREDAccount holder name
timestamp / signStringREQUIREDSee Authentication

Request payload

JSON
{
  "mer_no": "LVPAY_XXXXXXXXXXXX",
  "order_no": "PAYOUT_20261203_001",
  "amount": "500.00",
  "method": "nagad",
  "name": "Rahim Uddin",
  "account": "01712345678",
  "timestamp": "1793451500",
  "sign": "UPPERCASE_MD5_SIGNATURE"
}

JSON response preview

JSON
{
  "code": 200,
  "success": true,
  "status": "SUCCESS",
  "message": "Outbound disbursement order accepted.",
  "data": {
    "mer_no": "LVPAY_XXXXXXXXXXXX",
    "order_no": "PAYOUT_20261203_001",
    "sys_no": "WD_20261203120000_1234",
    "currency": "BDT",
    "method": "nagad",
    "amount": "500.00",
    "fee": "10.00",
    "net_amount": "490.00",
    "total_deducted": "500.00",
    "target_account": "01712345678",
    "status": "PROCESSING"
  },
  "timestamp": 1793450000,
  "datetime": "2026-12-03 12:00:00"
}
API 05

Payout Status Query API

Payout audit

Checks the live status of a payout using your reference or the platform reference.

POSThttps://api.lv-pay.cfd/open/api/query/out

Request payload

JSON
{
  "mer_no": "LVPAY_XXXXXXXXXXXX",
  "order_no": "PAYOUT_20261203_001",
  "timestamp": "1793451900",
  "sign": "UPPERCASE_MD5_SIGNATURE"
}

Response JSON

JSON
{
  "code": 200,
  "success": true,
  "status": "SUCCESS",
  "message": "Withdrawal order details retrieved successfully.",
  "data": {
    "mer_no": "LVPAY_XXXXXXXXXXXX",
    "merchant_id": "MID123456",
    "order_no": "PAYOUT_20261203_001",
    "sys_no": "WD_20261203120000_1234",
    "currency": "BDT",
    "method": "nagad",
    "target_account": "01712345678",
    "account_name": "Rahim Uddin",
    "amount": "500.00",
    "fee": "10.00",
    "net_amount": "490.00",
    "total_deducted": "500.00",
    "trade_state": "SUCCESS",
    "status": "Success",
    "created_at": "2026-12-03 12:00:00"
  },
  "timestamp": 1793450000,
  "datetime": "2026-12-03 12:05:00"
}

Status values

trade_stateMeaning
PROCESSINGRequest received, waiting for review
SUCCESSPayout completed
FAILEDRejected. The amount is returned to your balance.
WEBHOOK 06

Asynchronous Webhook (IPN) Callback Setup

POST application/json

When a deposit is paid, LV PAY sends an HTTP POST with a JSON body to your notifyUrl. Verify the sign before crediting anything, then reply success with HTTP 200.

Verification steps: 1. Read the raw JSON body. 2. Verify sign and check that orderStatus is Success. 3. Credit the user once and reply success.
FieldFormatDescription
merOrderNoStringYour invoice ID passed when the order was created
amountDecimalSettled gross amount in BDT
platformOrderStringLV PAY platform order reference
orderStatus / statusStringAlways Success when payment is completed
payMethod / currencyStringBKASH or NAGAD, and currency BDT
fee / net_amountDecimalFee charged and the amount credited to you
trx_idStringbKash or Nagad transaction ID
api_key / timestamp / signStringYour App ID, Unix time and the signature

Response JSON

JSON
{
  "merOrderNo": "DEP_20261203_8842",
  "amount": 1000,
  "platformOrder": "SP202612031200001234",
  "orderStatus": "Success",
  "status": "Success",
  "payMethod": "BKASH",
  "currency": "BDT",
  "fee": 25,
  "net_amount": 975,
  "trx_id": "8N7K3J2L1M",
  "api_key": "LVPAY_XXXXXXXXXXXX",
  "timestamp": "1793451300",
  "sign": "UPPERCASE_MD5_SIGNATURE"
}

PHP integration sample

PHP
<?php
// notify.php - receives the payment result from LV PAY
$secretKey = 'YOUR_SECRET_KEY';

$data = json_decode(file_get_contents('php://input'), true) ?: $_POST;
$sign = (string)($data['sign'] ?? '');
unset($data['sign'], $data['sign_type'], $data['secret_key']);

ksort($data); $pairs = [];
foreach ($data as $k => $v) if ($v !== '' && $v !== null && !is_array($v)) $pairs[] = $k . '=' . trim((string)$v);
$calc = strtoupper(md5(implode('&', $pairs) . '&key=' . $secretKey));

if (!hash_equals($calc, strtoupper($sign))) { http_response_code(401); exit('fail'); }

// 1. Find your order by $data['merOrderNo']
// 2. Check $data['amount'] matches your order
// 3. Mark the order as paid only once (ignore repeats)

echo 'success';
If your endpoint does not reply with success (or ok) and HTTP 200, LV PAY retries up to 8 times with increasing delays.
REFERENCE

Responses & Errors

Every response has the same structure: code, success, status, message, data (on success), timestamp and datetime.

HTTPMeaning
200Success
400Invalid or missing parameter (see message)
401Wrong signature, or the timestamp is outside the 15-minute window
403Merchant account is blocked
404Order not found
405Wrong HTTP method (use POST)
429Too many failed requests. Wait and try again.
500Server error. Try again later.

Error example

JSON
{
  "code": 401,
  "success": false,
  "status": "FAILED",
  "message": "Invalid merchant or signature.",
  "timestamp": 1793450000,
  "datetime": "2026-12-03 12:00:00"
}