Subscription payment success webhook
Renewal webhooks should extend access reliably without duplicating invoice records or customer notifications.
Open the free generatorPersist provider IDs
Store subscription IDs, order IDs, and invoice identifiers so retries can be recognized and ignored safely.
Update access atomically
Grant or extend entitlements in the same transaction that records the processed webhook event.
Alert on unknown customers
If a renewal cannot map to a user, acknowledge carefully and flag the event for manual repair instead of crashing repeatedly.
FAQ
Should webhook retries grant access twice?
No. The same provider event should be safe to process more than once.
Can email sending happen inside the webhook?
Small emails can work, but queues or idempotent jobs are safer for slow downstream work.
Use the free sample before wiring production checkout
Download a public sample pack with fake Lemon Squeezy fixtures, signature tests, contract checks, duplicate replay tests, and CI skeletons. The Pro Kit preview shows the full paid package structure without exposing the private archive.