Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

TylerW's avatar

Cashier + BrainTree For Expired Subscriptions

I created an application using a standard Laravel Cashier BrainTree implementation, and I noticed that when a user's subscription ends because their payment method gets declined (such as ending the subscription inside of Paypal rather than through my website), their subscription is never terminated on my end.

It appears that it is an absolute necessity to create some sort of periodic check for users who haven't paid in order to cancel their subscriptions, but I can't seem to locate any consideration of this on the Cashier page. Am I missing something? Is Cashier + Stripe the same way?

0 likes
4 replies
Wraith's avatar

Every time when u try get money for continue subscription you should get callback from provider with user id, amount or subscription id when u can find user. If will be negative just revoke sub from user.

TylerW's avatar

Yeah, logically that makes sense, but there is no request made to charge the user via the Cashier scaffolding. When you create a subscription, it add the user to the subscription plan in BrainTree. The user is then charged by BrainTree every month, and the only interaction between Cashier and BrainTree beyond creating a subscription happens when the user cancels their subscription through the website.

So it seems there is zero consideration for a user who cancels by some method other than through the Laravel implementation, and that I would need to scan all of my subscribers to check who has an outstanding payment?

TylerW's avatar

In a sort of roundabout way, this is exactly what I was looking for. What you posted made total sense, but still didn't address the fact that this sort of functionality, which seems so crucial, is omitted in the Cashier documentation. So I went back and took a look, and it turns out it actually IS in there (at the bottom of the page).

I had totally skipped over the default webhooks implementation which handles "cancelling subscriptions that have too many failed charges." Silly me!

Please or to participate in this conversation.