# Custom webhook

::: warning Under construction
The custom webhook is still being built. This page describes how it will work.
:::

Use the custom webhook when your platform isn't on the [platforms list](/en/integracoes/#platforms). It receives any JSON event, and you tell LeadStalker where each piece of information is.

## Set it up

1. In **Integrations**, add a **Custom** integration and generate the URL.
2. On your platform, register a sales webhook with that URL.
3. Make a test sale. When it arrives, the screen shows the received event.
4. Link each sale field to a value in the event by clicking it.

## Sale fields

| Field | Example path in the event |
|---|---|
| Transaction id | `data.id` |
| Buyer email | `data.customer.email` |
| Product | `data.items[0].sku` |
| Product name | `data.items[0].title` |
| Amount | `data.total_cents`, divided by 100 |
| Date | `data.paid_at` |
| Status | `event` |

The amount may come in cents: turn on the conversion to divide by 100.

## Status translation

Each platform names its statuses differently. The screen lists the values that have already arrived in the status field, and you choose what each one means — for example, `order.paid` becomes **Approved**, `order.refunded` becomes **Refunded** and `order.created` is ignored.

## Reprocess

Events are stored. If you change the mapping, **Save and reprocess** reads the events that already arrived again.

## Security

The integration URL is unique and signed. If your platform lets you send a fixed header with every webhook, set a secret there and paste the same value in **Header secret**: LeadStalker then rejects requests without it.
