#cgy
1 messages · Page 1 of 1 (latest)
Hi there!
The simplest options would be to use the Stripe CLI with this command: stripe trigger payment_intent.payment_failed
And why do you want to use a SetupIntent for this?
Ok, let me explain.
We want to charge our customers, but the fee can't sure before our servcie finished. We provide Charging Point to EVs. So I want our customers to add a card, and we can charge the card off_session without furthur confirm by customers
So, Stripe CLI can do this one?
But what exactly are you trying to test? Just receiving the payment_intent.payment_failed event?
Yes, I consider this situation: When I use SetupIntent the card is fine, but when I charge the card maybe lack of money or stolen or something other wrong. I want to check this one and dispose this situation
@soft solar Can Stripe CLI do that?
So you have to test the full flow? Use a SetupIntent that works, and then use the payment method created by the SetupIntent and it fails?
If you just want to test the second part it's easy: create a PaymentIntent with a test card that will decline.
If you want to test the full flow, I guess you could use a test card that always request 3DS. This way when you confirm the SetupIntent on the frontend you do the 3DS and it works. And then later when you try to confirm the PaymentIntent off session it will fail.
Create payment should be success, because its sync, but payment_intent_success or failed I do it with Webhook. So I will read the 3DS part
I'm sorry I don't understand what you mean.
Or I know when lack of money "PaymentIntent.create()" will throws a StripeException right ?
Oh
Or is a misteak word
In which this will be trigger
if there's an error when confirming a PaymentIntent