#beinggandhi-event-checkout

1 messages · Page 1 of 1 (latest)

long shale
#

we recommend checkout.session.completed

#

Once you get that event you can look at the associated Charge

zealous narwhal
#

in the session object there is only payment intent

long shale
#

sure but a PaymentIntent has charges which has the full charge object

zealous narwhal
#

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")

long shale
#

you can retrieve the Session and expand the PaymentIntent

zealous narwhal
#

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"

long shale
#

that's normal