#Rejesto - checkout session
1 messages ยท Page 1 of 1 (latest)
Hi yes this is possible. You can retrieve the session and look at the status: https://stripe.com/docs/api/checkout/sessions/retrieve
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
You can also use webhooks to get notified: https://stripe.com/docs/api/events/types#event_types-checkout.session.completed
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
Nice, thank you very much ๐
But payment_status may be a better field to look at instead of status (depending on your end goal): https://stripe.com/docs/api/checkout/sessions/object#checkout_session_object-payment_status
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
in order to use this, I'm assuming I have to access the stripe API with the Session ID I am looking to check the status of.
Right now Stripe is autogenerating these for me.
Would it be easier (or even possible) for me to generate my own IDs for these transactions and pass them to my DB so I can reference them easier when trying to access the transaction?
Or is there a way to pass through the ID generated by stripe when I create the checkout session?
What's your end goal?
If I knew a little bit about what you're building and what you're trying to do, I could provide a better suggestion
But all those id's are generated
You would have to store them on your side if you want to keep track of them
Well first of all I'm using Django;
I'm trying to check on my "checkout success" page if the transaction has actually succeeded before starting work on my site.
I'm just doing this to combat people simply pasting the success url and getting free work on my site.
I recommend reading this guide then: https://stripe.com/docs/payments/checkout/fulfill-orders