So I have a problem with Stripe. My system works like this: When a customer donates something, a defined percent of that amount gets in a sql table (for pay pal payment). This works fine, but subscriptions are destroying the system. I found no way how it's possible to trigger an action each month the customer is billing for the subscription.
0
votes
1 Answers
1
votes
You want to look into Stripe's webhooks. Whenever something happens in your Stripe account such as a customer creation, a charge or a transfer Stripe will send an event to your webhook endpoint (your code) so that it's aware of it. This allows you to email customers after a failed charge for example or be aware when funds have reached your bank account.
You would then be able to listen for different events such as invoice.payment_succeeded when an invoice is paid or invoice.payment_failed when it failed and then update your database accordingly.