#.suryamani
1 messages · Page 1 of 1 (latest)
I'm using webhook events for checking and send mail when customer subscribe,cancel, upgrade or downgrade plan
I have testing new subscription, cancel plan and update plan
Now how will i test for Payment failed when subscribe in local
You would use a payment method that you can attach to the customer but will fail. We have one on this page: https://stripe.com/docs/testing#declined-payments
One way to use it: start a Subscription with a very short free trial, like a few seconds. Once the trial end Stripe will try to charge the customer, and it will fail.
If i use this card number it fails the payment when i try to subscribe, I'm i right?
That's why I said above: start a Subscription with a very short free trial, like a few seconds. Once the trial end Stripe will try to charge the customer, and it will fail.
So the Subscription will suceeded, but then a few seconds later the first payment will fail.
Which event is call when payment is fail in webhook events
The main one is invoice.payment_failed. But you can learn more about this here: https://stripe.com/docs/billing/subscriptions/webhooks#events
ok