1
votes

I am using cashier 12.1 with stripe. I have created a daily billing price plan and subscribed for a user. After creating subscription I changed the default card to 4100000000000019 to test fraudulent transaction. In next billing cycle transaction is blocked in stripe but according to cashier subscription table this subscription is still active . Why it like that? Is there anything else I should do to track transactions from stripe and make the corresponding changes in cashier table?

1

1 Answers

2
votes

You should be defining a webhook handler for such use case.

https://laravel.com/docs/8.x/billing#defining-webhook-event-handlers

Some potential events could listen to for your case are customer.subscription.updated and invoice.payment_failed.