stripe / stripe-java

Java library for the Stripe API.
https://stripe.com
MIT License
818 stars 359 forks source link

Update webhook API version validation #1906

Closed jar-stripe closed 6 days ago

jar-stripe commented 6 days ago

What

Stripe API versions now contain two parts: a date part (as before) and an identifier. The SDKs validate that webhook events received are in the shape expected by the pinned version in the SDK but going forward, that will be true for different versions with the same identifier. For example, the September API release was 2024-09-30.acacia, and we expect that webhook events sent with version 2024-09-30.acacia will be compatible with an SDK pinned to 2025-10-28.acacia. This PR updates the version checking logic to make sure we don't reject webhook events incorrectly.

What

Changelog