#venkateshjsoft

1 messages · Page 1 of 1 (latest)

granite solsticeBOT
bold raven
#

We are having some internal logic to collect renewal payment from the customer.
During this process, if payment failed for any reason (insufficient fund, invalid payment method) we want to retry the payemnt again after certain interval from our system.
I want to know if payment failed during create payment intent what is the status we get it from Stripe

#

will it give the status immediately or we need to check this through our webhook

blazing rose
#

Hi! Let me help you with this.

#

It's best to rely on webhooks. However if you initiate an off-session payment you will also get an immediate error. Depends on your integration.

bold raven
#

im initiating off-session payment

#

what is the status I get it if payment failed

#

requires_payment_method
requires_confirmation,
requires_action
processing
requires_capture
canceled
succeeded

#

i dont see any status for failed

blazing rose
#

You will get an error. If it's an off-session payment it needs to go to succeeded immediately or the request will fail and the PaymentIntent will not be even created.

bold raven
#

okay got it

#

Thanks

#

which means it will throw an exception correct?

blazing rose
#

Yes, depending on what SDK you're using.

bold raven
#

because in the offsession mode, we will not pass any payment data (like card number or anything), in that case how can I test this scenario

blazing rose
#

What are you planning to charge then? You need to pass the Payment Method object to an off-session PaymentIntent for it to succeed

bold raven
#

yes we will pass payment method object

#

when I do first time payment method, I pass the card details

#

but when I collect next time, I pass only payment method Id with off_session

#

second time, I cant pass the card details

#

so I want to know how can I test failure case during the renewal

#

is it clear?

blazing rose
#

I am not sure what's your challenge here.

bold raven
#

first time i m creating payment intent with valid card number,

#

with the saved payment method I wan to retry second payment

blazing rose
#

Correct

bold raven
#

but during second payment if the card is invalid or in sufficient fund, how can I test

#

if card is expired

#

because im using saved payment method id, i cant change original card details right

blazing rose
#

If the request fails, you will need to ask your customer to provide another card.

bold raven
#

I understand this part

#

i want to test this scenario before we endup production

#

is it possible or not?

#

i want to simulat this behaviour

blazing rose
#

You want to simulate a failure, you mean?

bold raven
#

yes but during the second time

#

first time I can test this value invalid card

#

when payment is success first time but the card is expired before the second paymwent

#

how can I test this?

#

or user doesnt have enough balance

#

i want to test this specific case

blazing rose
bold raven
#

Thanks

#

sorry to bother you again. is it possible for the user to choose 3DS card or is it something we can control on our end

#

because for the renewal we cant ask the user to provide card details

blazing rose
#

3DS prompt is triggered by the issuing bank. Normally, if the card is set up correctly, it's not required for subsequent payments. However, for the sake of testing we provided one test card that will always require 3DS and fail the off-session payments.

bold raven
#

can you please share the 3ds card which fail the off-session payment?

blazing rose
granite solsticeBOT