How to get Webhook Data?
Create a file on your project and follow the example code below.
PHP Code Example
<?php
$apiKey = '982d381360a69d419689740d9f2e26ce36fb7a50'; // Your API KEY
$headerApi = isset($_SERVER['HTTP_RT_UDDOKTAPAY_API_KEY']) ? $_SERVER['HTTP_RT_UDDOKTAPAY_API_KEY'] : null; // Sent From UddoktaPay
$getBody = file_get_contents('php://input'); // Sent From UddoktaPay
if ($headerApi == null) {
die("Api key not found");
}
if ($headerApi != $apiKey) {
die("Unauthorized Action");
}
echo $getBody;
Sample Payloads
{
"full_name": "John Doe",
"email": "[email protected]",
"amount": "100.00",
"fee": "0.00",
"charged_amount": "100.00",
"invoice_id": "Erm9wzjM0FBwjSYT0QVb",
"metadata": {
"user_id": "10",
"order_id": "50"
},
"payment_method": "bkash",
"sender_number": "01311111111",
"transaction_id": "TESTTRANS1",
"date": "2023-01-07 14:00:50",
"status": "COMPLETED"
}