#wiiim
1 messages · Page 1 of 1 (latest)
Hi! What's the question?
Hey, sorry for the delay.
I'm trying to build a system were each user can have a variable discount amount on a subscription. How would I realise something like that with stripe? Do I need to create a whole voucher for each user to be able to adjust the discount on a per-user basis? Or is there something I can give the API when creating the subscription for the user?
Is the discount a fixed amount or a percentage of each month's bill?
its a percentage value
You can create a new Coupon for each Subscription. Alternatively, you can dynamically create a unique Price for each Subscription: https://stripe.com/docs/api/subscriptions/create#create_subscription-items-price_data-unit_amount
I may have tens of thousands subscriptions, if not more. Is it really feasable to create a new coupon for each subscription?
It depends how much management will you have in the future. Maybe it's worth setting a custom amount if you plan to change the amounts later.
Yea it should be definitly possible to change the amount of discount during the subscriptions active time.
A percentage value is not possible with the unit_amount in the price_data?
You just calculate the final amount on your side and set it in price_data. You can keep the details of the discount in the metadata
alright. and lets say a subscription is monthly billed and it has a current unit amount of 5€ and I update that value in the middle of the month to 10€. the next bill should then be 10€ right?
It depends what proration_behaviour did you set: https://stripe.com/docs/api/subscriptions/update#update_subscription-proration_behavior
i dont set that, so i guess the default "create_prorations"?
Yes, then your customer will be billed $10 + $2.5 (prorated amount) in the next cycle
okay, thank you very much for your input.
Happy to help!