#beinggandhi-event-checkout
1 messages · Page 1 of 1 (latest)
we recommend checkout.session.completed
Once you get that event you can look at the associated Charge
in the session object there is only payment intent
sure but a PaymentIntent has charges which has the full charge object
chargeObj = paymentIntent['charges']['data'][0]
chargeId = chargeObj['id']
receiptUrl = chargeObj['receipt_url']
seems we need to do another retrieve on paymentIntentId we get from the session object
let session = await stripe.checkout.sessions.retrieve("cs_test_b1YXdKcCybCTnZQwFovMEjaU2jlrZP9FKkS9xhBddjDIEEsOlx3QXHhZCu")
Yeah but the session object we will be receiving is from the event payload for checkout_session_completed
can you check this event : "evt_1LGAM8Haof0IjCDrTsSewuUi"
that's normal