#danya3781

1 messages · Page 1 of 1 (latest)

opal heartBOT
limpid ember
#

You will be able to find the charges ID in charges.data[0].id from the Payment Intent object

crisp oasis
#

My problem is that when I do this, the charges.data array is empty @limpid ember

limpid ember
#

Could you share the Payment Intent ID (pi_xxx)?

crisp oasis
#

Yes. It should be a testing Payment intent: pi_3MCDtpBZAdsh60Nm1R3fyC2C

limpid ember
crisp oasis
#

Ok, so in order for this to work, do I need to set up a webhook to listen for charge.succeeded event?

limpid ember
#

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

crisp oasis
limpid ember