We've moved discussions to Discord

Is there a way to require a plan at sign up?

Will Read
I'd like customers to either pay for a new plan or join an existing account that already has a plan at sign up (via invite). I was surprised to find that's not the case after enabling Stripe. Instead, it looks like after creating an account, the customer has to then go to Billing and pick a plan. Am I missing something?
Chris Oliver
I don't recommend it and instead suggest a two-step registration process. You can just add a before_action on all your controllers to require a subscription, otherwise send them to the pricing page.

That way if anyone signs up but fails to choose a plan, you can email them to help. If you did that as one-step, you won't have any ability to help them or ask questions unless they reach out. 

Plus, this allows you to nicely reuse the payments code instead of having to implement it in two places.
I see, thanks for the recommendation Chris! Is there a before_action somewhere I can reuse?
Will Read
I ended up making a method in application_controller.rb that looked like this:
def require_subscription
  unless subscribed?
    redirect_to pricing_path, alert: t("must_be_subscribed")
  end
end
Then added:
before_action :require_subscription
...at the top of my controllers that needed an active subscription. I also added a translation in en.yml for must_be_subscribed
Notifications
You’re not receiving notifications from this thread.