Sjabloon comes with some rake tasks that grabs the plans and coupons from your Stripe account. Great to quickly set up your local environment and super convenient to have as cronjob for your coupons.
lib/sjabloon/stripe/fetch.rb. For both
Sjabloon::Plan’s it looks up the
processor_id. If it’s available it updates the details. If not available, it create a new plan or coupon.
This is to make sure you can use Stripe as your single source of truth (it’s not a two-way sync—your locally-made changes are not pushed to Stripe).
Can I fetch plans and coupons in one command?
Yes. You can run
rake stripe:fetch:all to fetch both your plans and coupons from Stripe.
A Rails SaaS starter kit to build successful products
30+ developers, companies and freelancers bought Sjabloon in the last 4 weeks