#paly
1 messages · Page 1 of 1 (latest)
You can get the PaymentIntent ID with the Checkout Session that is returned from the create call. It is a part of the Checkout Session object https://stripe.com/docs/api/checkout/sessions/object#checkout_session_object-payment_intent
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
that means as soon as I get the checkoutId while creating a checkout session, I need to make another call to get the paymentID. right?
The create call itself will return a full Checkout Session object
You can see the PaymentIntent ID without retrieving the session again
I am not see the paymentInten in the objec. Not even in the logs
I hit this curl
curl https://api.stripe.com/v1/checkout/sessions
-u sk_test_51LWfCbEKi7TmDGM93Jsvjz7H1VrtmZl95zJQm9xmyxpOAywbp1eek5Erl5Ml2fHIvcGP5jL05KesSxWmpmuMNvnl00yXMyNgdW:
-H "Stripe-Account: acct_1NdvZzBzcSw7JdYb"
-d "payment_method_types[0]=ideal"
-d "payment_method_types[1]=card"
-d "line_items[0][price_data][currency]=eur"
-d "line_items[0][price_data][product]=prod_OUVvnJhlYPTyty"
-d "line_items[0][price_data][unit_amount]=700"
-d "line_items[0][quantity]=1"
-d "mode=payment"
-d "success_url=https://example.com/success"
-d "cancel_url=https://example.com/cancel"
Can you send me the ID of the Checkout Session that that call created?
"id": "cs_test_a1gx2TXYvglxB8EnE6dkUTGqab926nfqfa3j0FWORlGHyXd2jCh9qtlZT8",
payment_intent is null in the response
Thank you for providing the ID. Checking in to why that is. I see an ID in my calls wiht similar parameters, looking in to what the difference is.
Ah, this was a change in the API version that you are using 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.
Apologies, I forgot about that change.
that means I am using the older version or i am on correct version
So it may be better to use the checkout session ID and the checkout.session.completed event
Actually I was siupposed to use the checkout.session.completed event but when I am seeing the payment logs on stripe connect account It's not seinding the above webhook instead of it I am getting payment.intent
can you look at
acct_1NdvZzBzcSw7JdYb/payments/pi_3NhYMFBzcSw7JdYb1F3j5xgg
There was a checkout.session.completed event created for that Checkout Session. Is is possible that your existing webhook endpoints weren't subscribed to that specific event type? https://dashboard.stripe.com/test/events/evt_1NhYMkBzcSw7JdYbOhSB3b7t
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.
Let me check