I have implemented a subscription package on my application using Laravel Cashier and Stripe.
Would somebody be able to give some insight on the following.
Does Stripe automatically renew a subscription and generate/send an invoice at the start of a new billing cycle? Or would I have to setup a cron job to renew subscriptions and send invoices?
When it comes to catching errors from Stripe, such as when a user is being billed at the beginning of a billing cycle, but payment fails because card details are wrong etc. What is the recommended approach to get these errors as I need to be able to send emails for things like this?
Sorry if the wording is confusing, I'm happy to elaborate.
Stripe handles that. It would be good if you setup webhook so that you can handle payment failures. Invoices can stripe handle as well, but if you want custom invoices, you could handle that instead.
Setup webhook to handle those errors.
So webhooks are basically what you need to handle it all. With webhooks you can send emails to notify about payment failures. Especially since you will need to cancel the subscription at your side as well. Or if you give them a few tries and send email to them about updating their card details.