#DG Khan-react native

1 messages · Page 1 of 1 (latest)

gilded slate
#

Hello! When you say "response from webhook method" are you referring to webhook events like payment_intent.succeeded or are you talking about something else?

burnt mist
#

Yes, primarily i will be using webhooks to get the payment information as soon as possible.

#

i.e. whether the payment is successfull or declined

gilded slate
#

If user is just sitting there on payment gateway page and doesn't perform anything -> You wouldn't get any webhook event at all

#

User keep entering wrong credit card details -> You'd get a payment_intent.payment_failed event after the failed attempt

#

User enters the correct credit card details after 20 minutes -> You'd get the webhook event after they attempt payment (so after the 20 minutes)

#

User enters the card details which is correct, however, the bank blocked the payment -> you'd get payment_intent.payment_failed after it was declined

#

User closed the page without performing anything -> You wouldn't get any webhook event from us at all - it would be up to you to decide when to time out and release

burnt mist
gilded slate
#

What do you mean by maximum time? We send the webhook event as soon as the payment fails

burnt mist
#

I meant whats the timeout for this on your side? Because the bank could take few minutes to hours for this!

gilded slate
#

Ah I think there's a misunderstanding - it does not take the bank minutes to an hour to do this. When payment is attempted we fail/succeed it synchronously in the same request

burnt mist
#

Ok, thanks..

#

Iam trying to minimize the reservation time here for drivers what i can do, because in some cases it could take more than half hour for customer to complete payment process(either failed or success).. Do you know any stripe feature i can use / implement here?

gilded slate
#

That's really up to you/depends on what behavior you want - you'd choose a specific amount of time to allow for payment and once that time period is up you'd cancel the Payment Intent (https://stripe.com/docs/api/payment_intents/cancel) and display something in the UI to indicate that they can no longer pay

burnt mist
#

Hmmm..is this something available with React native SDK?

gilded slate
#

No, Payment Intent cancellation is a server-side call. You can't make that request client-side

burnt mist
#

Well, since i'll be using the RN SDK in my app, so unable to understand where exactly i can have this API call to be triggered by my server, any guide etc in this case?

#

i.e. how can i have this working in conjunction with RN SDK