# Webhooks (Discord)

Var Coins Shop can send rich Discord embeds for nearly every event of the shop lifecycle. Configured in `shared/config.lua` under `Shop.Webhooks`.

### Base configuration

```lua
Webhooks = {
  Enabled = true,
  Url = "https://discord.com/api/webhooks/your-webhook-url",
  Username = "Var Coins Shop",
  AvatarUrl = "https://example.com/avatar.png",
  Footer = "Var FiveM Shop Webhook",
}
```

Set `Enabled = false` to disable all webhooks globally.

### Per-event toggle

Each event can be toggled individually:

```lua
Events = {
  -- Player-triggered
  checkout = true,        -- Shop purchase completed
  balance = true,         -- Balance changed (add/remove)
  delivery = true,        -- Item delivered to a player
  topupIntent = true,     -- Player opened the Tebex page
  accountCreated = true,  -- New account created
  localeUpdate = true,    -- Player changed language

  -- Owner panel
  ownerPromo = true,
  ownerStock = true,
  ownerRotation = true,
  ownerMaintenance = true,
  ownerSpotlight = true,
  ownerAnnouncement = true,
  ownerTheme = true,
  ownerWebhook = true,
}
```

### Embed examples

* **Checkout** — green embed listing the items, total spent, balance after, applied promo code.
* **Delivery** — blue embed listing the delivered items.
* **Owner action** — amber embed with the action and the actor identifier.

### Runtime override (owner panel)

An authorized owner can change the webhook URL **at runtime** from the in-game owner panel without editing the config file. See In-game owner panel.


---

# 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://doc.var-fivem.com/coins-shop/configuration/webhooks-discord.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.
