Ah, so a SaaS site where users can enter their Stripe API KEY and receive payments through your application. Funny, I'm actually working on one of these right now so I'll be sure to take notes of certain aspects during the process for this episode.
See if something like this will work.
```customer = current_user.stripe_customer
subscription = customer.subscriptions.retrieve(current_user.stripe_subscription_id)
subscription.cancel_at_period_end = true
subscription.save```
It looks like you're not getting the stripe token passed in from the form. In the form where the credit card is entered, the `stripeToken` should be added in via the javascript. Make sure you don't have any JS errors. You could try to comment out the form submission so that you can inspect the parameters that it adds in. If its not adding those in properly, that could be why you're getting the errors on the controller.