RevenueCat webhooks: prevent duplicate renewal records
Keep retries from inflating subscription revenue. Track the event ID, save the receipt durably, and test duplicate delivery.

A RevenueCat renewal reaches your endpoint, your backend records the sale, and the response gets lost. If the delivery is retried, recording it again inflates your revenue. Protect the effect your application produces, not just the webhook endpoint.
Start with the event ID
RevenueCat's webhook documentation recommends tracking the provider’s event ID because a delivery can repeat. When your receiver handles more than one independent integration, scope the receipt key to the source it belongs to. Do not collapse all renewals from one subscriber into a single receipt: successive renewals are distinct events.
Separate delivery counts from processed events. Three deliveries of event A and one of event B amount to four received requests and two distinct events. Counting both measures tells you whether retries are rising without suggesting that sales rose.
Acknowledge durable receipt, not an in-memory task
Verify the request as described in the provider’s documentation, then durably record the event under a unique key. In a database-backed design, commit the receipt and queued work together before acknowledging receipt. If a repeated request matches an already committed receipt, acknowledge it without creating more work.
Drop a network connection after commit in a test. On retry, the same receipt should already exist. If the database fails before commit instead, the second delivery should still be able to save it. A fast response is useful only if it does not silently lose accepted work.
Make processing safe to repeat as well
The worker can also fail after performing an effect. Use the event key as a unique constraint on the resulting ledger entry, or carry it to a downstream system that supports idempotency. For updates to subscription access, also account for late delivery and consult trusted current state rather than treating the last request received as the latest business event.
Prove the difference with a small test
In a test environment, send the same synthetic renewal twice, then send a second event with a different ID for the same test subscriber. Expect two unique renewals, not one or three. Record the receipt key, processing status and duplicate count without copying entire customer payloads into operational logs.
Submetry's RevenueCat integration guide explains how its ingestion deduplicates retries and separates sandbox events. If you are considering it for your app, join the Submetry launch waitlist.