> ## Documentation Index
> Fetch the complete documentation index at: https://docs.paylead.fr/llms.txt
> Use this file to discover all available pages before exploring further.

# Webhooks

> Set up Webhooks from Shift to receive real-time notifications from Paylead on Program events, and browse the delivery history.

<Warning>
  **Work in progress, under review.** This page is not validated yet and may contain inaccuracies. Track and record its status in the [documentation review tracker](https://www.notion.so/22a535a8f8794ec8aa19f56cbb5f749a). This banner is removed once the page is validated.
</Warning>

[Webhooks](/glossary#webhooks) let Paylead push notifications to your back-office the moment something happens on your [Program](/glossary#program): a [Reward](/glossary#reward) is created, a [Consumer](/glossary#consumer)'s scraping fails, an [Offer](/glossary#offer) is about to expire. From Shift, you declare which URL receives each event type and inspect the dispatch history.

<Note>
  This page covers the **Shift workflow**: how to register a callback URL, test it, and audit deliveries. For the technical contract (payload shape, signature, retry policy, idempotency), see the [Webhooks concept](/program/user-journey/concepts/webhooks).
</Note>

## Set up a Webhook

Each event type is configured independently. You point each event at a single callback URL on your side.

<Steps>
  <Step title="Open the Hooks section">
    In Shift, go to **My Account** > **Developers** > **Hooks**. The left side lists every event type Paylead supports.
  </Step>

  <Step title="Pick the event you want to subscribe to">
    Click the **+** next to the event. Its configuration panel opens on the right.
  </Step>

  <Step title="Enter the callback URL">
    In the **Callback URL** field, enter the HTTPS endpoint that will receive the event. The endpoint must accept `POST` with a JSON body and respond `2xx` quickly.
  </Step>

  <Step title="Validate with a test delivery">
    Click **Send test**. Paylead immediately posts a payload to the URL with mock data; non-nullable fields are populated with sample values, nullable fields are left blank. Use this to confirm DNS, TLS, and your handler's basic plumbing.
  </Step>

  <Step title="Save your changes">
    Click **Save**. The Webhook is now live and Paylead will dispatch real events to it from this moment forward.
  </Step>
</Steps>

<Tip>
  To remove a Webhook, click the trash icon next to the event in the Hooks list.
</Tip>

## Available events

Paylead emits Webhooks across four families: the [Reward](/glossary#reward) lifecycle, the [Affiliation](/glossary#affiliation) lifecycle, payouts, and Offer changes. Subscribe only to the events your back-office actually reacts to.

### Reward lifecycle

| Event type                     | Description                                                                                                       |
| ------------------------------ | ----------------------------------------------------------------------------------------------------------------- |
| **Reward Created**             | A transaction is eligible to a [Cashback](/glossary#cashback). The Reward is visible to the Consumer in your app. |
| **Reward Validated**           | The Reward has not been cancelled by the merchant. It will be invoiced to the merchant at the end of the month.   |
| **Reward Paid in**             | The merchant has paid the Reward. Paylead will transfer the Cashback amount to the Program in the following days. |
| **Reward Paid out**            | The Reward amount has been transferred to the Program Manager bank account.                                       |
| **Consumer Reward Pooled**     | The Consumer can be notified that a Reward has been deposited in their pool.                                      |
| **Consumer Reward Validation** | A Reward has been created and is in `Pending Validation` status.                                                  |

### Affiliation lifecycle

| Event type                | Description                                                                                         |
| ------------------------- | --------------------------------------------------------------------------------------------------- |
| **Affiliation Created**   | A Consumer has just received a new Affiliation Reward.                                              |
| **Affiliation Validated** | The Affiliation Reward is validated by the merchant after the validation delay.                     |
| **Affiliation Paid in**   | The merchant has paid the Affiliation Reward.                                                       |
| **Affiliation Pooled**    | A new Affiliation Reward has landed in the Consumer's pool.                                         |
| **Affiliation Paid out**  | The Consumer pool has been triggered and the Affiliation Reward transferred to the payment account. |
| **Affiliation Cancelled** | A pending Affiliation Reward is cancelled instead of validated.                                     |

### Payouts and Ventilation

| Event type                     | Description                                                                                                            |
| ------------------------------ | ---------------------------------------------------------------------------------------------------------------------- |
| **Payout Success**             | Two wire transfers have been sent to the Program account: one for the sum of the Rewards, one for the associated fees. |
| **Payout Error**               | A transfer error occurred, preventing the Reward from being paid to the Consumer account.                              |
| **Ventilation File Available** | A [Ventilation](/glossary#ventilation) file is available for download.                                                 |

### Offers

| Event type                       | Description                                                                                    |
| -------------------------------- | ---------------------------------------------------------------------------------------------- |
| **New Offer Available**          | A new Offer has been published and is available to Consumers.                                  |
| **Offer Ending Soon Date**       | An Offer is about to expire. The Webhook is sent 48h before the end date.                      |
| **Offer Ending Soon Budget**     | The Offer budget is close to depletion. The Webhook is sent when 80% of the budget is reached. |
| **Offer Cashback Rate Increase** | The Cashback rate of an Offer has been increased.                                              |

### Bank synchronization

| Event type         | Description                                                                 |
| ------------------ | --------------------------------------------------------------------------- |
| **Scraping Error** | A bank synchronization failure has blocked the Consumer's transaction feed. |

The **Scraping Error** Webhook fires when the Consumer's account enters any of the following synchronization statuses:

* `SCARequired`, `webauthRequired`, `additionalInformationNeeded`, `decoupled`, `validating`: the sync is suspended. Resetting it requires the Consumer to renew consent or complete an SCA (Strong Customer Authentication) flow.
* `ActionNeeded`: the Consumer must perform a specific action on the bank's website or app (for example, accept new terms and conditions).

See the [Status reference](/program/shift/status-reference) for the full synchronization status list.

## Event logs

The **Event Logs** tab in **My Account** > **Developers** lists every Webhook delivery attempted on your Program. Use it to audit failures and confirm that your endpoint is up.

| Column       | Description                                                                                 |
| ------------ | ------------------------------------------------------------------------------------------- |
| **Date**     | When the event was dispatched.                                                              |
| **Consumer** | The Consumer ID the event relates to, when applicable.                                      |
| **Type**     | The Webhook event type.                                                                     |
| **URL**      | The callback URL that received the event.                                                   |
| **Status**   | The HTTP status code returned by your endpoint. `200` or `201` confirms successful receipt. |

Use the **Date from** and **Date to** filters to scope the history. Without filters, every event since the Program launched is shown.

<Tip>
  Each delivery includes a unique `event_id`. Persist it on your side and dedupe on it; Paylead may redeliver the same event after retries. See [idempotency](/program/user-journey/concepts/webhooks#idempotency) for the recommended pattern.
</Tip>

## What's next

<CardGroup cols={2}>
  <Card title="Webhooks concept" icon="zap" href="/program/user-journey/concepts/webhooks">
    Payload shape, HMAC signature verification, and retry policy for your endpoint.
  </Card>

  <Card title="API keys" icon="key" href="/program/shift/api-keys">
    Generate the Connector, Injector, and M2M credentials your back-office needs.
  </Card>

  <Card title="Status reference" icon="list-checks" href="/program/shift/status-reference">
    Canonical list of every status Shift exposes, including synchronization codes.
  </Card>

  <Card title="Ventilations and invoices" icon="hand-coins" href="/program/shift/ventilations-invoices">
    Download Ventilation files once the `Ventilation File Available` event fires.
  </Card>
</CardGroup>
