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
changed apiVersionMatch in EventDataObjectDeserializer to test if the release identifier of the webhook event api version matches the identifier of the pinned version. this false for any api event version that does not have an identifier, except in specific test scenarios
updated tests to match
Changelog
Update webhook event processing to accept events from any API version within the supported major release
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