#bstny_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.
- bstny_api, 1 day ago, 18 messages
- bstny_webhooks, 3 days ago, 7 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/1240634266065440821
๐ Have more to share? Add more details, code, screenshots, videos, etc. below.
hi there!
you have two options:
- update your default API version in the dashobard
- or when you make an API request, set the API version in the hreader like this: https://docs.stripe.com/api/versioning
I will try to debug further the PHP api version. but it seems right
Give me a moment please
in the request you shared, no API version was set, so we used the deault API version of the account (2020-08-27)
Hmmm
I have set the Stripe::setApiVersion('2024-04-10'); in service provider, seems it does not work anyway
It must be some legacy thing deep inside the code
Thank you anyway
This should be the fault ๐
can you try setting the API versino on the API call directly? you can find some examples here: https://docs.stripe.com/libraries/set-version#setting-the-api-version
I don't think so, we are using some strange wrapper around, anyway it is on my head from there
Thank you, this helps a lot
happy to help ๐
Strange, I don't see any header data
Can you verify the stripe version header has been sent?
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.
same as before: no API set, so we used the default one.
looks like you are using the Stripe CLI?
I do use the stripe CLI, can I inspect the event details?
what command are you running exactly? to change the API version, you should use something like -v 2024-04-10
stripe listen --latest --forward-to https://foo.dev:443/webhooks/stripe --events invoice.created,invoice.payment_succeeded,invoice.payment_failed,customer.subscription.deleted,customer.subscription.trial_will_end,payment_intent.succeeded,payment_intent.processing,account.updated
Ready! You are using Stripe API Version [2024-04-10]
can you add -v 2024-04-10 to your command?
oh, wait, you are using stripe listen? in this case you can only use your default API version or the latest API version
to use the latest, use this flag: https://docs.stripe.com/cli/listen#listen-latest
you cannot set a specific API version in this case.
which API version do you want to use when forwarding the events?
'2024-04-10'
can you add the --latest flag as mentioned in the link I shared above?
I am using it, the CLi echoes "Ready! You are using Stripe API Version [2024-04-10]"
that's what you wanted, no? so what's the issue? I'm confused.
The request send from PHP sdk is recognized by dashboard as 2020
According to the logs, I am using the stripe-version header and it contains the 2024
but these are completely different things
- you set stripe listen to API version
2024-04-10, so the events you will receive will be from2024-04-10 - but that doesn't change the API version used when you make your API calls
Can I change the API version I am using without changing the default API version?
yes, I already shared the link explaning how to do this: https://docs.stripe.com/libraries/set-version#setting-the-api-version