RESTful API v2.0 ยท 03 Dec 2026
API Documentation & Integration
Official integration guide for NeoPay Payment Initiation, Payouts, and Webhook Callback systems.
API Request Environment
Log in to your merchant account to automatically populate your live keys
App ID: YOUR_APP_ID
Secret: YOUR_SECRET_KEY
POST / GET
1. Deposit / Order Create API
Create an instant payment checkout request and automatically redirect user to the payment page.
Request Parameters
| Field | Type | Required | Description & Valid Values |
|---|---|---|---|
| appId | String | REQUIRED | Your Merchant App ID registered in NeoPay. |
| appOrderNo | String | REQUIRED | Unique invoice/transaction identifier from your platform (e.g. INV2026103001). |
| orderAmt | Decimal | REQUIRED | Order amount in BDT (greater than 0.00, e.g. 100.00). |
| payId | String | RECOMMENDED | 8000 for bKash, 8001 for Nagad. |
| payName | String | RECOMMENDED | Method identifier: BKASH or NAGAD. |
| notifyURL | String | OPTIONAL | Your server endpoint URL to receive automated JSON webhook callback. |
| jumpURL | String | OPTIONAL | User redirect URL after successful payment completion. |
| extParams | String / JSON | OPTIONAL | Custom data or user metadata passed along with the transaction. |
Method Channel Identifiers
bKash Payment
payId: 8000
payName: BKASH
Nagad Payment
payId: 8001
payName: NAGAD
cURL Request Example
curl -X POST "https://api.neo-pay.top/payorder.php" \
-d "appId=YOUR_APP_ID" \
-d "appOrderNo=TXN20261203100257" \
-d "orderAmt=150.00" \
-d "payId=8000" \
-d "payName=BKASH" \
-d "notifyURL=https://yourdomain.com/callback.php" \
-d "jumpURL=https://yourdomain.com/success.php" \
-d "extParams=user_id_1020"
PHP Checkout Redirection Implementation
<?php
// User Payment Checkout Request
$paymentPayload = [
'appId' => 'YOUR_APP_ID',
'appOrderNo' => 'TXN' . time() . rand(100, 999),
'orderAmt' => 150.00,
'payId' => '8000', // 8000 = bKash, 8001 = Nagad
'payName' => 'BKASH',
'notifyURL' => 'https://yourwebsite.com/api/callback.php',
'jumpURL' => 'https://yourwebsite.com/payment-success.php',
'extParams' => 'customer_cart_9981'
];
// Direct Browser Redirect to Payment Gateway
$gatewayUrl = "https://api.neo-pay.top/payorder.php?" . http_build_query($paymentPayload);
header("Location: " . $gatewayUrl);
exit();
?>
POST (RAW JSON)
2. Asynchronous Webhook (IPN Callback)
Sent instantly from server to your configured notifyURL when the transaction succeeds.
Payload Received by Merchant
{
"uid": "8000",
"amount": "150.00",
"order_no": "TXN20261030120532"
}
- โข uid: Gateway channel ID (
8000= bKash,8001= Nagad). - โข amount: Confirmed deposited amount in BDT.
- โข order_no: The unique order number created in the system.
Sample Merchant Callback Listener (PHP)
<?php
// callback.php - Receiver script on merchant site
$rawPost = file_get_contents('php://input');
$data = json_decode($rawPost, true);
if ($data && !empty($data['order_no']) && !empty($data['amount'])) {
$orderNo = $data['order_no'];
$amount = floatval($data['amount']);
$uid = $data['uid']; // 8000 or 8001
// 1. Verify order in merchant database
// 2. Credit user wallet or fulfill order
http_response_code(200);
echo json_encode(["status" => "success"]);
exit();
}
http_response_code(400);
echo json_encode(["status" => "invalid_data"]);
?>
POST
3. Balance Check API
Query your merchant wallet to retrieve live available balance.
curl -X POST https://api.neo-pay.top/api/checkbalance.php \
-d "merchant_id=YOUR_APP_ID" \
-d "secret_key=YOUR_SECRET_KEY"
POST
4. Payout / Disbursement API
Automate outbound payouts directly to bKash or Nagad accounts.
curl -X POST https://api.neo-pay.top/api/withdraw.php \
-d "name=Beneficiary Name" \
-d "number=017XXXXXXXX" \
-d "amount=1000.00" \
-d "type=bkash" \
-d "app_id=YOUR_APP_ID" \
-d "secret_key=YOUR_SECRET_KEY"
ยฉ 2026 NeoPay Gateway ยท Secured by 256-bit encryption