#sandrine_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/1303018452155367445
đ Have more to share? Add more details, code, screenshots, videos, etc. below.
Hello
What Terminal SDK are you using for your integration?
With regards to your question about webhook event order - https://docs.stripe.com/webhooks#event-ordering
We generally recommend against relying on the order of the webhook events.
Sorry I didn't see your messages. We use ruby on rails.
Are you using Server Driven SDK or JavaScript or something else?
https://docs.stripe.com/terminal/payments/setup-integration
Server Driven
What is the difference between the type charge.failed and payment_intent.payment_failed? What are the cases when one or the other event is submitted?
Ideally, both events are generated in case of a failed payment. You should listen to payment_intent.payment_failed event since PaymentIntent objects are primarily used for tracking payment status.
PaymentIntent creates and uses Charge objects in the background. The difference here is that a Charge can only belong to one PaymentIntent where as a PaymentIntent can have multiple charges.
Ok I see. Are there cases where a charge.failed event is emitted but no payment_intent.payment_failed?
Not really, no.
Aside from PaymentIntent specific webhook events, you should listen to the events listed here to make sure the terminal has processed the actions successfully - https://docs.stripe.com/terminal/payments/collect-card-payment?terminal-sdk-platform=server-driven#webhook-events
Yes ok.
We recently have had problems with this usecase: a user that present a card on the reader, but the paiment don't pass and finally the reader ask for the pin code. What event are triggered in this case?
Hmm I haven't tested this myself recently so I can't recall exactly but if you have a test mode integration set up then you should be able to test it really quickly using the test values here - https://docs.stripe.com/terminal/references/testing#physical-test-cards