#danya3781
1 messages · Page 1 of 1 (latest)
You will be able to find the charges ID in charges.data[0].id from the Payment Intent object
My problem is that when I do this, the charges.data array is empty @limpid ember
Could you share the Payment Intent ID (pi_xxx)?
Yes. It should be a testing Payment intent: pi_3MCDtpBZAdsh60Nm1R3fyC2C
Charges will only be available for transfer when the payment is succeeded. pi_3MCDtpBZAdsh60Nm1R3fyC2C is still in incomplete status: https://dashboard.stripe.com/test/payments/pi_3MCDtpBZAdsh60Nm1R3fyC2C
Ok, so in order for this to work, do I need to set up a webhook to listen for charge.succeeded event?
Since you're using PaymentIntent, you may listen to payment_intent.succeeded event. You will be able to find charge ID from charges.data[0].id under PaymentIntent object in the event body
Thank you very much for the help/advice. I will try this. I will say the docs https://stripe.com/docs/connect/charges-transfers#transfer-availability aren't very clear about this, not sure if you can pass that on at all haha
Thanks for the feedback. I'll forward to the team.
I just found the doc about identifying the charges from a Payment Intent with different API versions and this may explain more clearly: https://stripe.com/docs/payments/payment-intents/verifying-status#identifying-charges