#Jerry Jose
1 messages · Page 1 of 1 (latest)
👋 Hi there, Happy to help!
instead you can get the Checkout Session Id on the redirect page, You retrieve the checkout session
https://stripe.com/docs/payments/checkout/custom-success-page
There you'll get the payment_intent Id
https://stripe.com/docs/api/checkout/sessions/object#checkout_session_object-payment_intent
the Payment intent looks null after redirect to checkout page (on session create)
Could you please share a Checkout Session Id ?
cs_test_a1Nr3qLSIaqmu4VTTut9Zp9A4Ygo1F8lR9oyqbbdah7PphjpdUVUodUYQN
Thanks for sharing
This Checkout Session, is still Open, which mean there is no Payment attempt yet, that's why there is no PaymentInent attached to it also
So the payment intent will be generate after the payment session completed, am I correct?
Yup!
Ok thanks,
Can we use payment session id as payment reference?
FYI, this was a recent API version change:
A PaymentIntent is no longer created during Checkout Session creation in payment mode. Instead, a PaymentIntent will be created when the Session is confirmed.
https://stripe.com/docs/upgrades#:~:text=A PaymentIntent is no longer created during Checkout Session creation in payment mode. Instead%2C a PaymentIntent will be created when the Session is confirmed.
So that will explain if this is different behaviour to what you've seen previously
Depends, in some instance that cs_xxx ID will remain uncompleted (and expire) so there won't be an actual payment made. You should listen for checkout.session.completed events, which will contain a payment_intent
thanks