#gnarfling-qs

1 messages · Page 1 of 1 (latest)

forest jay
#

👋 happy to help

#

please use this thread for your inquiries

#

I am currently reimplementing sofort payments using the PaymentIntents api. In the past we had a small number of PaymentIntents that after 14 days transitioned from processing to requires_payment_method with the payment_intent.failed event. I know only ~0.2% of all payments fail this way, but we want to handle these cases and give the customer the option to pay his bill with another payment method. How can I simulate this kind of failure in the test environment? Currently all I can do is failing the PaymentIntent immediately ("FAIL TEST PAYMENT" button) or send it to processing which transitions to succeeded after 3 minutes automatically ("AUTHORIZE TEST PAYMENT" button). Is there any magic number, or special customer email address I can use to simmulate an asynchronous payment_intent.failed event?
I will answer shortly

sonic pond
#

I already tried cancelling the PaymentIntent within the 3 minutes, but cancelling sofort payments does not seem to be supported once they are in the processing state.

forest jay
#

Sorry for keeping you waiting

#

you can use Fail Test Payment after paying with Sofort in test mode

#

this would trigger the payment_intent.failed event

sonic pond
#

Thats true. But it will transition from requires_action to requires_payment_method. The docs at https://stripe.com/docs/payments/sofort/accept-a-payment suggest to fulfill the purchase in the processing state. A later transition from processing to requires_payment_method via the payment_intent.failed event is what I need for testing.

Learn how to accept Sofort, a common payment method in Europe.

#

I could simulate this by emitting a matching event before sending our tester to the "Sofort test payment page" and let her click the "FAIL" button.

#

Can you look up in the test mode code, if there is an alternative to automatically succeeding after 3 Minutes?

west mica
sonic pond
#

I will try...

#

Unfortunately I am not using "sofort sepa direct debit", but "sofort bank redirect"...

split rune
#

Hi there. Taking over for soma as they have to step out

#

Give me a bit to catch up on context first

split rune
#

Checking on this with a colleague

#

So unfortunately we don't have an official Stripe way to test this at the moment. Looks like the best way to test this at the moment would be to stub the Stripe Event part of the flow

#

My colleague will report this to the team to let them know this is something users would like to see in the future

sonic pond