#Tanmoy-checkout
1 messages ยท Page 1 of 1 (latest)
Hello! Is there a specific reason you need the Payment Intent ID right after creating the Checkout Session?
Yes, I'm validating the payment after redirecting from the payment page. With payment intent ID..
Do you mind sharing both the live and test mode request IDs with me?
Sorry I can't share ๐ฆ
Is there a specific reason?
If you're uncomfortable sharing those IDs here you can always write into support (https://support.stripe.com/contact)
I don't have live credentials. I'm a freelancer and my client has it. And I can't share his info.
Could you just share the test requests?
Without the requests it's hard to confirm, but I'm guessing the live and test mode requests are on different API versions
Starting with API version 2022-08-01 we no longer create the Payment Intent when the Session is created, and instead wait until it's been confirmed
See https://stripe.com/docs/upgrades#2022-08-01
A PaymentIntent is no longer created during Checkout Session creation in payment mode. Instead, a PaymentIntent will be created when the Session is confirmed.
But here it's showing the payment_intent value: https://stripe.com/docs/api/checkout/sessions/create
๐
Stepping in as Karbi needed to step away
That API reference snippet still references the old API versions
Where a PaymentIntent would be created on Session creation
As Karbi noted, this isn't the case any more
I'll work on getting those docs updated to reflect the current version
How can I get the payment_intent value then? โน๏ธ
Or validate the payment after transaction..
Did you read the above?
The PaymentIntent is now created when the Session is confirmed
So it will still exist, just after the Session is completed instead of on creation
Sorry. But I'm doing this,
Create session -> Save payment intent to my database also save a hash with that -> add that hash with the redirect url -> make payment -> after redirect, match the payment intent with the hash -> get stripe payment details with the payment intent.
How can I process this if I get the payment intent when the session is completed?
Why do you need the PaymentIntent up front as opposed to after the Session is completed?
And have you read https://stripe.com/docs/payments/checkout/fulfill-orders?
Webhooks is really the recommended route here.
Right now, I can't use webhooks here.
Is there any alternative for PaymentIntent ?
In this update?
If you want, you can use Versioning to continue using the older API version: https://stripe.com/docs/api/versioning
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
So you can set your requests to using 2020-08-27 and you will see the behavior where the PaymentIntent is created upon Session creation