#Zeel Darji-PI-Sub-ID-Checkout

1 messages · Page 1 of 1 (latest)

kind boltBOT
grand frigate
#

Hello 👋
I believe the API was recently updated to generate PaymentIntent ID at the confirmation time and not a creation time.

polar plover
#

Then when I will get payment intent Id and subscription ID?

grand frigate
#

Yeah I don't think we generate PaymentIntent or subscription ID until the checkout session is completed/confirmed.
Can you expand on why you need these IDs prior to completing the checkout session?

polar plover
#

okay then when I got these Ids?

grand frigate
#

When you complete the checkout session

polar plover
#

You mean when webhook called?

grand frigate
#

That's one way to put it.
These IDs will be generated once the customers complete the checkout flow. You should be able to see it on checkout.session.completed event I believe.

polar plover
#

Is there any other way?

grand frigate
#

I don't think there's a way to generate these IDs prior to completing the session
Is there a reason why you want it that way?

polar plover
#

I am concerned if I will get it on checkout.session.async_payment_failed ?

grand frigate
#

That event is generated for non-card delayed notification payment methods
The other option would be to pass the checkout session ID to your success page and then making an API call to retrieve the checkout session / PaymentIntent / Subscription
https://stripe.com/docs/payments/checkout/custom-success-page

#

Zeel Darji-PI-Sub-ID-Checkout

polar plover
#

Probably last question @grand frigate , just want to confirm we will not get Payment Intent Id if we are using subscription mode right?

grand frigate
#

Yes we don't create PaymentIntents when checkout session is created

#

regardless of subscription or payment mode

polar plover
#

I'm asking for when webhook called

grand frigate
#

Do you mean when checkout.session.created event is generated?

polar plover
#

checkout.session.completed

#

checkout.session.created webhook event is not listening

grand frigate
worn cloak
#

once the Checkout Session is completed, then you get all the information

polar plover
#

Not getting payment intent ID

worn cloak
#

that's expected, this is for a Subscription

#

there's no PaymentIntent id in that case, there's a Subscription id, that's all you need