---
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 the Razorpay dashboard and Plugin Settings so
  events verify.
---

# Configure webhooks

Configure Razorpay webhooks to synchronize payment captures and subscription renewals with AcelleMail. Every webhook payload is **HMAC-SHA256 signature-verified** using your shared Webhook Secret.

* **Prerequisites:** Active license saved in Settings; server reachable via public HTTPS.

## Add the endpoint

1. Navigate to **Razorpay Dashboard → Settings → Webhooks** and click **Add New Webhook**.
2. Enter your webhook endpoint (replace `YOUR_DOMAIN` with your actual domain):
   ```
   https://YOUR_DOMAIN/cashier/razorpay/webhooks
   ```
3. Select the required webhook events:

| Event | Why it matters |
| --- | --- |
| `payment.captured` | Confirms a one-time payment succeeded (safety net if the customer never returns from checkout) |
| `subscription.charged` | Confirms a recurring cycle was billed |
| `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

The secret string must match exactly across both platforms:

1. Specify a secure **Secret** in your Razorpay dashboard webhook configuration.
2. Navigate to **Admin → Plugins → Razorpay → Settings** and paste the matching string into **Webhook Secret**.
3. Click **Save Settings**.

Mismatched secrets cause signature validation failures and result in rejected event payloads.

::: 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 into the dashboard.
:::

::: warning Required for recurring subscriptions
Recurring plans depend on `subscription.charged` webhooks to record renewal cycles automatically. Without this event, renewals are not registered 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
