# Payment form with fixed amount

## Webhook Respond

The deposits report is implemented by means of webhooks.

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

Set the Webhook URL in the menu **Merchant\API\WebhookURL to receive a callback about payment status.** Required https (TLS/SSL)

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

**Webhook URL** - the address in the system from which the payment is made. This address will be used to send updates on the status of payments:

**Request method:** POST

**Response Type:** JSON

**Parameters:**

<table><thead><tr><th width="171">Name</th><th width="473">Description</th><th>Type</th></tr></thead><tbody><tr><td>PaymentId</td><td>Transaction 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>ShopId</td><td>Merchant ID in 0xProcessing system</td><td>String</td></tr><tr><td>Amount</td><td>Payment amount in cryptocurrency</td><td>Double</td></tr><tr><td>AmountUSD</td><td>Payment amount in USD equivalent</td><td>Double</td></tr><tr><td>TotalAmount</td><td>Full amount received in the cryptocurrency without fee</td><td>Double</td></tr><tr><td>TotalAmountUSD</td><td>Full amount received in USD equivalent without fee</td><td>Double</td></tr><tr><td>Currency</td><td>Payment currency</td><td>String</td></tr><tr><td>Email</td><td>Payer's e-mail</td><td>String</td></tr><tr><td>Status</td><td><p>Payment status</p><p>Possible values are:</p><p><strong>Success</strong> - payment has been executed successfully.</p><p></p><p><strong>Canceled</strong> - payment has been cancelled. The amount has been credited to the wallet indicated on the payment form after the payment window is closed (payment window 30-50 min). The amount has not been transferred to the wallet specified in the payment form.</p><p></p><p></p><p><strong>Insufficient</strong> - payment is underpaid. The time of the payment window has expired and the payment has not been executed completely, in this case the callback will contain AmountUSD and Amount corresponding to the real amount of received funds). </p><p></p><p>If the deposit amount is less than the minimum amount, the payment is assigned the status <strong>"Insufficient"</strong>. You will not be able to confirm the payment data without an additional payment.</p></td><td>String</td></tr><tr><td>BillingID</td><td>Unique payment identifier in the system from which the payment 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>Insufficient</td><td><p>If "Confirm insufficient" is set in the Merchant settings then after the end of the payment validity period (window), the insufficient payments will be automatically confirmed as successfully made. </p><p>Or Merchant can confirm it manually in <strong>Confirmations menu.</strong></p><p>You will receive a second callback with <strong>Success</strong> status and <strong>insufficient=true</strong> flag, which will transfer information about the (underpaid) amount actually received. You need to process this callback on the payment generation side and change the originally generated payment in accordance with the actual funds received</p></td><td>Boolean</td></tr><tr><td>Test</td><td><p>It indicates whether the payment has been marked as a test payment.</p><p>Test payments are not intended for real funds turnover and are not displayed in the merchant account. <strong>Do not credit funds on callbacks with the parameter test=true</strong></p></td><td>Boolean</td></tr><tr><td>ClientId</td><td>Unique client ID in your system</td><td>String</td></tr><tr><td>TxHashes</td><td>Successful transaction hash</td><td>String []</td></tr></tbody></table>

#### **If you want to know how to test callbacks? please follow** [**the link**](/quick-start/setting-up-webhooks.md#test-callbacks)

**Signature check:**

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

Without quotation marks through a colon. **Example:** 12345:Qtfxhgy43:<test@test.com>:USDT (ERC20):qwerty

2\. Encrypt the resulting string using the 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:**

{% code lineNumbers="true" %}

```json
                        {
                        "PaymentId":10453,
                        "MerchantId":"Asv0232SSd",
                        "Amount":0.00264765,
                        "TotalAmount":0.00264765,
                        "Currency":"BTC",
                        "Email":"test@test.com",
                        "Status":"Success",
                        "Signature":"a5510c8c3e657ffd8229813749cd20ec",
                        "BillingID":"13304",
                        "AmountUSD":115.0,
                        "TotalAmountUSD":115.0,
                        "Insufficient":false,
                        "Test":false,
                        "ClientId": "1000",
                        "TxHashes":["0e61e33a0c02204c41ac210c2fcffda4bea4399792acc49479aa8374465ef63a"]
                        }
```

{% endcode %}

{% hint style="warning" %}
When processing callbacks, you MUST use the **PaymentId** 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/payment-form-with-fixed-amount.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.
