#vivsriva01

1 messages · Page 1 of 1 (latest)

tender prairieBOT
strange lake
#

When you say payment object, do you mean PaymentIntent?

split karma
#

No, the payment object in itself.

strange lake
#

What object are you referring to exactly? Can you share an example so that I am on the same page?

split karma
#

I have this checkout and I want to correlate it with a payment object.

strange lake
#

Can you specify what are you referring to as "payment" object?

split karma
#

I am using the Stripe firebase extension and I see the checkout_sessions and payments are created as collections within

#

customers

strange lake
#

So those are PaymentIntent objects (pi_xxx)

split karma
#

ok, got it. Thanks for clarifying.

strange lake
#

Two ways to associate them to a checkout session

1/ List all Checkout Session API with payment_intent parameter
https://stripe.com/docs/api/checkout/sessions/list
It should get you the Checkout Session that created it

2/ If you already have a checkout session ID and trying to look up the relevant payment intent then you can retrieve the Checkout Session
https://stripe.com/docs/api/checkout/sessions/retrieve

Make sure to expand payment_intent
https://stripe.com/docs/api/checkout/sessions/object#checkout_session_object-payment_intent
https://stripe.com/docs/api/expanding_objects