#Tirth Joshi
1 messages · Page 1 of 1 (latest)
or using any test card
Hi! I'm taking over this thread.
You can find all our tests cards here, including ones that will decline the payment: https://stripe.com/docs/testing
but i am not sure which one is working for invoice.payment_failed
so could you please shared it
I'm guessing 4000000000000002 (genereic decline) should work.
i try on stripe dashboard this card but is display card is decline
Can you clarify exactly what you are doing on the Stripe dashboard? If you want invoice.payment_failed, then you first have to create an invoice.
no i create subscription and that subscription payment method add this card
so i have to first create invoice?
So your goal is to trigger a invoice.payment_failed from a subscription? Yes that should be possible.
But why don't you use what was suggested earlier?
easiest way is to install stripe-cli and run stripe trigger invoice.payment_failed
yes s to trigger a invoice.payment_failed..
Got it. Let me do some tests on my end. But again, the simplest option is to use the Stripe CLI for this.
Also can you clarify how you create the Subscription for your tests?
do to customer section and create new subscription
so you are using the Stripe dashboard, not the API?
And then how do you pay the invoice? With the hosted invoice page?
yes
could you plase give me api
which fail subscrption and call invoice.payment_failed event
👋 taking over for my colleague. Let me catch up.
you need to attach a card the Decline after attaching one (4000000000000341) and then set it up as the invoice_settings.default_payment_method then once you create the subscription the invoice.payment_failed event will be triggered
it is not working?
what isn't?
sorry my bad, if you follow the steps I suggested you would end up with a payment_intent.payment_failed and the susbcription won't be created
in that case I think you should use a test clock to create the customer, add the 4242 4242 4242 4242 card first and set it as a default, create the subscription, and then add the 4000000000000341 card to the same customer and set that to be the default for the subscription
then advance the clock for a whole cycle
(depends on the interval of the price you have choosen for the subscription)
I guess the other way to trigger an invoice.payment_failed event is to use the 3DS always authenticatecard 4000002760003184
I test all , could please give me the right suggestion?
would you mind sharing the request IDs of your tests?
in that case go back to the first message that my colleague sent you
use the Stripe CLI trigger functionality
if you have any other question, please contact https://support.stripe.com/?contact=true
Find help and support for Stripe. Our support center provides answers on all types of situations, including account information, charges and refunds, and subscriptions information. Get your questions answered and find international support for Stripe.
but i only check invoice.payment_failed event
you provided any card which failed payment
and call above event
in this call multiple event of invoice so i did not understand ..
you just need to listen to the invoice.payment_failed event
and ignore the others
use the Stripe CLI trigger functionality
not display the event type as comapred to the webhook
Hi! I'm taking over from my colleague. Please, give me a moment to catch up.
Could you please summarise the latest question?
how can invoice failed or close in stripe dashboard
Are you trying to listen to webhook events? And you want to simulate it?
You can trigger test events using Stripe CLI. Is this not working for you? https://stripe.com/docs/cli/trigger