#prasanth_20580

1 messages ยท Page 1 of 1 (latest)

strong pikeBOT
shy umbra
#

๐Ÿ‘‹ happy to help

rustic niche
#

Last time when i asked somebody explained as below

shy umbra
#

just a quick question what type of Checkout Sessions are you using? mode payment, subscription or setup?

rustic niche
#

On checkout.session.completed, you want to expand the PaymentIntent, then the PaymentMethod inside it
Then look at this card.funding property
This we could expect in checkout.session.completed payload

#

mode - payment

#

This is the webhook payload we get

#

"payment_intent": "pi_3NfzxMSGmHNfieam01pQlfYS", - I am seeing payment Intent as a single API

shy umbra
#

ok then what you need to do is use the PI retrieve API
https://stripe.com/docs/api/payment_intents/retrieve and add the expand parameter to include payment_method https://stripe.com/docs/api/expanding_objects

rustic niche
shy umbra
#

yes you can either retrieve the Checkout Session and expand on payment_intent.payment_method

#

or you can retrieve the PaymentIntent and expand on payment_method