#matthewwoodruff_webhooks
1 messages ¡ Page 1 of 1 (latest)
đ Welcome to your new thread!
â˛ď¸ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question. Thank you for your patience!
âąď¸ We automatically close idle threads, which makes them read-only. Make sure you stick around to chat in realtime! If this thread is closed and you have another question you'll need to start a new thread.
đ This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1214914552542793780
đ Have more to share? You can add more detail below, including code, screenshots, videos, etc.
Java is a strong typed prog language, the API version is pined to each SDK version
Update your webhook code to handle both the old and new version of each object.
That means you can implement two webhook endpoints and register two webhook endpoint versions
You can use a middelware for example, that check the api version in the event payload and forward the request to the Java endpoint that can handle that version
This code will prevent the object from being deserialized when the versions don't match https://github.com/stripe/stripe-java/blob/0a22df51de972314adc98b8d69f2ac4cad124dea/src/main/java/com/stripe/model/EventDataObjectDeserializer.java#L114
Yes exactly.
In other words, you can't handle two webhook events with different API version using the same Stripe Java SDK.