#sai-webhook-event-trigger
1 messages ยท Page 1 of 1 (latest)
Hello ๐
Just so that I am on the same page, you're looking to trigger event using your app/integration and not the trigger command right?
yes, and i'm also using payment sheet of stripe.
ah okay
have you tried forwarding events to your local server?
https://stripe.com/docs/webhooks/test#forward-events
yes i've tried when doing unit test
currently the issue is our QA can not get that payment_intent.payment_failed event in payment flow with testing cards
which card are they using?
https://stripe.com/docs/testing the card under section "Testing for specific responses and errors "
can you give me a specific card number or a request ID perhaps?
i tried each card, but the errors was caught by stripe payment sheet first. Is there any way the payment sheet succeeded
. But Webhook get a payment_failed event finally
for example, this card4000000000000002
ah okay
looking into it
I mean sometimes the payment sheet may succeed, but eventually the payment may fail and the webhook will receive a payment_failed event. That is the situation QA want to test. Thank you very much for your time
when you say payment sheet,
you mean using a mobile SDK for payment or something else?
yes stripe react native
ah okay
so if I understand it correctly, (feel free to correct me at any point)
- You want to test for payment_intent.payment_failed event
- You're using React Native PaymentSheet for payments
- When you use any of the test cards (where the charge should fail), you're not getting the payment_failed event rather its caught by the PaymentSheet
for 1, 2 it's right. for 3, i think payment sheet has done some card check for us. it is very good.
The question is simple, how can i get a payment_failed event, without using the trigger command
Do you have the ID for a payment intent from when you did this test? (pi_123)
From my understanding if the payment fails with that card, the webhook should always be sent out no matter what happens client side. With the ID I can check if anything else happened here
yes, i dit see the error at the stripe dashboard.
pm_1KLXSkCnj2TS4IOAVQoPNnJU
for this one, i did see the payment_intent.payment_failed error. but the payment sheet knows and the payment was not processed
So that is a payment method, slightly different than what I am looking for. Let me see if I can find it on your account anyway
Like if you go to your test payments https://dashboard.stripe.com/test/payments do you see one of the failed payments from this there?
pi_3KLXQfCnj2TS4IOA1nqNTv4C
Good to know. I was just looking at that one. Let me check on the webhook events.
So it looks like we are trying to send events to you https://dashboard.stripe.com/test/events/evt_3KLXQfCnj2TS4IOA1m4KD5ee
One of the endpoints is seeing the event and responding, we can't reach the URL for the other one
yes, i did see the event. thank you. so my question is, does it means the payment is success if react native payment sheet shows success? because it seems that when a payment failed the payment sheet will throw a exception
and the payment will be interrupted
Yes, the payment sheet will show success on a successful payment.
Are you trying to avoid or handle the exception then?
The webhooks and client side app are kind of seperate things here.
no, If that the payment sheet show's success means everything goes well, do i still need to handle payment-error event?
because it will always be success if payment sheet success
Can you rephrase that a bit? If the sheet shows a payment is a success then it is a success
But where are you looking to possibly get an error back?
we are looking for a situation that payment sheet shows success, but payment failed eventually.
So that situation isn't exist?
If you are only working with cards, no. The payment can be disputed but that is something else.
There are some payments that can fail asynchronously but this error you are testing for now will always come back right when the sheet tries to confirm it
๐ Thank you, that solves my question. Thank you very much
May i ask, in what situation payments can fail asynchronously?
Of course. I will check to see if we have a more comprehensive doc on it. A good specific is SEPA Debit, SEPA payments will go to pending for a bit and then succeeded or failed https://stripe.com/docs/payments/sepa-debit/accept-a-payment#submit-payment
Cards also go to pending and then one of those states but it is so fast that we wait for it and send you the result immediately. For payment methods that take longer, the process is broken out like that
Correct
And our pages on the payment methods will specify if they have an asynchronous flow like that
๐ Thank you very much
Of course, happy to help
๐ ๐ ๐