Created
August 6, 2019 15:49
-
-
Save skolhustick/1781542d06a61427647e26c67f045aa5 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const createPlan = async productId => { | |
| const PLAN_NICKNAME = "Monthly Subscription Plan"; | |
| const PLAN_INTERVAL = "month"; | |
| const CURRENCY = "usd"; | |
| const PLAN_PRICE = 200; | |
| const plan = await stripe.plans.create({ | |
| product: productId, | |
| nickname: PLAN_NICKNAME, | |
| currency: CURRENCY, | |
| interval: PLAN_INTERVAL, | |
| amount: PLAN_PRICE, | |
| }); | |
| console.log(plan); | |
| return plan.id; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment