Connect your Personal/Merchant bKash, Nagad & Rocket accounts using our Android Collector App and verify website deposits automatically in under 2 seconds.
Loading your API Key...
Follow these 4 simple steps to enable automated bKash, Nagad & Rocket payments on your website.
When a customer clicks Deposit on your website, send a POST request to Hasqen API:
<?php
$siteId = "YOUR_SITE_ID";
$apiKey = "hq_live_xxxxxx";
$data = [
"siteId" => $siteId,
"amount" => 500,
"provider" => "bKash",
"customerSender" => "01812345678",
"orderId" => "ORDER_9921"
];
$ch = curl_init("https://hasqen.haskinpayment.workers.dev/v1/deposit/create");
curl_setopt($ch, CURLOPT_HTTPHEADER, [
"Content-Type: application/json",
"Authorization: Bearer " . $apiKey
]);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($data));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
curl_close($ch);
$result = json_decode($response, true);
?>
Create webhook.php on your server to receive instant approval notifications:
<?php
$rawInput = file_get_contents('php://input');
$event = json_decode($rawInput, true);
if ($event && $event['status'] === 'APPROVED') {
$orderId = $event['orderId'];
$amount = $event['amount'];
$trxId = $event['trxId'];
// Credit Customer Account Balance in your Database!
echo json_encode(["success" => true]);
}
?>