#balaji-s_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/1263419195010449450
๐ Have more to share? Add more details, code, screenshots, videos, etc. below.
๐ happy to help
Hello
this is a good start for your integration flow https://docs.stripe.com/billing/subscriptions/build-subscriptions
for the pricing part you can refer to this https://docs.stripe.com/billing/subscriptions/usage-based/pricing-models#fixed-fee-and-overage-model
to setup usage billing https://docs.stripe.com/billing/subscriptions/usage-based/implementation-guide
and recording usage https://docs.stripe.com/billing/subscriptions/usage-based/recording-usage
can we also add free trail for usage based pricing?
when you say free trial do you mean unpaid period? or the 1000 token usage?
yes. but only for the first time
hmmm so the next month they won't get the free 1000 right?
yes
in that case you can create 2 prices
1 price with the overage model (first 1000 free)
and another one without that
and you just create a subscription schedule where you say the first iteration has the first price and the from there on out you use the second price
any documentation link for the same?
1st step you create the subscription normally
next you create a subscription schedule from the subscription https://docs.stripe.com/billing/subscriptions/subscription-schedules#managing:~:text=You can also create subscription schedules by passing a subscription ID%3A
and then you use https://docs.stripe.com/billing/subscriptions/subscription-schedules/use-cases#upgrading-subscriptions to upgrade the schedule
the only difference I would do to the last code snippet is that I would assign 1 iteration for each phase
Thanks