#Arie - charges
1 messages ยท Page 1 of 1 (latest)
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?
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.
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
could you please send me an event id evt_xxx?
evt_1KybR2A19zT3iUBIJ7WUtnaD
I've also tested with 2020-08-27
how did you test it?
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].
this is the message from the Stripe CLI right?
Correct
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
Ah, that might have been api_version: "2019-10-17"
exactly
and yes the source field is deprecated and no longer exist on the latest API version
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
one more thing to note here is that the Charges API is no longer recommended and we highly recommend moving to Payment Intents https://stripe.com/docs/payments/payment-intents/migration-synchronous
or
a better option https://stripe.com/docs/payments/payment-intents/migration
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 ๐