A reader raised a painful case on my earlier Stripe webhook article: a duplicate invoice.payment_failed delivery that sends two card-declined emails. Preventing a duplicate database update does not automatically prevent that second email. The important question is which effects share the transaction that claims the event.
My previous article describes the inbox approach. This follow-up examines its boundary, using commit 53545ae63fa289f5892e6ec57565068910601b78 of stripe-webhooks-dotnet .
First, the scope: this sample does not implement failed-invoice emails. Its payment handler supports successful payment intents and refunded charges. The reader's scenario is an extension to consider, not a feature demonstrated by this repository.
The inbox and the worker solve different races
The repository overview describes insert-first deduplication at receipt: a unique event identifier prevents repeated deliveries from creating multiple inbox records.…