Marco De Rossi said almost 4 years ago on Payment Gateway Basics with Stripe :
  The errors are not stopping. Are you available for a zoom mentoring?
 def create
      customer = current_user.stripe_customer
      source = Stripe::Source.create(token: params[:stripeToken])
      customer.default_source = source
      customer.save
      begin
        Stripe::Subscription.create(
          customer: customer,
          plan: 'pro'
        ) 
        current_user.assign_attributes(stripe_subscription_id: subscription.id)
        current_user.save
        redirect_to root_path, notice: 'Thanks for subscribing!'
      rescue Stripe::CardError => e
        flash.alert = e.message
        render action: :new
      end

Error