#LucaW

1 messages ยท Page 1 of 1 (latest)

grave pewterBOT
violet lintel
#

Hi Tarzan ๐ŸŽ‹

verbal pebble
#

๐Ÿ‘‹ happy to help

violet lintel
#

For example this payment intent:

verbal pebble
#

please give me a moment and I will be with you shortly

violet lintel
#

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_

violet lintel
#

?

verbal pebble
#

sorry for the late reply @violet lintel

#

it's been busy

fleet void
#

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

violet lintel
#

The charge endpoint returns the pi_xxx still

fleet void
#

yep isn't that what you want?

#

ah you want the opposite

violet lintel
#

Nono, I've in my database the pi_xxx and I would like to retrieve the py_xxx

fleet void
#

then it's just payment_intent.latest_charge

#

@violet lintel did that do the trick?

violet lintel
#

Hey Karllekko sorry for the delay, but it still returns the pi_xxx

#

with other additional data inside the latest_charge object

fleet void
#

hmm

#

like yes, it returns a Charge object

violet lintel
#

right

fleet void
#

which will have an id:py_xxxx , a bunch of other stuff, and a payment_intent:pi_xxx

#

so what's the problem?

violet lintel
#

it doesn't have an id:py_xxx it has id:ch_xxx

#

request ID: req_NlEyoxyYZJyQKH

fleet void
#

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)

#

@violet lintel let me know how you get on

violet lintel
#

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