#dvsk
1 messages · Page 1 of 1 (latest)
So you can't update the API version as far as I know. You would need to create a new Webhook endpoint if you want to use a different version
how can I do it?
Using the API: https://stripe.com/docs/api/webhook_endpoints/create#create_webhook_endpoint-api_version
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
hmm yeah so how can I handle each event in this case? I mean how can I write code inside each event? I think the API gives enabled_events parameter but its just as names right but no option to write the code inside each event?
What do you mean "write the code in each event"? Events are Stripe objects that contain nested Stripe objects and they get sent to a webhook endpoint. There's no "writing code" in an Event
no, I mean say suppose I have checkout.session.completed event and I want to write fulfilment logic in there, to update my database saying that the amount is paid by a particular user
You would include that in the handler you write which listens for that particular event: https://stripe.com/docs/webhooks
Oh I think now I got the complete picture...
So, say Stripe releases a new version and I see that it automatically gets updated to my dashboard in contrast to this statement here, "When a breaking change is introduced to the Stripe API, a new dated version is released. To avoid breaking your code, we don’t change your version until you’re ready to upgrade." in https://stripe.com/docs/upgrades
Am i missing on something? I actually have events/logs from two versions, 2022-08-01 version also, in my dashboard and I don't remember upgrading it to the current version manually...
So there are 2 things at play here:
(1) your Account's default API version, and
(2) your webhook endpoint's API version
Which one are you talking about?
Sorry but both of them..
What problem are you hoping to solve? I don't understand what you're asking
Please let me know if I get any notification on the dashboard or to the email asking me that there is a new version released and if I want to upgrade?
You can subscribe to our changelog if you want email updates: https://stripe.com/docs/upgrades#stay-informed
ok, thank you
one last question please.. when going live, do my products, payment links, webhooks, branding etc be still available or do I need to create them again?
As long as your live mode settings and you test mode setting match, they will be the same
don't mind but what do you mean by settings? I understood that Branding, sending emails should be toggled in settings and they remain in live mode too. What about payment links, products and webhooks?
Many of these things have live mode and test mode settings. I would suggest toggling between test and live modes to see how/if they change.
From the code/API side, the only difference is what API keys you use.