# Withdrawals

## Webhook Respond

The withdrawals report is implemented by means of webhooks.

For more information on setting up Webhooks, see the [**Setting up Webhooks**](/quick-start/setting-up-webhooks.md)**.**

Set the Webhook URL in the menu **Merchant\API\WebhookURL** to receive a callback about withdrawals statu&#x73;**.** Required https (TLS/SSL)

**Webhook password** - password required to verify the withdrawal signature

**Webhook URL** - the address in the system from which the withdrawal is made, this address will be used to send updates on the status of withdrawals:

**Request method:** POST

**Response Type:** JSON

**Parameters:**

<table><thead><tr><th width="185">Name</th><th width="454">Description</th><th>Type</th></tr></thead><tbody><tr><td>ID</td><td>Withdrawal ID in the 0xProcessing system</td><td>Integer</td></tr><tr><td>MerchantID</td><td>Merchant Id in 0xProcessing system</td><td>String</td></tr><tr><td>Date</td><td>Date of withdrawal request </td><td>DateTime</td></tr><tr><td>Amount</td><td>Withdrawal amount in cryptocurrency</td><td>Double</td></tr><tr><td>AmountUSD</td><td>Withdrawal amount in USD equivalent</td><td>Double</td></tr><tr><td>Fee</td><td>Withdrawal fee in token equivalent</td><td>Double</td></tr><tr><td>Currency</td><td>Withdrawal currency</td><td>String</td></tr><tr><td>Address</td><td>Withdrawal address</td><td>String</td></tr><tr><td>Status</td><td><p>Withdrawal status</p><p>Possible values are:</p><p><strong>Success</strong> - withdrawal has been executed successfully</p><p><strong>Canceled</strong> - withdrawal has been not executed</p></td><td>String</td></tr><tr><td>Reason</td><td>Reason of withdrawal reject</td><td>String</td></tr><tr><td>ExternalID</td><td>Unique withdrawal identifier in the system from which the withdrawal is made</td><td>String</td></tr><tr><td>Signature</td><td>Checksum to verify the authenticity of the request (to ensure that the request came from 0xProcessing)</td><td>String</td></tr><tr><td>ClientID</td><td>Unique client ID in your system</td><td>String</td></tr><tr><td>Hash</td><td>Successful transaction hash</td><td>String</td></tr></tbody></table>

**Signature check:**

1\. A string of the following form must be generated: **"ID":"MerchantID":"Address":"Currency":"Password"** (WebhookURL link password)

Without quotation marks through a colon. **Example:** 12345:Qtfxhgy43:0xa36740e327726fA05F720b10Ec2D71E0CD4Ae2A5:ETH:qwerty

2\. Encrypt the resulting string using MD5 algorithm

<https://emn178.github.io/online-tools/md5.html>

3\. Compare the resulting string with the one that came through Webhook

```javascript
"Signature":"a5510c8c3e657ffd8229813749cd20ec"
```

4\. If the strings are the same, **return HTTP Status 200** (Required). Our server expects a response to the webhook within a 3-second timeout period. If the response is not received within these 3 seconds, the system considers the delivery failed.

If the callback is not delivered successfully, the system repeats at 31 times with an interval of 15 seconds. If the webhook still fails to be delivered, the system sends a notification to the merchant's account email indicating a problem with the WebhookURL.

**Example Webhook JSON:**

<pre class="language-json" data-line-numbers><code class="lang-json">                        {
                        "ID":33683,
                        "MerchantID":"0xMR000000",
                        "Date":"2023-03-06T16:37:38.547046Z",
                        "Amount":500.0,
                        "Fee":2.6,
                        "Currency":"ETH",
                        "Address":"0x......",
                        "Status":"Success",
                        "Reason":null,
                        "Signature":"3a16086f49eb11c2e8c426a7b3649caa",
<strong>                        "ExternalID":"abcd1234",
</strong>                        "ClientID":"abcd1234",
                        "AmountUSD":0.0,
                        "Hash":"a45172f319ec4561871bf195f17f85e69a4bc842b5c1085dbe000098217fffb7"
                        }
</code></pre>

{% hint style="warning" %}
When processing callbacks, you MUST use the **ID** parameter **from the callback 0xProcessing** as an additional validation factor.
{% endhint %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.0xprocessing.com/0xprocessing-api/webhooks/withdrawals.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
