The Idempotency-Key HTTP Header used by Stripe could be very useful to add as a bweb middleware. It can be used to prevent the same effect twice, meaning that you can send the same request twice and be sure that it only has the effect once. This is useful for when sending value and edge cases around failed requests.
https://stripe.com/blog/idempotency