From the course: Extending Laravel with First Party Packages

Unlock this course with a free trial

Join today to access over 22,600 courses taught by industry experts.

Canceling a subscription

Canceling a subscription

- [Instructor] All right, so now that we've gone ahead and allowed users to modify their subscription, there is one last subscription modification that we need to talk about and that is canceling the subscription. Now, there are a few things that we need to be careful of in Stripe that I want to make sure that you're aware of before you get started with this, and we'll go over all of those in this video. So, we'll talk about how to cancel a subscription, how Stripe handles cancellations, and then how you can instantly cancel a subscription. All right, so we'll go over all these details right now. All right, so here we are inside of our payments controller. Now, if you guys remember, we created a new route for cancel, so if we go to /cancel it's gonna go to payments controllers@cancel. So we can create a new function here that is going to cancel our subscription. So let's do that now. Public function cancel and we actually aren't gonna request anything. This is a simple get request…

Contents