# Webhook Notification

Configure Webhook to receive notifications. ReelPay will notify merchant of the final transaction results. You can configure the Webhook URL on the [**AppManage page**](https://merchant.reelpay.com/appManage)

<figure><img src="https://2984238154-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9lC1YZ1TOU74OejUtI5M%2Fuploads%2FCscmCFpYRvi7aVpWg9u8%2Fimage.png?alt=media&#x26;token=ec632146-c483-4a69-be67-755993d72a6b" alt="" width="328"><figcaption><p><a href="https://merchant.reelpay.com/appManage"><strong>AppManage</strong></a></p></figcaption></figure>

Transactions will start a request to the callback interface set by the merchant when involving the following [events](https://docs.reelpay.com/error-code#transaction-status-code):

* Paid
* Transaction close
* Transaction timeout
* Refunded
* Chain confirmation failed

Callback Frequency: 5s、15s、30s、3m、10m、20m、30m、30m、30m、60m、3h、3h、3h、6h、6h&#x20;

Total: 24h3m50s &#x20;

Callback Form:

* The callback content is still encrypted.「For more information see the [Signature](https://docs.reelpay.com/reelpay-for-developer/to-get-started/signature)」

### Webhook notification

{% tabs %}
{% tab title="Header" %}

<table><thead><tr><th width="149">Name</th><th width="206">Value</th><th width="101" align="center">Required</th><th width="77">Type</th><th width="299">Description</th></tr></thead><tbody><tr><td>X-Appid</td><td>eqrbntqbi5uqvkpr</td><td align="center">Y</td><td>string</td><td>Merchant's unique credential. Find it on the <a href="https://merchant.reelpay.com/appManage"><strong>AppManage page</strong></a>.</td></tr><tr><td>X-Timestamp</td><td>1690368283</td><td align="center">Y</td><td>string</td><td>Timestamp in seconds (10-digit). The request is valid for two minutes.</td></tr><tr><td>X-Sign</td><td>e0c6a719ebc366da0340c1b450026a903a55c86ed5fbe0b586cd73f6be74ade6</td><td align="center">Y</td><td>string</td><td>hmacSHA256 (<mark style="color:red;"><strong>body (json string)</strong></mark>+timestamp+appKey)</td></tr><tr><td>X-EventType</td><td>Paid</td><td align="center">Y</td><td>string</td><td><a href="../../error-code#transaction-status-code">Transaction Status Code</a></td></tr></tbody></table>
{% endtab %}

{% tab title="Body" %}

<pre class="language-json"><code class="lang-json"><strong>```json
</strong>{
   "trade_no": "uGHT9KRRvLIl4WW8JAaTWmETf3mz8D60",
   "appid": "eqrbntqbi5uqvkpr",
   "out_trade_no": "202307250001",
   "amount": "1.2",
   "status": "PAID",
   "success_time": 1690369680
 }
```

</code></pre>

{% endtab %}

{% tab title="Parameters" %}

<table><thead><tr><th width="155.33333333333331">Name</th><th width="88">Type</th><th>Description</th></tr></thead><tbody><tr><td>trade_no</td><td>string</td><td>Transaction ID</td></tr><tr><td>appid</td><td>string</td><td>Merchant APPID</td></tr><tr><td>out_trade_no</td><td>string</td><td>Merchant Order ID</td></tr><tr><td>amount</td><td>string</td><td>Transaction Amount</td></tr><tr><td>status</td><td>string</td><td>Transaction Status</td></tr><tr><td>success_time</td><td>string</td><td>Transaction Time</td></tr></tbody></table>
{% endtab %}

{% tab title="Remarks" %}
Return Appid, Sign, Timestamp in the header of the response.  The signature method hmacSHA256 (<mark style="color:red;">**body (json string)**</mark>+timestamp+appKey).

Please use the data with caution if the signature verification fails. It indicates that the data has been tampered with.
{% endtab %}
{% endtabs %}

{% hint style="info" %}
Merchants sign to ensure information safety. Once the merchant has processed the order, please return "Success" in the body of the HTTP response if the processing has been successful. If the process fails, ReelPay will attempt to send the order again and the Webhook will retry up to 15 times ( Callback Frequency: 5s、15s、30s、3m、10m、20m、30m、30m、30m、60m、3h、3h、3h、6h、6h, Total: 24h3m50s ).
{% endhint %}

## Example

<figure><img src="https://2984238154-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9lC1YZ1TOU74OejUtI5M%2Fuploads%2Fh7BbQly3Qh4zbBxzuUa4%2Fimage.png?alt=media&#x26;token=c96c13de-8b56-472f-91d5-ff8df0072a74" alt=""><figcaption></figcaption></figure>
