David Kimura PRO said about 3 years ago on Payment Gateway Basics with Stripe :
I'm not sure why the stripe_customer is nil. Are you getting any errors from the stripe_customer method in the user model. The guard clause that you have may be problematic as you're likely returning nil since the user has a stripe_id (assuming). If the stripe_id exists, but you're getting nil returned when looking up the customer, you may have some other kind of problem going on. Looking a bit closer at it. you're trying to return a subscription on the stripe_customer method. You should be retrieving the customer (https://stripe.com/docs/api/customers/create?lang=ruby and also see the retrieve customer section) 

The second issue you'll run into is the customer.subscriptions. Once you do have a customer object, you'll get the undefined method subscriptions for the stripe customer. You'll need to look up the subscription based on the subscription_id. https://stripe.com/docs/api/subscriptions/retrieve?lang=ruby