#nimby_09436
1 messages · Page 1 of 1 (latest)
Can you share examples? Most likely, those checkout session must not have been completed yet
I have one with "id": "cs_live_b1GPo1zUnJYJcpMS8YpIWv9fF3u3BrgyDrz7TbU32ByhIteK2ghvPssq0h" which also has status: completed
For subscriptions, I believe the payment intent is nested under the invoice object
So if I was to use the invoice field within that checkout session to pull that invoice, I should be able to find a payment intent field that is always populated?
For subscriptions, yes. For one-time payments, you'd find it under payment_intent field on the Checkout Session
The ID of the PaymentIntent for Checkout Sessions in
paymentmode.
Okay thank you. So if I am listening for payment_intent.succeeded, I should then check if the subscription field is null for the session, and can then progress dependent on whether or not it is a subscription?
You can check the mode
https://stripe.com/docs/api/checkout/sessions/object#checkout_session_object-mode
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
Thanks so much!