tansengming / stripe-rails

A Rails Engine for integrating with Stripe
MIT License
753 stars 123 forks source link

Ability to define some free Stripe plans, but skip them in stripe:prepare task? #190

Closed ndbroadbent closed 4 years ago

ndbroadbent commented 4 years ago

Hello,

I am adding a free plan to my product, and I would like to skip Stripe for this plan, because they don't involve any trials or monthly subscription. So I would prefer not to create this plan in my Stripe account, since it won't be used.

However, my code already has a lot of logic that looks at the Stripe plan for each user, so I would like to still define this plan in the same way and set usage quotas, etc. But would it be possible to add a way to skip this plan during the stripe:prepare task, so it doesn't get pushed to Stripe?

Not a big deal if not! I was just wondering if this might be a good idea.

ndbroadbent commented 4 years ago

Sorry please ignore this! I just realized that I do want to include these plans in Stripe, because I actually do rely on Stripe's monthly invoice webhook to keep track of the usage during that billing period. Sorry to bother you!