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

# Webhooks & Events

> Receive Lead webhooks, verify signatures, fetch the latest object for each event, and pair event delivery with reconciliation.

> [!NOTE]
>
> Lead sends webhooks to notify you about events that happen within your program. We use HTTPS to send events as a JSON payload. You can then use these events to trigger new actions in your system.

## Webhook Authentication

Every webhook includes a signature in the `Lead-Signature` header. Use it to check that the webhook came from Lead. The header's format is `t={0},v0={1}`.

* `t` is the timestamp in milliseconds.
* `v0` is an [HMAC signature](https://en.wikipedia.org/wiki/HMAC) with [SHA-256](https://en.wikipedia.org/wiki/SHA-2). It uses your webhook endpoint's signing secret as the key and the request body, as string bytes, as the message.
* The `hmac` portion of the signature header is base64 encoded.

To authenticate a webhook, join `t`, a period (`.`), and the request body, then calculate the HMAC of the result: `base64(HMAC256(t + "." + request body))`. Check that it matches `v0` in the `Lead-Signature` header.

> [!TIP]
>
> You must use the request body as bytes, exactly as you receive it. Do not process it first.

To prevent a [replay attack](https://en.wikipedia.org/wiki/Replay_attack), you can also compare `t`, the time Lead sent the webhook, to the current time on your server. Then decide if the difference is within your tolerance.

### Webhook IP Addresses

Lead sends webhooks only from these IP addresses:

* **Production:** `3.216.219.186`
* **Sandbox:** `34.234.237.195`

## Webhook Format

Here's a sample `Lead-Signature` header, with the HMAC value in `v0`:

```text theme={null}
"t=1713350954014,v0=EonRn+iGDCUm+VSc+rR9RVvMOofQDR/bfEJvihRSx6g="
```

An event body looks like this:

```json theme={null}
{
    "id": "event_3MNa7kT2pQ9xV4bR8cW1yZ6dF0h",
    "event": "wire.posted",
    "object_type": "wire",
    "object_id": "wire_3MNa6rH5jL2sD8gK1fX9uB4wE7t",
    "created_at": "2026-11-20T19:47:20.154Z"
}
```

| **Field** | **Description** |
| - | - |
| id | A unique identifier for this specific event. |
| event | A machine-readable string describing this event. |
| object\_type | The type of object the event is about, for example `instant_payment` for an Instant Payment. |
| object\_id | The ID of the object the event is about. |
| created\_at | The ISO-8601 timestamp of when the event object was created. |

## Getting the Object

Each V2 event tells you what happened and which object it happened to. It doesn't include the object itself.

To get the object, call its retrieve endpoint with the `object_id`. You choose which API version to call, so you can move to a newer version when you're ready. Your webhook payload doesn't change.

For example, when you receive a `wire.posted` event, you can retrieve the wire with either version:

* V1: `GET /v1/wires/{wire_id}`
* V2: `GET /v2/wires/{id}`

You always get the object as it is now, even if the event arrives late or out of order.

## Retries & Missed Events

Lead treats a webhook as delivered when your endpoint returns a 2xx HTTP response. If a delivery fails, Lead retries it. The first retry is after 15 minutes, and the wait doubles after each attempt. Retries stop after a 2xx response or 3 days after the first attempt.

> [!TIP]
>
> Lead might deliver the same event to your webhook endpoint more than once.
>
> To avoid processing the same event more than once, you can use the event's `id` as an idempotency key.

To check for missed events, use the [List all events API](https://docs.lead.bank/api-reference/endpoint/events/list-all-events-v2.md) to retrieve events from the last 90 days.

> [!WARNING]
>
> A request for an event older than 90 days returns a 404.

### Pairing Webhooks With Reconciliation

Lead recommends webhooks for real-time status updates, but not as your only source of updates. An integration that only polls breaks more easily, and one that only uses webhooks can miss events. Pair webhooks with a periodic reconciliation job for these reasons:

* **Not every status sends a webhook.** In the [event tables](#event-types), some statuses show No in the Webhook Sent column, for example `wire.created`, `ach.processing`, `ach.pending_return`, and `account_number.activated`. You only see those statuses when you retrieve the object or list events.
* **Retries stop after 3 days.** Lead retries a failed delivery for up to 3 days after the first attempt. After that, Lead doesn't retry the event.
* **Lead might deliver an event more than once.** Use the event's `id` as an idempotency key when you process it.
* **Events expire after 90 days.** Reconcile before then.

For most programs, Lead recommends this pattern:

1. Process webhooks in real time as the primary trigger for downstream logic.
2. Run a reconciliation job, for example hourly or daily, that calls [List all events](https://docs.lead.bank/api-reference/endpoint/events/list-all-events-v2.md), the object's retrieve endpoint, or both, to catch anything you missed.
3. Use the retrieve endpoint for the object when you need the authoritative current status of a single transfer.

## Event Types

> [accordion] ACH Events
>
> | **Event** | **Description** | **ACH Direction** | **Webhook Sent** |
> | - | - | - | - |
> | ach.scheduled | The Lead platform has received an incoming ACH and is waiting on settlement to post to your account. | incoming | Yes |
> | ach.processing | The ACH will be submitted soon for Fed processing. Outgoing ACH in this status can no longer be canceled via the API. | outgoing | No |
> | ach.submitted | The Lead platform has submitted the ACH transfer for Fed processing. | outgoing | Yes |
> | ach.posted | The ACH transfer has successfully completed and has been posted to the receiving bank account.  *For outbound, if the receiver is at a different bank, the funds may take a few hours to appear.* | outgoing incoming | Yes, except if previous status = ach.pending\_return |
> | ach.under\_review | The ACH transfer has triggered a validation rule that requires further review by the Lead Payment Ops team. Please see best practices on how to avoid this status.  We may reach out to you for additional information. | outgoing incoming | Yes for outbound; No for inbound |
> | ach.approved | A successful result of a manual review by Lead. This indicates that the ACH transfer will continue to process. | outgoing incoming | Yes |
> | ach.rejected | An unsuccessful result of a manual review, indicating that Lead Payment Ops has detected an issue with the ACH transfer. Review the data in the rejection hash to determine what to fix and resubmit a corrected ACH transfer if appropriate.  This is a terminal status. Please reach out to support via your Slack channel if you have further questions about this decision. | outgoing | Yes |
> | ach.pending\_return | The Lead platform has received notice that a previously posted ACH transfer is going to be returned. | incoming | No |
> | ach.returned | A return  processed successfully, and the original ACH transaction is now returned. | outgoing incoming | Yes |
> | ach.return\_dishonored | A dishonored return  processed successfully, and the original ACH transaction is now dishonored. | outgoing incoming | Yes |
> | ach.return\_contested | A contested return  processed successfully, and the original ACH transaction is now contested. | outgoing incoming | Yes |
> | ach.corrected | Sent if the counterparty has updated any information about their account. | outgoing | Yes |

> [accordion] Internal Transfer Events
>
> | **Event** | **Description** | **Webhook Sent** |
> | - | - | - |
> | internal\_transfer.posted | The internal transfer was completed and money has successfully moved from the `sender_account_number_id` to the `receiver_account_number_id` | Yes |
> | internal\_transfer.rejected | The internal transfer was not completed and will not be retried. Please see `rejection.reason` and `rejection.details` for more information. | Yes |

> [accordion] Instant Payment Events
>
> **Incoming**
>
> | **Event** | **Description** | **Webhook Sent** |
> | :- | :- | :- |
> | instant\_payment.under\_review | **Lead** is manually reviewing the incoming instant payment. | Yes |
> | instant\_payment.posted | **Lead** posted the incoming instant payment to your account. | Yes |
> | instant\_payment.rejected | **Lead** rejected the incoming instant payment. | Yes |
> | instant\_payment.return\_request\_response\_needed | You received an incoming return request that requires a response from you. | Yes |
>
> **Outgoing**
>
> | **Event** | **Description** | **Webhook Sent** |
> | :- | :- | :- |
> | instant\_payment.under\_review | **Lead** is manually reviewing the outgoing instant payment before sending it to the network. | Yes |
> | instant\_payment.posted | The outgoing instant payment has been posted to the **Lead** account. | Yes |
> | instant\_payment.rejected | The outgoing instant payment has been rejected by **Lead**, the counterparty, or the network. | Yes |
> | instant\_payment.counterparty\_status\_updated | The counterparty status of the outgoing instant payment has been updated. | Yes |
> | instant\_payment.return\_request\_status\_updated | The status of the outgoing return request has been updated. | Yes |

> [accordion] Wire Events
>
> **Incoming**
>
> | **Event** | **Description** | **Webhook Sent** |
> | - | - | - |
> | wire.posted | A wire is received by Lead and funds are successfully posted to the corresponding account's balance. | Yes |
> | wire.rejected | A wire is received but later rejected by Lead. Lead has returned the funds to the sender. See `rejection` section in the wire object for reasons and dest | Yes |
>
> **Outgoing**
>
> | **Event** | **Description** | **Webhook Sent** |
> | :- | :- | :- |
> | wire.created | The wire was created. | No |
> | wire.scheduled | The wire transaction has passed Lead's internal review and is scheduled to be submitted to the Fedwire network. *This is the last stage you can cancel a wire.* | Yes |
> | wire.processing | Lead's system is processing the wire submission. *You can not cancel this wire after reaching this stage.* | Yes |
> | wire.posted | The wire has been successfully submitted to the counterparty financial institution. `IMAD`*value is available in the object.* | Yes |
> | wire.under\_review | Lead is performing additional review on this wire transaction. | Yes |
> | wire.rejected | Lead has reviewed and rejected this wire transaction. | Yes |
> | wire.cancel\_pending | Lead has received the cancel request and we are processing the request. | No |
> | wire.canceled | Lead has successfully canceled the wire and related funds have been returned to your account. | Yes |
>
> **Return Requests**
>
> | **Event** | **Description** | **Webhook** Sent |
> | - | - | - |
> | wire.return\_request\_response\_needed | You received an incoming return request that requires a response from you. | Yes |
> | wire.return\_request\_pending | The outgoing return request is created and is pending a response from the counterparty. | No |
> | wire.return\_request\_status\_updated | The status of an outgoing return request has changed. | Yes |

> [accordion] Account Number Events
>
> | **Event** | **Description** | **Webhook Sent** |
> | - | - | - |
> | account\_number.created | The Account Number was created. | Yes if created by Lead. Otherwise, no. |
> | account\_number.activated | The Account Number was activated. | No; synchronous 200 |
> | account\_number.deactivated | The Account Number was deactivated. | No; synchronous 200 |
> | account\_number.canceled | The Account Number was canceled. | No; synchronous 200 |

> [accordion] Lending Events
>
> | **Event** | **Description** | **Webhook Sent** |
> | - | - | - |
> | lending.disbursement.processing | The Disbursement is being processed. You cannot cancel the Disbursement anymore. | Yes |
> | lending.disbursement.succeeded | The Disbursement has succeeded. The funds should have landed in the counterparty’s account. | Yes |
> | lending.disbursement.failed | The Disbursement has failed. The `failure` field on the Disbursement object will provide details on the failure. | Yes |
> | lending.disbursement.ach\_correction | Sent if the counterparty’s account details have been corrected by their bank. This is only applicable for ACH. | Yes |

> [accordion] Funding Events
>
> | Event | Description | Webhook Sent |
> | - | - | - |
> | funding.posted | The funding request was completed and money has successfully moved to the funding account(s) configured for your program. | Yes |
> | funding.rejected | The funding request was not completed and will not be retried. Sent for v0 fundings only. v2 fundings have no `rejected` status. | Yes |

> [accordion] Receivable Sale Events
>
> | Event | Description | Webhook Sent |
> | - | - | - |
> | receivable\_sale.created | The daily sale was created with one or more receivables. Its receivables and `purchase_amount` are frozen. | Yes |
> | receivable\_sale.no\_receivables\_for\_sale | The daily sale ran and found no receivables to sell, so `purchase_amount` is 0. | Yes |
> | receivable\_sale.settled | The sale's `purchase_amount` was debited from your account. `core_transaction_id` is set. | Yes |
> | receivable\_sale.failed | The sale could not be settled because your account had insufficient funds or was closed. The sale's `status` is `failed`; check `failure.reason` for the cause and `failure.details` for next steps. | Yes |
