Get response using webhook
Note
Ensure that you include the webhook URL in the 'webhook_url' parameter when making a request to the New Withdrawal API.
Example Webhook Listner
<?php
$secretKey = 'YOUR SECRET KEY';
$headerKey = $_SERVER['HTTP_VP_MERCHANT_SECRET'] ?? null;
if(!empty($headerKey) && ($headerKey === $secretKey)) {
$data = file_get_contents("php://input");
$data = json_decode($data, true);
//do whataver you want with the data
} ?>
Simple Response
{
"merchant": "XYZ Limited",
"method": "bkash",
"wallet": "018******",
"withdrawalID": "WD-6693",
"amount": 500,
"charge": 10,
"metaData": null,
"comment": "Withdrawal Done. TRXID: 0544SADSS7",
"requestedAt": "2024-02-02 12:57:20",
"processedAt": "2024-02-02 12:57:20",
"webhook_url": null,
"status": "success"
}