You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It looks like the request property of the Event object that one gets from a webhook has changed in the newer versions of the API, resulting in an error:
Error in $.request: parsing Text failed, expected String, but encountered Object
The eventRequest has a type Maybe Text, however, one gets an object from Stripe:
Perhaps worth noting is that newly created Stripe accounts seem to use the newest Stripe API at the time of their creation and there is no option to downgrade.
AFAIK the Events API (webhooks specifically) follow the latest stripe version, but other APIs (customers, etc.) use the version that is hard-coded in the HTTP header. So it's possible to use your own JSON decoding method just for stripe webhooks (that corresponds with the API version on your account), and this library for everything else.
For what it's worth, it turns out you can request specific API versions for webhook payloads. You can do this either in the dashboard UI when creating webhooks or when using the API to create webhooks. If you use the dashboard, you are limited to choosing API versions at least as new as the default for your account and if that restricts your options to only one API version, the UI for choosing a version doesn't even appear. If you use the API, as far as I can tell, you can ask for any version you want.
It looks like the
request
property of theEvent
object that one gets from a webhook has changed in the newer versions of the API, resulting in an error:The
eventRequest
has a typeMaybe Text
, however, one gets an object from Stripe:This change happened in version 2017-05-25.
Are there any plans to support newer versions?
The text was updated successfully, but these errors were encountered: