Hey All,
I'm having an issue when attempting to query the Stripe API for Events (GET v1/events
) of a particular type. This endpoint allows for a types
query parameter which is an array of strings containing the Stripe Event Types you'd like returned from the request. However, when using the Stripe Resource to query the v1/events
endpoint with a types
array, I receive an "invalid array" error from the Stripe API. I found that the URL the Stripe Resource is constructing for this request looks like this:
https://api.stripe.com/v1/events?types=customer.subscription.updated&types=customer.subscription.created
When I ran the above request in Postman, it failed as well. However, if we instead include []
after each of the types
within the query param, the request succeeds in Postman. The correct URL looks like this:
https://api.stripe.com/v1/events?types[]=customer.subscription.updated&types[]=customer.subscription.created
Is it possible to alter the Stripe Resource for the v1/events
endpoint to include the []
when constructing the request url? I know I can just filter the events after I've made the request, but it would be nice to be able to take advantage of the native API functionality to pre-filter.
Thanks!