#1TapElite
1 messages · Page 1 of 1 (latest)
You can use Stripe CLI to simulate
stripe trigger payment_intent.canceled
stripe trigger payment_intent.payment_failed
i have done that and i am getting response on these
But my question is how can test on a real scenario like what I am doing right now is creating a checkout session and then closing down the checkout page
so after closing will i get payment_intent.canceled response ?
No you won't. Not immediately.
If there's a PaymentIntent created for Checkout session (i.e., there's a payment attempt to this checkout session), then the paymentIntent will be cancelled automatically when the checkout session expires in 24 hours.
okay so a checkout session get expries in 24 hours !
so, after 24 hours i will get payment_intent.canceled or payment_intent.payment_failed ?
on webhook i am listening to both events.
when the checkout session expires, you will get a payment_intent.canceled event
so when i will get this evenet -> payment_intent.payment_failed?
When the payment was failed, you can use test card 4000 0000 0000 0002 to test out this flow.
basically It will give me response of wrong card details ?
The Checkout page will display the error and you'll also get a payment_intent.payment_failed event.
okay. got it
what about US banks how I will test this simulate this scenario ?
https://stripe.com/docs/payments/ach-debit#test-account-numbers Sure, you can use these accounts to test various scenarios.
thank you
I just tested bank testing using this account
000222222227 pm_usBankAccount_insufficientFunds 110000000 The payment fails due to insufficient funds.
but it does not show any kind of insufficient funds error and payment got successful also !
Do you have the checkout session ID?
cs_test_a1x4nQGJrSY1rZD7HEoZ7fkAH2Hlukjj7o7jH3auNBlfwSHTL9ou4VHGs7
https://dashboard.stripe.com/test/events/evt_3MvZOtIUBJ387UG00KvZJGrM Based on what I saw in your account log, the payment was unsuccessful.
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.
okay let me try again with new amount
cs_test_a1cNLlSgfm65gOVZbWTRMfsEU1V2elaY9SbhC4HuUuaV5lYgYgn5asLGKz
can you please test this
This Payment was not completed and its latest status is requies_action
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.
It depends on what you are interested in. If you want to get notified when a paymentIntent is in requires_action status, you can listen to payment_intent.requires_action
on the bank side, I want that if there is any problem with the payment
and payment is not successful then I should get response on webhook
so for this which event i should listen.