#drakonic_subscription-additional-fee
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/1266475378025693356
๐ Have more to share? Add more details, code, screenshots, videos, etc. below.
Hi there ๐ you would add additional items to the Subscription, or possibly create Invoice Items, for this. Do you want these fees to be recurring or one-time fees?
recurring every month
Gotcha, there isn't a way to automatically add a percentage-based fee on the Subscription.
So instead you'd add another item, using a recurring Price, to the Subscription to represent your additional fee.
is there a way to calclulate that price live?
the month that the customer signs up is always prorated, so that fee would have to be a different number based on how many days are left in the month
I'm not quite sure I'm following. Do you have an example Subscription I could look at to get a better feel for what you're describing? If the amount you want to charge is going to fluctuate from one billing period to the next, then including another Subscription Item may not be a good fit.
The first billing period contains a pro-rated first month, and every month thereafter will be billed in full on the 1st day of the month (for full $150)
^that's after first pro-rated month
Okay, so maybe a Subscription Item will work, if you let our proration logic prorate the amount for you when you want those to be prorated.
We want to add 25% ontop of total for each billing period
I see what you're saying - that sounds promising
๐ Unfortunately there isn't prebuilt functionality to add an additional item to a Subscription that is a percentage of other items on the Subscription, you'll need to build the logic to calculate that amount and include an additional item to charge for that. Our proration logic might make that easier, but I'm not sure it will as you previously mentioned only one of the items on the initial invoice is prorated.
is there a way to add an item using a price amount that is calculated via code?
because so far we've only used preset price IDs
Yup, you can use items.price_data to build a new Price adhoc, rather than having to use a previously created one:
https://docs.stripe.com/api/subscriptions/update#update_subscription-items-price_data