This is useful so your server can receive notifications of successful payments made by users through the "Receive Payment" endpoint. If you enter the "webhook_url" parameter in the "Receive Payment" endpoint, as soon as the user successfully pay the bill, the URL you entered in the "webhook_url" parameter will be immediately called by our server, returning with the payload.
| Name | Info |
|---|---|
| txid | A unique string to identify the transaction. |
| merchant_key | Your merchant API key, useful for improving webhook security. |
| merchant_name | Your username, useful for improving webhook security. |
| item_desc | Description of the item being sold. |
| amount_1 | Amount with float number based on main crypto, 8 decimal. (e.g, 0.00150000). |
| crypto_1 | The main crypto in your payment form. (e.g, BTC, ETH, USDT). |
| amount_2 | Amount with float number based on pay crypto, 8 decimal. (e.g, 0.00150000). |
| crypto_2 | the pay crypto, users pay bill using this crypto. |
| custom_id | The unique identifier you entered into the "Receive Payment" endpoint. |
| time_pay | DateTime when user completed the payment. |
| time_zone | Time zone based on time_pay. |
Payload Response{ "txid" : "RPMEM-1234ABCD", "merchant_key" : "MRCEM-MERCHANT-VALID-API-KEY", "merchant_name" : "user123", "item_desc" : "Bill #15", "amount_1" : 815.00000000, "crypto_1" : "USDT", "amount_2" : 0.00721974, "crypto_2" : "BTC", "custom_id" : 15, "time_pay" : "2025-08-15 15:08:00", "time_zone" : "UTC+5.5" }
Example Script<?php $my_merchant_api = 'YOUR_MERCHANT_API_KEY'; $my_merchant_name = 'YOUR_USERNAME'; $my_main_crypto = 'USDT'; // GET PAYLOAD DATA $get_payload = file_get_contents('php://input'); $get_data = json_decode($get_payload, true); // VALIDATE PAYLOAD DATA if(!is_array($get_data)){ http_response_code(400); echo 'Invalid payload'; exit; } // GET SINGLE DATA $get_txid = $get_data['txid'] ?? null; $get_merchant_key = $get_data['merchant_key'] ?? null; $get_merchant_name = $get_data['merchant_name'] ?? null; $get_item_desc = $get_data['item_desc'] ?? null; $get_amount_1 = (float)$get_data['amount_1']; $get_crypto_1 = $get_data['crypto_1'] ?? null; $get_amount_2 = (float)$get_data['amount_2']; $get_crypto_2 = $get_data['crypto_2'] ?? null; $get_customid = $get_data['custom_id'] ?? null; $get_timepay = $get_data['time_pay'] ?? null; $get_timezone = $get_data['time_zone'] ?? null; // VALIDATE MERCHANT API if($get_merchant_key != $my_merchant_api){ http_response_code(405); echo 'Invalid merchant api'; exit; } // VALIDATE MERCHANT NAME if($get_merchant_name != $my_merchant_name){ http_response_code(405); echo 'Invalid merchant name'; exit; } // VALIDATE MAIN CRYPTO if($get_crypto_1 != $my_main_crypto){ http_response_code(405); echo 'Invalid main crypto'; exit; } // SUCCESS http_response_code(200); echo "Expected payment is successfull!"; ?>
Please note that our servers always check the return based on the HTTP RESPONSE CODE from your webhook script. So make sure that you webhook script always return:
<?php
http_response_code(200) -> For every success.
http_response_code(400, 401, 405, 500) -> For every errors.
?>
