#Tirth Joshi

1 messages · Page 1 of 1 (latest)

whole sentinelBOT
somber lynx
#

easiest way is to install stripe-cli and run stripe trigger invoice.payment_failed

flat crag
#

or using any test card

whole sentinelBOT
tight cedar
#

Hi! I'm taking over this thread.

flat crag
#

but i am not sure which one is working for invoice.payment_failed
so could you please shared it

tight cedar
#

I'm guessing 4000000000000002 (genereic decline) should work.

flat crag
#

i try on stripe dashboard this card but is display card is decline

tight cedar
#

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.

flat crag
#

no i create subscription and that subscription payment method add this card

#

so i have to first create invoice?

tight cedar
#

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

flat crag
#

yes s to trigger a invoice.payment_failed..

tight cedar
#

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?

flat crag
#

do to customer section and create new subscription

tight cedar
#

so you are using the Stripe dashboard, not the API?

#

And then how do you pay the invoice? With the hosted invoice page?

flat crag
#

could you plase give me api
which fail subscrption and call invoice.payment_failed event

green sapphire
#

👋 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

flat crag
#

it is not working?

green sapphire
#

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)

green sapphire
#

I guess the other way to trigger an invoice.payment_failed event is to use the 3DS always authenticatecard 4000002760003184

flat crag
#

I test all , could please give me the right suggestion?

green sapphire
#

would you mind sharing the request IDs of your tests?

flat crag
#

only i want invoice.payment_failed event/

#

how can i get in webhook

green sapphire
#

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

flat crag
#

but i only check invoice.payment_failed event
you provided any card which failed payment
and call above event

flat crag
green sapphire
#

you just need to listen to the invoice.payment_failed event

#

and ignore the others

flat crag
#

use the Stripe CLI trigger functionality
not display the event type as comapred to the webhook

heavy berry
#

Hi! I'm taking over from my colleague. Please, give me a moment to catch up.

#

Could you please summarise the latest question?

flat crag
#

how can invoice failed or close in stripe dashboard

heavy berry
#

Are you trying to listen to webhook events? And you want to simulate it?

flat crag
#

both ,
please i test only invoice.payment_failed

#

any way?

heavy berry