# Webhook Use Cases

### **Commerce**

Set the send **`to_address`** as your wallet address.

Set **`asset_type`** to your preferred currency.

Set the `amount` to your price - can do this dynamically if want to set by $$ and your Eth or Enj or Btc price fluctuates.

Set the **`webhook_url`** to your postback url.

Set **`additonal_fields[0]`** as your user unique id.

Set **`additional_fields[1]`** as the product or basket id.

When a transaction completes you receive a postback to your webhook, to let you know the user paid, and you can give them whatever you are selling.

### **Loyalty**

Set the **`webhook_url`** to your postback url.

Set **`additonal_fields[0]`** as your user unique id.

Set **`additional_fields[1]`** as the product or basket id.\
\
When a transaction completes you receive a postback to your webhook, to let you know the user paid, and you can give them a reward of your choosing if they spend above your threshold.

### **Affiliate / Referral**

Set the **`webhook_url`** to your postback url.

Set **`additonal_fields[0]`** as your affiliate/referrer unique id.

Set **`additional_fields[1]`** as the purchase/action id.\
\
If selling a product

* Set the send **`to_address`** as your wallet address.
* Set **`asset_type`** to your preferred currency.
* Set the **`amount`** to your price - can do this dynamically if want to set by $$ and your Eth or Enj or Btc price fluctuates.

When a transaction completes you receive a postback to your webhook, to let you know that a transaction completed.

If selling a product your purchaseId tells you who made the purchase and of what items so you can give them their products, and

The affiliate id tells you who should get credit for the sale/action.

More details on how to configure widget check[ this page](/docs/widget.html/widget-configuration.md).<br>


---

# 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://developer.kriptomat.io/docs/widget.html/webhooks/webhook-use-cases.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.
