#AjithSelvakumar-Subscription
1 messages · Page 1 of 1 (latest)
This is a test subscription i created for testing. I need to trigger invoice.payment_failed for this subscription to test my webhook
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
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.
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
Learn how to move Billing objects through time in test mode.
I need the subscription to fail when the subscription gets renewed, is that possible?
Yes, that's why I suggested to use the failed card 4000000000000002
It's the purpose of those failed cards
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
Anyone?
@frank quartz Are you available?
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
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?
hmm, are you in test mode?
yes
Don't you see the "New simulation" here?
That button is disabled for me