# WebHook

## Using webhooks

{% hint style="warning" %}
WebHook registration requires Callback URL registration.&#x20;

You can register a callback URL by contacting us.
{% endhint %}

{% hint style="info" %}
Webhooks are sent based on partner\_order\_id.
{% endhint %}

## State&#x20;

```
success
```

A status change that occurs when a payment or withdrawal is successfully completed. It is usually called upon successful payment and the merchant should pay out points or goods as a result.

```
pending
```

A status that occurs when a withdrawal request is successful. This usually occurs when the user's withdrawal request is successfully registered in the admin.

```
fail
```

This error code is generated when a payment/withdrawal request fails due to various reasons such as user cancellation, insufficient assets, etc. Once the status is updated, the payment for that TxId will be terminated.

## Request object

<table><thead><tr><th width="142">Name</th><th width="117">Type</th><th>Description</th></tr></thead><tbody><tr><td><code>secret</code></td><td>string</td><td>The secret key issued by Excoinz. You can use this value to verify the security of the Webhooks API.</td></tr><tr><td><code>txId</code></td><td>string</td><td>The partner_order_id value sent when initiating the payment/withdrawal.</td></tr><tr><td><code>state</code></td><td>string</td><td>The status value of the payment.</td></tr><tr><td><code>amount</code></td><td>string</td><td>The amount of cryptocurrency (TRX-USDT) in which the payment was made.</td></tr><tr><td><code>symbol</code></td><td>string</td><td>The symbol of the payment asset.<br>The asset currently only supports USDT.</td></tr><tr><td><code>refId</code></td><td>string | null</td><td>An Excoinz internal payment ID that can be used for cross-verification.</td></tr></tbody></table>


---

# 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://payment.excoinz.com/core-api/webhook.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.
