#splitrox_webhooks
1 messages ¡ Page 1 of 1 (latest)
đ Welcome to your new thread!
â˛ď¸ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.
âąď¸ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always 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/1298387336492744744
đ Have more to share? Add more details, code, screenshots, videos, etc. below.
Below are links to other discussions we've had with you in the past week in case you want to review that information. If your question is related to one of these previous discussions, please provide a comprehensive summary of the current state and what you need help with now. We help many users simultaneously, so a summary allows us to resolve your issue as soon as possible.
- splitrox_checkout-redirect, 4 hours ago, 21 messages
On my webhook page, i can see this
Do i need to have both options active or just one covers both cases?
Hi there
I understand that there are some cases where is async depending on the payment method
Right
checkout.session.completed will be emitted when a customer completes the Session. If the Session resulted in a processed payment (e.g if the Session was in payment mode or subscription mode and the amount was a non-zero amount, you should also receive payment_intent.succeeded and charge.succeeded events for any payments made with a synchronous payment method type (e.g. cards). The event checkout.session.async_payment_succeeded will be emitted as you mentioned, based on the payment method type
Currently I'm using Checkout create session success_url which is bringing me issues as is not always being called. One of your colleagues suggested to use webhooks. Currently I'm using Ruby on Rails and i have one specific method that i'm receiving all of this information. What do I need to do to have the same thing? Do I need to listen to charge succeed or even payment_intent if i just want to know when the purchase is done?
I see all of this and I find it confusing for my purpose so I'm not sure what I have to do exactly
Right now i have this, just a simple method that is being called and I'm getting the response from Stripe Checkout Session
I'm using this one, if that helps: https://github.com/stripe/stripe-ruby
I was looking to be able to do something very similar or equal to what i'm currently doing, i just want to get notified about the session update so I can do my logic on my side
Just taking a step back
I recommend reviewing this if you haven't already: https://docs.stripe.com/webhooks/quickstart
We recommend listening for checkout.session.completed and checkout.session.async_payment_succeeded at a minimum
This guide should also be helpful: https://docs.stripe.com/checkout/fulfillment
So, to make sure I understand, I need a endpoint secret to validate the authenticity of the call, then I can handle the "event"?
Each endpoint has a secret. The secret is auto generated by Stripe. When you receive an event (via a POST to your endpoint from Stripe), your webhook handler logic should double check that the secret included in that request matches the secret
Also about the checkout.session.completed and checkout.session.async_payment_succeeded
I assume a single payment transaction will only call one of them and not twice correct?
I recommend testing this out so you can see it in action
There could be a scenario where you receive both. checkout.session.completed refers to when a customer completes the Session. So, for example, you'll get this event when a customer completes the Session but opted to pay with a US bank account. You may later get checkout.session.async_payment_succeeded when the payment is actually processed
Oh, i understand, yeah indeed I have to test, quite challenging because I don't think I have payments that get processed later on the testing mode
So I'm not sure what kind of attributes I'm looking for but I'm going to explore
Thank you so much!