---
url: /razorpay-acellemail/guides/configure-webhooks.md
description: >-
  Add the Razorpay webhook endpoint, enable the events the plugin needs, and set
  the same Webhook Secret in both the Razorpay dashboard and Plugin Settings so
  events verify.
---

# Configure webhooks

Webhooks are how Razorpay tells AcelleMail what happened after a payment leaves your site — a
one-time charge was captured, a subscription renewed, a payment failed. Every incoming webhook is
**HMAC-SHA256 signature-verified**, so a shared **Webhook Secret** must match on both sides before
the plugin will trust an event. This page walks you through wiring that up.

## Add the endpoint

### 1. Open the Webhooks screen

In the Razorpay Dashboard, go to **Webhooks** and choose to add a new webhook.

### 2. Paste your webhook URL

Enter your site's webhook endpoint, replacing `YOUR_DOMAIN` with your real domain:

```
https://YOUR_DOMAIN/cashier/razorpay/webhooks
```

The endpoint must be reachable over **HTTPS** from Razorpay.

### 3. Enable the events the plugin needs

Turn on exactly these events so both gateways stay in sync:

| Event | Why it matters |
| --- | --- |
| `payment.captured` | Confirms a one-time payment succeeded |
| `subscription.charged` | Confirms a recurring cycle was billed |
| `subscription.cancelled` | Marks a subscription as ended |
| `payment.failed` | Records a failed charge |

![Razorpay Dashboard Webhooks screen](/razorpay-acellemail/img/razorpay-configure-webhooks-events.png)
*Razorpay Dashboard → Webhooks*

## Set the Webhook Secret in both places

This is the step people miss. The secret must be **identical** in two places:

1. In the **Razorpay Dashboard → Webhooks** entry, set a **Webhook Secret**.
2. In **Admin → Plugins → Razorpay → Settings**, paste the same value into **Webhook Secret**, then
   click **Save Settings**.

If the two don't match, Razorpay's signature won't verify and the plugin will reject the events.

::: tip The URL is shown for you
Plugin Settings displays the exact webhook URL inline
(`https://YOUR_DOMAIN/cashier/razorpay/webhooks`) so you can copy it straight into the dashboard.
:::

::: warning Webhooks are required for subscriptions
Recurring plans rely on `subscription.charged` to record each renewal. Skip the webhook and
renewals won't be reflected in AcelleMail.
:::

## Related pages

* [Get your API keys](/razorpay-acellemail/guides/get-api-keys) — Key ID and Key Secret
* [Settings reference](/razorpay-acellemail/settings) — where the Webhook Secret lives
* [Set up subscriptions](/razorpay-acellemail/guides/set-up-subscriptions) — map plans for recurring billing
* [Security](/razorpay-acellemail/features/security) — how events are verified
* [Troubleshooting](/razorpay-acellemail/troubleshooting) — webhook not working
