#anonymous_pc

1 messages · Page 1 of 1 (latest)

prime flintBOT
sick grove
#

Hi

lethal kernel
#

Flagging I already answered all those questions earlier today

sick grove
#

I didn't understand you

lethal kernel
sick grove
#

You just said read the docs

#

Ok NOW I UNDERSTAND

lethal kernel
#
2/ Refund -> PaymentIntent via the payment_intent: 'pi_123' property
3/ PaymentIntent -> Checkout Session via the https://stripe.com/docs/api/checkout/sessions/list API
4/ What's inside that Checkout Session via the line_items property

All the objects are related to each other, you need to take a few minutes to look at our API reference and connect the dots```
#

that's what I said earlier

sick grove
#
      const chargeRefunded: any = event.data.object;
      const pi = await stripe.paymentIntents.retrieve(chargeRefunded.payment_intent);
      const session = await stripe.checkout.sessions.list(chargeRefunded.payment_intent);
#

Something like this I assume

#

You can use this payment_intent as the unique ID for the session, correct?

thorn dagger
sick grove
#

got ya

#
  const session = await stripe.checkout.sessions.list({payment_intent: chargeRefunded.payment_intent});
#

like so

thorn dagger
#

Yep!

sick grove
#

Man, thank you! That other guy, is well, a typical Discord Mod.

#

man that was the 2 second nugget I needed.

#

The API docs are HUGE.

#

Thank you!

thorn dagger
#

Glad it was helpful -- we're all working hard to help support you here

sick grove
#

Understood, I'll practice patience. Cooking with fire now, thank you!