#AjithSelvakumar-Subscription

1 messages · Page 1 of 1 (latest)

frank quartz
#

Sure, how can we help?

gusty meadow
#

This is a test subscription i created for testing. I need to trigger invoice.payment_failed for this subscription to test my webhook

frank quartz
#

To test webhook I think you can trigger a random invoice.payment_failed, doesn't need to be this Subscription

#

Simply use Stripe CLI and stripe trigger invoice.payment_failed

gusty meadow
#

I need to test this subscription specifically because, i need to ensure that the metadata given in the subscription is accessible while the invoice.payment_failed event.

frank quartz
#

So you might want to create another Subscription with the metadata you pass along, but with a PaymentMethod that warranted to failed. The 4444 card won't fail

#

Use this one 4000000000000002

#

From the Doc

#

Then either wait a day, or simulating the Subscription time by test clock

gusty meadow
#

I need the subscription to fail when the subscription gets renewed, is that possible?

frank quartz
#

Yes, that's why I suggested to use the failed card 4000000000000002

#

It's the purpose of those failed cards

gusty meadow
#

Okay thanks

#

I can't add this card to fail renewal of a subacription

#

And i cant create a new subscription with this card also because it rejects

gusty meadow
#

Anyone?

gusty meadow
#

@frank quartz Are you available?

frank quartz
#

Hi,

#

I see, you want to first payment to success and subsequent renewal to fail?

#

I think you may want to try starting the subscription with a trial

#

then you can still create the Subscription regardless of the paymentmethod, then wait for the billing cycle time to test the failure

gusty meadow
#

Okay sure, now i have created a subscription with a valid card and changed the card which can be saved but fails upon payment. 4000000000000341 this is that card.

#

There is some problem with test clock feature, i am not able to use test clocks.

#

Can you share more about this

#

Why i need a plan to use a testing feature?

frank quartz
#

hmm, are you in test mode?

gusty meadow
#

yes

frank quartz
#

Don't you see the "New simulation" here?

gusty meadow
#

That button is disabled for me

frank quartz
#

I see, unfortunately this seems to require activating that Billing Starter feature

#

I will feedback internally for Test mode usage. At this time, I am afraid you can't use it yet :/

#

I am stepping down for the day. Feel free to open new thread if you have other questions!