#LucaW
1 messages ยท Page 1 of 1 (latest)
Hi Tarzan ๐
๐ happy to help
For example this payment intent:
please give me a moment and I will be with you shortly
pi_3MI9GXK1xWAYzvtr1HWd0Cer
Sure
I will quickly address the problem. I've exported the history of my balance via stripe dashboard, and in some column "Source" is set as py_etc... if i navigate to that payment intent like "py_3MISAvK1xWAYzvtr0jUupRFY" it redirects me to "pi_3MISAvK1xWAYzvtr0Ocr21pA".
In my database I save the transaction but with the payment intent that starts with pi...
I would like to retrieve the py_ from a pi_
?
a py_xxx object (that has object:"payment" )is a Charge object (it's the same thing as a ch_xxx but it's different for ... reasons) so you can retrieve it with the Charge retrieve endpoint, and the object has the linked payment_intent ID
The charge endpoint returns the pi_xxx still
Nono, I've in my database the pi_xxx and I would like to retrieve the py_xxx
Hey Karllekko sorry for the delay, but it still returns the pi_xxx
with other additional data inside the latest_charge object
right
which will have an id:py_xxxx , a bunch of other stuff, and a payment_intent:pi_xxx
so what's the problem?
then that is the correct ID
it's the ID of the latest, successful charge on that PaymentIntent, which was a card payment in the end
so I guess what you are actually looking for here are the previous unsuccessful SEPA Debit payment attempts
(ch_xxx is used for card payments, py_xxx is used for non-card payments, for the ...reasons I alluded to earlier)
so anyway you just want to list the PaymentIntent's charges then https://stripe.com/docs/api/charges/list#list_charges-payment_intent to get all of them , one of which will be the py_xxx you're looking for
@violet lintel let me know how you get on
Oh okay I got the point now, I didn't know that, indeed on another payment intent retrieve it returns correctly the id:py_xxx. Thanks for the patience