#krs_webhooks

1 messages ¡ Page 1 of 1 (latest)

rigid inletBOT
#

👋 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.

sly spear
#

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

#

the only options in the dashboard are your account's default version, or the latest release

wraith current
#

where do i check the accoun'ts default api version?

sly spear
wraith current
#

I am unable to downgradeit here, but I can only see the version.

sly spear
#

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

wraith current
#

webhook data is sent in a different format, which our platform is not able to undersstand

sly spear
#

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

wraith current
#

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

sly spear
#

so you expect to not receive 'parent.subscription_details.subscription'?

wraith current
#

I expect it to receice directly on object.subscription - as like the screen shot above

#

this is not present in the problematic envet

sly spear
#

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

wraith current
#

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)
sly spear
wraith current
#

ok. I got it now.

#

i was not expanding that event to see it

sly spear
#

cool! this is a relatively frequent point of confusion so totally understandable

wraith current
#

thanks