#sai-webhook-event-trigger

1 messages ยท Page 1 of 1 (latest)

hushed cape
#

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?

sour flicker
#

yes, and i'm also using payment sheet of stripe.

hushed cape
sour flicker
#

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

hushed cape
#

which card are they using?

sour flicker
hushed cape
#

can you give me a specific card number or a request ID perhaps?

sour flicker
#

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

hushed cape
#

ah okay
looking into it

sour flicker
#

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

hushed cape
#

when you say payment sheet,
you mean using a mobile SDK for payment or something else?

sour flicker
#

yes stripe react native

hushed cape
#

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
sour flicker
#

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

scenic talon
#

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

sour flicker
#

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

scenic talon
#

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

sour flicker
#

pi_3KLXQfCnj2TS4IOA1nqNTv4C

scenic talon
#

Good to know. I was just looking at that one. Let me check on the webhook events.

#

One of the endpoints is seeing the event and responding, we can't reach the URL for the other one

sour flicker
#

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

scenic talon
#

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.

sour flicker
#

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

scenic talon
#

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?

sour flicker
#

we are looking for a situation that payment sheet shows success, but payment failed eventually.

#

So that situation isn't exist?

scenic talon
#

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

sour flicker
#

๐Ÿ‘ Thank you, that solves my question. Thank you very much

sour flicker
scenic talon
#

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

sour flicker
#

Got it. Thank you

#

so these fails will not happen with payments via 'card' only

scenic talon
#

Correct

#

And our pages on the payment methods will specify if they have an asynchronous flow like that

sour flicker
#

๐Ÿ‘ Thank you very much

scenic talon
#

Of course, happy to help

sour flicker
#

๐Ÿ‘ ๐Ÿ‘ ๐Ÿ‘