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

# Webhooks

> Subscribe your server to Pila events, send test deliveries, and check what was delivered.

Webhooks let Pila notify your server when something happens, such as a wallet being credited, so you don't have to keep polling the API.

<Frame caption="Webhook subscriptions">
  <img src="https://mintcdn.com/dojah-9b16f14e/gbqe8nXs4Wupm4KV/images/dashboard/webhooks.png?fit=max&auto=format&n=gbqe8nXs4Wupm4KV&q=85&s=a6e123ef835364117f661f2da6906f48" alt="Webhooks page listing subscriptions" width="1024" height="541" data-path="images/dashboard/webhooks.png" />
</Frame>

The list shows each subscription's **app name**, **environment**, **service type** (for example `NGN WALLET`), **date subscribed** and **endpoint**.

## Subscribe

<Steps>
  <Step title="Select Subscribe">
    At the top right of the Webhooks page.
  </Step>

  <Step title="Choose the app and service">
    Pick which app and which service you want events for, and enter your endpoint URL.
  </Step>

  <Step title="Save">
    The subscription appears in the list.
  </Step>
</Steps>

On each row, **Copy** copies the endpoint URL, the eye icon opens its details, and the bin icon removes the subscription.

<Info>
  Subscriptions are per mode. Sandbox hooks do not carry over to live — re-subscribe after you switch the top-bar toggle.
</Info>

You can also register an endpoint from the API. See [Subscribe to webhooks](/api-reference/webhooks/subscribe).

## Webhook details and deliveries

<Frame caption="Endpoint details and recent deliveries">
  <img src="https://mintcdn.com/dojah-9b16f14e/gbqe8nXs4Wupm4KV/images/dashboard/webhook-details.png?fit=max&auto=format&n=gbqe8nXs4Wupm4KV&q=85&s=8c61200d3483debfcd6a36ea67906a09" alt="Webhook details page showing endpoints and recent deliveries" width="1024" height="542" data-path="images/dashboard/webhook-details.png" />
</Frame>

**Your endpoints** shows where Pila delivers events and whether each endpoint is **Active**.

* **Send test** sends a test event so you can check your server receives it.
* **Deliveries** opens the delivery history for that endpoint.

**Recent deliveries** lists every webhook sent to your endpoints. Filter by **All**, **Scheduled**, **Retry**, **Success**, **Failed** or **Discarded**. Search by **Event ID**, or search the payload with a field and value such as `data.reference=REF-123`. Select **Refresh** to load new deliveries, and **Go Back** to return to the list.

## Building a reliable endpoint

<AccordionGroup>
  <Accordion title="Verify every event">
    Check the `x-pila-signature` header before acting on a payload. An unverified webhook is untrusted input, and a forged deposit event your code trusts is a direct path to losing money. See [Webhook signatures](/api-reference/core-concepts/webhook-signatures).
  </Accordion>

  <Accordion title="Return 200 quickly">
    Acknowledge first, process in the background. A slow endpoint looks like a failed one and will show up under Retry.
  </Accordion>

  <Accordion title="Handle duplicates">
    The same event can arrive more than once. Key your processing on the transaction or event identifier so a repeat delivery is a no-op.
  </Accordion>

  <Accordion title="Be reachable over HTTPS">
    A localhost URL will not receive anything. Use a tunnel while developing.
  </Accordion>
</AccordionGroup>

<Tip>
  Not receiving events? Open the webhook's details, select **Send test**, then check **Recent deliveries** for `Failed` or `Retry` entries — they will tell you whether Pila reached you at all.
</Tip>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.