---
title: "Comment by Paul Hartness on \"Stripe webhooks in Next.js: verify, deduplicate and process each event once\" | Hashnode"
description: "Storing first and reading current state from Stripe is the right call, and it matters most for anything that contacts the customer. If the sweeper picks up an i"
url: "https://hashnode.com/posts/stripe-webhooks-in-next-js-verify-deduplicate-and-process-each-event-once/6ae86d2557dd48491df9ec27/comment/6aeaf8570e75c729b805d936"
---

[Discussion](https://hashnode.com/posts/stripe-webhooks-in-next-js-verify-deduplicate-and-process-each-event-once/6ae86d2557dd48491df9ec27)

Comment [Stripe webhooks in Next.js: verify, deduplicate and process each event once](https://hashnode.com/posts/stripe-webhooks-in-next-js-verify-deduplicate-and-process-each-event-once/6ae86d2557dd48491df9ec27)

[Paul Hartness](https://hashnode.com/@retryfix)

[Nov 4](https://hashnode.com/posts/stripe-webhooks-in-next-js-verify-deduplicate-and-process-each-event-once/6ae86d2557dd48491df9ec27/comment/6aeaf8570e75c729b805d936)

Storing first and reading current state from Stripe is the right call, and it matters most for anything that contacts the customer. If the sweeper picks up an invoice.payment\_failed event an hour late, the retry may already have succeeded. Checking the invoice status before sending a failed-payment email saves a confusing message to someone who has already paid.

[Redlio Labs](https://hashnode.com/@redliolabs)

[Nov 18](https://hashnode.com/posts/stripe-webhooks-in-next-js-verify-deduplicate-and-process-each-event-once/6ae86d2557dd48491df9ec27/comment/6aeaf8570e75c729b805d936#reply-6afd55b463ec96656f4425d0)

Thanks Paul, that's a sharper version of the point than the post makes. Anything that emails or charges the customer should re-read the current invoice or subscription from Stripe right before acting, not trust the event payload. A late payment\_failed is exactly the case where the payload is true but stale.
