#MrJamesF
1 messages ยท Page 1 of 1 (latest)
Are these credits always a direct relationship to a dollar amount? Are they used for one-off purchases or only subscriptions?
1 credit costs $15
They use the credits in the app to buy things
if they buy a lot of credits they get a discount using the volume based pricing
In that case your integration would need to keep track of those credits and how they are applied. Stripe does not have a built-in mechanism to address that. I don't think you are talking about Customer credit balances: https://stripe.com/docs/invoicing/customer/balance
you are correct i am not talking about customer credit balances
This is something in our app where users subscribe to buy x Tokens per month
1 Token = $15
If they are on 5 Tokens per month for 2 months then their Token balance will be 10 Tokens (assuming they didn't spend any Tokens in the app)
When updating the subscription i would like to set the proration_behaviour per item, so on for some items and off for others https://stripe.com/docs/api/subscriptions/update
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
but that doesn't seem possible
so wondering if there is another way to achieve the same result
as if i just set proration off for the subscription this means when upgrading they would have to wait until the next billing cycle for the upgrade to be applied I assume?
In that case you would need to make the changes that you do not want prorated on one request, and those you do want prorated on another request. The proration_behavior is set per Update request
Hmm
So i just do 2 subscription update requests, straight after eachother?
Sounds interesting
That way you can get the selective proration behavior you are after
Happy to help ๐
Previewing Invoices seems like it may be difficult as I need to get 2 previews and merge them somehow
as we like to show the user what their new plan will cost (using https://stripe.com/docs/api/invoices/upcoming) before they confirm it
any advice on that part @molten totem
Hmmm ๐ค
That is more tricky. I don't have a good way around that other than gathering the individual items from each update and merge them. In that case it may be more straight-forward to avoid prorations altogether.
Ok i will try again merging them
would it be easier if i split it into 2 subscriptions ?
@molten totem
That might prove easier initially but I would worry about how well that would operate at scale
if we leave proration off and someone upgrades is there a way to make it start the new subscription straight away rather than them having to wait until the next billing cycle? @molten totem
Hi @thin heron I'm taking over, give me a sec to catch up
Is your latest question about changing an existing subscription or creating a new one?
changing an existing one
thanks @fading mason
i've given up with trying to combine 2 invoice previews, that seems to have some issues
OK, so you are updating a subscription with proration_behavior set to none (https://stripe.com/docs/api/subscriptions/update?lang=ruby#update_subscription-proration_behavior) ?
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.