---
title: "Discussion on \"Stripe Webhooks in Spring Boot: Signatures, Idempotency, Out-of-Order Events\" | Hashnode"
description: "Discussion on \"Stripe Webhooks in Spring Boot: Signatures, Idempotency, Out-of-Order Events\". 20 concurrent deliveries of the same event all returned 200 and applied once. A naive handler returned 200 for invoice.paid arriving first and left invoice_paid=false."
url: "https://hashnode.com/posts/stripe-webhooks-spring-boot-signatures-idempotency/6affba79ec089934c2a3b8f8"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [Stripe Webhooks in Spring Boot: Signatures, Idempotency, Out-of-Order Events](https://gowthammuthuvel.hashnode.dev/stripe-webhooks-spring-boot-signatures-idempotency?utm_source=hashnode&utm_medium=feed)

20 concurrent deliveries of the same event all returned 200 and applied once. A naive handler returned 200 for invoice.paid arriving first and left invoice\_paid=false.

Nov 20 · 14 min read · gowthammuthuvel.hashnode.dev  
Read the article

-   [#spring-boot](https://hashnode.com/tag/spring-boot)
-   [#webhooks](https://hashnode.com/tag/webhooks)
-   [#java](https://hashnode.com/tag/java)
-   [#payments](https://hashnode.com/tag/payments)
-   [#stripe](https://hashnode.com/tag/stripe)

## Written by

[Gowtham Muthuvel](https://hashnode.com/@GowthamMuthuvel)

@GowthamMuthuvel

  
[View profile](https://hashnode.com/@GowthamMuthuvel)

Full-stack developer | Java, Spring Boot, React | Senior Backend Developer

## Responses 1

Markdown supported · ⌘↵ to post

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

[Nov 20](https://hashnode.com/posts/stripe-webhooks-spring-boot-signatures-idempotency/6affba79ec089934c2a3b8f8/comment/6b00012c23ba5fea5dcd4d4b)

Good call putting invoice.paid before subscription.created in a runnable test. It's an easy one to drop without noticing. The failed side has a similar trap: invoice.payment\_failed puts the subscription in past\_due, and when retries run out Stripe applies whatever ending is set under Retries, so the access check has to follow that too. I wrote up how that ending ends up counted as churn here: [retryfix.com/blog/what-is-involuntary-churn](https://retryfix.com/blog/what-is-involuntary-churn)
