Get charge id associated with Stripe checkout session

Viewed 711

I am using Stripe checkout sessions. I am capturing 'checkout.session.completed' webhook. I need to know charge id associated with the session so I can refund the customer later. I am not finding any reference to charge object in the session object.

How can I get charge object associated with checkout session?

I tried capturing charge object in charge.succeeded webhook, but it doesn't have any reference to the price object customer used to purchase.

1 Answers
Related