#Lustful
1 messages ยท Page 1 of 1 (latest)
The recommendation is to handle psot-payment/fulfilment actions via async webhooks, yes. There's no guarantee users follow the redirect to your success_url
I understood this: if I declare this: https://test.com/success?session_id={CHECKOUT_SESSION_ID} in my CheckoutSession, as susccess_url, Stripe send user there, filling properly the Id. Then in my success i can get the checkout_session_id. But with that, how do I get the data?
I am quiete noob in Stripe, and have not much time (my customer is always on tight milestones) to study the webhooks system
Then in my success i can get the checkout_session_id. But with that, how do I get the data?
You'd make an API request to this endpoint: 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.
But as explained, that's not really recommended for anything other than displaying a order confirmation page or similar. For fulfilment actions, like database writes, use a webhook
I know you are right ๐ And will do correctly later. But the thing I need now is only to ensure if stripe goes to success_url, the payment is OK. And this is the fastest way to get some data from there.
Is the same template in failure_url?
You can use the {CHECKOUT_SESSION_ID} template with cancel_url yes