#adontz_best-practices
1 messages ¡ Page 1 of 1 (latest)
đ Welcome to your new thread!
â˛ď¸ We'll be here soon! We typically respond in a few minutes, but in some cases we might need a bit more time (e.g., server's busy, you've got a complex question, etc.).
âąď¸ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can 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/1253348437655687189
đ Have more to share? Add details, code, screenshots, videos, etc. below.
Hello
Hi
Hello, you should be able to make a Subscription that has a standard per-seat price as well as a usage-based one at the same time. Have you already considered that approach?
For the Discounts, that is how Coupons work. If you create a coupon with a duration and then add the coupon to your subscription, we will apply the discount for any new subscription cycle that starts while the duration is active. https://docs.stripe.com/api/coupons/object#coupon_object-duration
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
I've tried to create such subscription, but I'm not sure about details. How to say that price is usage based, but it does not start from zero. So if allowance is 50, then 40 is not billed at all, and 60 is billed as 10? Also, that allowance is different for trial period, 10 for example.
Subscription just allows setting end of trial date, but not alternative settings for trial period.
How to say that price is usage based, but it does not start from zero.
Can you tell me more about what you mean by this?
Also what do you mean by "allowance"? Can you maybe give an example of how you want the numbers to work out here
So I say that I charge a customer by unit used, but "50 units per month are included".
If, within a month, a customer actually used 40, they will not be charged at all.
If, within a month, a customer actually used 65, they will be charged 65 actual - 50 included = 15 billable units.
Does that make sense to you?
Yep yep, finding the doc for that
You can define tiers for your pricing. Here you would define a tier up_to 50 with a unit_amount of 0 and then a tier above that with the unit amount you want to charge after 50 units of usage https://docs.stripe.com/api/prices/create#create_price-tiers
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
Great!
Can I define a separate tier for trial?
Not quite sure what you mean there. Can you tell me more about how you want your trials to work?
Same logic, just if it was 50 included for regular mode, for trial exactly same logic, but 10 included.
After trial ends, it automatically switches to 50.
Ah so the first 10 are free and then paid after that?
Yes. But only for trial period. Then it's 50.
You would want to create a separate Price object for that and could swap between the two by updating the subscription
You can use a subscription schedule to define that trial phase. https://docs.stripe.com/billing/subscriptions/subscription-schedules/use-cases#upgrading-subscriptions
Great. You are extremely helpful!
I have different product features corresponding to different lines in subscription. For example fixed monthly is for feature AA and usage based is for another feature BB. Is there any way to know status of that payments separately? So that if usage went high and customer failed to pay usage invoice in the middle of billing cycle, then I keep feature AA enabled and disable feature BB only. Do I need two separate subscriptions for that?
Also, I did not find in documentation how monthly billing cycles work. For example, if a customer signed up on January 30, what are next two billing dates?
Yes you would need two separate subscriptions for that. Our subscriptions charge for all of their items at the same time and the subscription only has one status, so there isn't a way to differentiate what items the status applies to.
Looking for the doc on that. The next two billing dates would be Feb 28 (or Feb 29 on a leap year) and Mar 30, basically we "anchor" the cycle to the day of the month that the subscription started. We bill on that day of the month if it exists and the last day of the month if the month does not have enough days
So everyone subscribed on January 28, 29, 30, 31 will be billed on February 28 and then spread out back?
Correct, though you can specify a different billing cycle anchor when creating your subscriptions if you want them to all be on the same day
One more question
What is the way to specify what is paid and what is free for trial?
During the trial period of subscription, I have a few items in subscription
Which of these items will be free during trial period?
If it's a free trial, then all items would be free