Automately
Your payment succeeded twice in the activity log. How many seats should exist?
Design a retry-safe workshop registration using a duplicate event and a delayed confirmation.
A customer pays for a workshop, a receipt arrives, and the host sees two seats reserved. The obvious explanation is a second purchase. Another possibility is that one payment notification arrived twice. Stripe’s webhook guidance tells developers to expect duplicate events and discusses recording processed event IDs. Start your automation design with that possibility. Stripe • Webhook deliveries and duplicates
Draw three records on paper: the checkout or business purchase, the seat reservation, and the confirmation message. They answer different questions. A webhook delivery is a notification about a change. The purchase determines what the customer bought. The reservation records what you owe them.
Replay the same notification
| Test input | Expected record |
|---|---|
| One completed single-seat purchase | One reservation tied to that purchase. |
| The same notification delivered again | The existing reservation, with the repeat delivery recorded. |
| A second genuine purchase from the same email | A second reservation if the terms allow it. |
| Reservation succeeds, confirmation is delayed | One reservation with a confirmation still due. |
Use a test account and fictional attendee. Reconcile by the identifier for the purchased item or order and its quantity. Email alone collapses legitimate repeat purchases. If processing runs concurrently, make the uniqueness check and creation part of a single durable operation. Track the confirmation separately so a mail retry cannot allocate another seat.
At the end, give a colleague only the records. Can they tell the customer whether their place is held and whether a message still needs to go out? Automation is doing its job when the human can answer that question even after a partial failure.