#Arie - charges

1 messages ยท Page 1 of 1 (latest)

fathom elm
#

Good question, not immediately sure why that may be. Looking in to it

#

Is there something specific you are trying to use the charge's source attribute for?

kindred locust
#

Well we've been using it since 2019 at least really, and the source's metadata field specifically. But it missing from the Charge object description led to this attribute being removed from an Elixir library (stripity_stripe) we use to parse the Stripe webhooks, that library listed deprecation as the reason, but I think that's a mistake on the end of that library's maintainer.

So basically, if the source attribute is there intentionally and not deprecated I'd like to keep using it, and will bother the maintainer of the elixir library to revert their change.
Or...if this field is part of the API by accident or deprecated, I'll know to switch to other methods to handle this charge.succeeded callback.

pulsar hull
#

๐Ÿ‘‹ , I'm taking over for @fathom elm

#

do you know what API version are you using?

kindred locust
#

We're using 2018-11-08 in prod right now, I've also tested with 2020-08-27. In both those API versions the webhook returns the source attribute, like I want it to

pulsar hull
#

could you please send me an event id evt_xxx?

kindred locust
#

evt_1KybR2A19zT3iUBIJ7WUtnaD

pulsar hull
#

I've also tested with 2020-08-27
how did you test it?

kindred locust
#

I used Stripe CLI to set up the webhook to my dev machine:
stripe listen -l --forward-to localhost:4005/stripe/callback

#
> Ready! You are using Stripe API Version [2020-08-27].
pulsar hull
#

this is the message from the Stripe CLI right?

kindred locust
#

Correct

pulsar hull
#

this doesn't mean you are using this version when you are creating the Charges object

#

the data of the webhook event depend on the API version used to create the Object

kindred locust
#

Ah, that might have been api_version: "2019-10-17"

pulsar hull
#

exactly

#

and yes the source field is deprecated and no longer exist on the latest API version

kindred locust
#

Ah ok, I expected the response of the webhook to change based on its API version, since you can set it when making a new webhook endpoint

pulsar hull
kindred locust
#

Thanks! And yes we were planning on moving to payment intents anyway, so I think we'll move that up ๐Ÿ™‚

Thanks a lot for your time ๐Ÿ™‚