Hey Dashiell,
We usually recommend handling operations like sending email receipts or recording authorized access to your product from within the webhook handler. The idea is that your code will receive the `checkout.session.completed` event and handle sending the email receipt at that point for example. This is important as your customer could close the browser before being sent back to your website or they could simply lose the connection during the redirect.
If you do it this way, the redirect should simply be checking the state of the payment either in your database or by retrieving the Session via the API [1] and then displaying a success message which would be idempotent and not break the design patterns you are mentioning.
Ultimately though, I would say those design patterns are more guidelines than strict rules. If I were building this myself I would check the record in my database during the redirect and if I haven't yet processed the event I would run the same operations my webhook handler would before displaying the success. While this is performing a write during the redirect, it's ultimately idempotent and doesn't really go against the spirit of the design!
I hope this helps!
Remi