#krs_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.
âąď¸ 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/1417484161631125534
đ Have more to share? Add more details, code, screenshots, videos, etc. below.
hey there! webhook endpoints by default will use your account's default API version, unless another version is specified when creating the endpoint
it's not possible to change the API version on an already existing endpoint
instead, you need to create a new endpoint
additionally, it's only possible to specify a lower version if you create the endpoint via the API: https://docs.stripe.com/api/webhook_endpoints/create#create_webhook_endpoint-api_version
the only options in the dashboard are your account's default version, or the latest release
where do i check the accoun'ts default api version?
you can do this in your dashboard here: https://dashboard.stripe.com/acct_1S6PVpEhT8QvjiAr/test/developers
I am unable to downgradeit here, but I can only see the version.
I tried your suggestion to create eebhook with specific api version
enabled_events = ["invoice.paid"]
stripe.WebhookEndpoint.create(
enabled_events=enabled_events,
url="https://horizonless-unpatched-cristobal.ngrok-free.app/pay/webhook",
api_version="2020-08-27"
)
but still i am getting a different version of the event - For example, in this event - https://dashboard.stripe.com/acct_1S6PVpEhT8QvjiAr/test/events/evt_1S7xypEhT8QvjiArtviuoc5W - What we see is a different version of response, which our platform is not able to understand
do you mean the version you see in the dashboard, for that event, or the version used in the webhook data?
Stripe renders the event twice: Once for the event, using the account's default verion, and again for the webhook, using the version set on the endpoint
webhook data is sent in a different format, which our platform is not able to undersstand
can you clarify what exactly is different to the format you expect?
it might help if you could share an event ID for one that used the correct format that you expect
evt_1S7xypEhT8QvjiArtviuoc5W used version 2020-08-27, which you can see in the webhook payload
in the invoice.paid events data object, the assoicationed subscription will be present directly as "subscription" node - This is what our system understand. But in the problematic webhook event, the assoicated subscription is present inside "parent.subscription_item_details.subscription"
expected by our system
so you expect to not receive 'parent.subscription_details.subscription'?
I expect it to receice directly on object.subscription - as like the screen shot above
this is not present in the problematic envet
on my side I can see that 'object.subscription' is included in the version of evt_1S7xypEhT8QvjiArtviuoc5W sent to your webhook
it's not visible in the dashboard-rendered event, but if you expand the webhook conversation you should be able to see it
additionally, the webhook was successfully delivered
just to clarify, the top-level version of the event shown in the 'Events' page of the dashboard uses the sandbox's default API version
but the actual webhook data uses the 2020-08-27, which you can see when you expand the webhook conversation
I am not able to see what you see - I am not able to see subscription and also version on this event
I tried with SDK too
Out[70]: 'in_1S7xymEhT8QvjiAra94jegZY'```
In [69]: stripe.Event.retrieve("evt_1S7xypEhT8QvjiArtviuoc5W").data.object.subscription
---------------------------------------------------------------------------
KeyError Traceback (most recent call last)
in the dashboard, can you confirm if you've looked in the section under 'Webhook attempts' in this page: https://dashboard.stripe.com/acct_1S6PVpEhT8QvjiAr/test/events/evt_1S7xypEhT8QvjiArtviuoc5W
cool! this is a relatively frequent point of confusion so totally understandable
thanks