---
title: "What does the RevenueDot webhook event RENEWAL mean?"
description: "RENEWAL is sent for a new paid period: a renewal, a trial converting, a lapsed customer resubscribing, or a recovered billing issue. Extend access to the new expiry."
url: https://revenuedot.app/docs/webhooks/webhook-renewal
---

# What does the RevenueDot webhook event RENEWAL mean?

The RevenueDot webhook event RENEWAL means a subscription started a new paid period, whether by renewing, converting from a trial or coming back.

## Quick facts

| | |
|---|---|
| Event | `RENEWAL` |
| Where | RevenueDot webhook (`event.type`), RevenueCat's webhook format |
| Sent to | Every enabled webhook whose filters match |
| Fields that are specific to it | `is_trial_conversion` |
| What it means | A new paid period: a renewal, a trial converting (`is_trial_conversion: true`), a lapsed customer resubscribing, or a recovered billing issue. |

## When it is sent

- The store reports a new transaction on a chain RevenueDot already holds, with a later period start.
- `is_trial_conversion` is true for the first paid period after a free trial.
- A recovered billing issue and a resubscribe after expiry also come out as `RENEWAL`, as in RevenueCat.

## What your server should do

1. Extend the entitlements to the new `expiration_at_ms`.
2. Count the revenue from `price`, which is the money that moved on this period.
3. Use `is_trial_conversion` to measure trial conversion.
4. Deduplicate on `event.id`: deliveries can repeat, because anything but HTTP 200 is retried after 5, 10, 20, 40 and 80 minutes.

## Example

```javascript
import { createHmac, timingSafeEqual } from "node:crypto";

// X-RevenueCat-Webhook-Signature: t=<unix seconds>,v1=<hex HMAC-SHA256 of "<t>.<raw body>">
function verify(rawBody, header, secret, toleranceSeconds = 300) {
  const m = /^t=(\d+),v1=([0-9a-f]{64})$/.exec(header ?? "");
  if (!m || Math.abs(Date.now() / 1000 - Number(m[1])) > toleranceSeconds) return false;
  const expected = createHmac("sha256", secret).update(`${m[1]}.${rawBody}`).digest();
  return timingSafeEqual(expected, Buffer.from(m[2], "hex"));
}

// Sign a sample delivery the way RevenueDot does, then handle it.
const secret = "whsec_test_secret";
const rawBody = JSON.stringify({ api_version: "1.0", event: {"id":"66339910-3BFF-49F4-B873-D1283D673DE2","type":"RENEWAL","app_user_id":"user_1","product_id":"pro_monthly","is_trial_conversion":false,"price":9.99} });
const t = Math.floor(Date.now() / 1000);
const header = `t=${t},v1=${createHmac("sha256", secret).update(`${t}.${rawBody}`).digest("hex")}`;

const seen = new Set(); // use a database table in production

function handle(rawBody, header) {
  if (!verify(rawBody, header, secret)) return "401 bad signature";
  const { event } = JSON.parse(rawBody);
  if (seen.has(event.id)) return "200 duplicate";
  seen.add(event.id);
  if (event.type !== "RENEWAL") return "200 ignored";
  return event.is_trial_conversion ? "extend access, count a trial conversion" : "extend access to the new expiration_at_ms";
}

console.log(handle(rawBody, header));
```

*Run-checked: `npm run check:snippets` runs this snippet with Node and compares its output with `extend access` (checked 2026-10-03).*

## How RevenueDot produces it

`diffSubscription` returns `RENEWAL` when the new state has a later period start and a different store transaction ID than the stored one. `isTrialConversion` is set when the stored period was a trial and the new one is not. An upgrade that starts a new period also adds `RENEWAL` after its `PRODUCT_CHANGE`.

## Related

- [What does the RevenueDot webhook event INITIAL_PURCHASE mean?](https://revenuedot.app/docs/webhooks/webhook-initial-purchase.md)
- [What does the RevenueDot webhook event BILLING_ISSUE mean?](https://revenuedot.app/docs/webhooks/webhook-billing-issue.md)
- [What does the RevenueDot webhook event EXPIRATION mean?](https://revenuedot.app/docs/webhooks/webhook-expiration.md)
- [RENEWAL fields and a recorded example payload](https://revenuedot.app/docs/api/webhook-events.md#renewal)
- [Webhooks guide: set up, verify and test](https://revenuedot.app/docs/guides/webhooks.md)

## Source

- [RevenueDot docs: which webhook events RevenueDot sends](https://revenuedot.app/docs/api/webhook-events)
- [RevenueCat: webhook event types and fields (the format RevenueDot follows)](https://www.revenuecat.com/docs/integrations/webhooks/event-types-and-fields)
- [RevenueDot core: events.ts (the event types and the rules that derive them)](https://github.com/revenuedot/revenuedot/blob/main/packages/core/src/events.ts)
- [RevenueDot server: services/events.ts (how an event is recorded and delivered)](https://github.com/revenuedot/revenuedot/blob/main/apps/server/src/services/events.ts)
- [RevenueDot server: services/purchases.ts (where store changes become events)](https://github.com/revenuedot/revenuedot/blob/main/apps/server/src/services/purchases.ts)

Checked: 2026-10-03
