#lam_api
1 messages · Page 1 of 1 (latest)
Below are links to other discussions we've had with you in the past week in case you want to review that information. If your question is related to one of these previous discussions, please provide a comprehensive summary of the current state and what you need help with now. We help many users simultaneously, so a summary allows us to resolve your issue as soon as possible.
- lam_refund-expansion-charge, 16 hours ago, 25 messages
đź‘‹ 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.
⏱️ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.
đź”— 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/1245198844547829791
📝 Have more to share? Add more details, code, screenshots, videos, etc. below.
hello! With our strongly-typed libraries (java, dotnet, go) each library version is pinned to a specific Stripe API version - so if your webhook endpoint is pinned to a newer API version, your webhook code won’t be able to correctly deserialize the event if you’re using a library that’s pinned to a older API version (and vice versa)
which programming language are you using?
java with latest version
i checked that use latest 2024 api version as well
we have integrated and it's working ok
for the FE StripeJS we are also added API Version option for latest API version
but react-native seems be using lower version
react-native: 2020-08-27
if both webhook and your code are on the latest version, then it should work. Generally, how you want to go about changing the webhook version is to :
-
Create a new, disabled webhook endpoint pinned to the new API version you want to test - you can use the same URL as your original webhook endpoint but add a query param so that you can distinguish between events sent to the two different endpoints. You can also update your existing webhook endpoint to add the query param as well.
-
Update your webhook code to handle events for both endpoints - this is where the query param for the new endpoint comes in handy - if you didn’t have the query params you’d have to deserialize each event or try signature verification with multiple secrets to know which endpoint/API version an event was created for. Update your code to check the query param and do the following based on which endpoint the event was sent to: Check which API version the client library is pinned to and only process an incoming event if the event’s and client library’s API version match. Switch which webhook secret to use for signature verification
-
Update your webhook code to ignore events that fail to deserialize - either return an error (so that Stripe retries these events automatically later) or return a 200 (making sure to store the raw payload in case you need to rollback and manually process these missed events later).
-
Enable the new webhook (you can still leave your old webhook endpoint enabled).
Check which API version the client library is pinned to and only process an incoming event if the event’s and client library’s API version match. Switch which webhook secret to use for signature verification -> So we should use the same API version with client lib?
your webhook API version should be the same API version as the client library you're using in your backend server code
ok
how about FrontEnd like StripeJS and Stripe-reactnative?
those lib are using for Stripe API confirm payment intent handlers
for StripeJS i can control the API version
but did not see that option for strip-react-native
is there any issue with that?
you can't really control the version for stripe-react-native. The API version used is tied to the library version for the underlying mobile SDK versions from what I recall
so is that ok if still using the diff version?
there's usually no issue with using a diff version on the frontend, but again, I can't say with 100% certainty. You should test to make sure all your features work as expected
ok