# 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](https://developer.kriptomat.io/docs/widget.html/widget-configuration).<br>
