#hendr1x_api
1 messages ¡ Page 1 of 1 (latest)
đ Welcome to your new thread!
â˛ď¸ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.
âąď¸ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.
đ This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1324378753757089863
đ Have more to share? Add more details, code, screenshots, videos, etc. below.
hi! you'd write code to decide which one you want to subscribe the customer to, and then pass the ID price_xxx of the appropriate either monthly or yearly Price(that you created before and stored the IDs in your config/database) to the items field in the API call.
ok. So can you please confirm the only way to control the price and interval is via your control panel/website?
no, that's not true. You can create Product/Prices in the API. (e.g. https://docs.stripe.com/api/prices/create#create_price-recurring)
Ok. So if I wanted to create a new subscription via the API. I need to create a product+price, and then I could use that price_id in the subscription api.
yep. There's also price_data in the Subscription Create docs, for ad-hoc Prices (but you do need to create a Product upfront always)
I don't see it @ https://docs.stripe.com/api/subscriptions/create
Perfect. Thanks so much for your help