#rian-a-_api
1 messages ¡ Page 1 of 1 (latest)
đ Welcome to your new thread!
â˛ď¸ We'll be here soon! We typically respond in a few minutes, but in some cases we might need a bit more time (e.g., server's busy, you've got a complex question, etc.).
âąď¸ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can start a new thread if you have another question.
đ This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1258065928642629726
đ Have more to share? Add details, code, screenshots, videos, etc. below.
Hello, we have a helpful doc on fulfilling checkout orders. The best two signals to listen for are:
- The
checkout.session.completedevent - The customer returning to the
success_urlthat you provided, at which point you can retrieve the Checkout Session and check its status
https://docs.stripe.com/payments/checkout/fulfill-orders#create-event-handler
We typically recommend listening to checkout.session.completed no matter what. It is possible for the user to make a payment but have their connection cut out before they get back to your page, which would mean you could take a customer's money without being aware of it
Thank you for the advice! I will start listening for this endpoint as well
I was also looking for a way to retrieve the data even if this event is missed on our end. Is there no way to retrieve the items connected to payment intent or a charge? Or should I add it to the metadata when redirecting the user to stripe checkout
The Checkout Session still has a record of its line items. You can retrieve the session to get those. If you don't have the session ID, you can look up the session by payment intent
https://docs.stripe.com/api/checkout/sessions/list#list_checkout_sessions-payment_intent
If you want to do this with metadata on the payment intent, you can set that while creating your checkout session
https://docs.stripe.com/api/checkout/sessions/create#create_checkout_session-payment_intent_data-metadata