#rohit-subscription-quantity
1 messages · Page 1 of 1 (latest)
rohit-subscription-quantity
hey @little helm! Yes that's the right way to increase the quantity
So it will charge for 3. Correct?
it will refund 5 and charge for 8 with the right proration. But yes it nets out to charging for 3 more seats (partially for the remainder of the time)
I recommend reading through https://stripe.com/docs/billing/subscriptions/prorations
Or is there a better way so that there will be no refund just charge for 3 more?
no there isn't a better way, that's the way to do it. Read through the doc I shared and it explains it all
User subscribed to monthly plan on jan 2.
Adding 3 seats on 20 jan
Adding 3 more 25 jan.
So on 25 jan, the above call is fine with 6 quantity/
I mean no
They subscribe on JAn 2, so you have quantity 1. On Jan 20 you move to quantity 4 right?
We have separate product for subscriptions and purchasing seats .
- User subscribed to monthly plan. Subscription is created.
- When user add 3 seats. I will add new item to that subscription with quantity 3. Correct?
- When user add 3 more, I will update the item of the subscription with quantity 6.
ah that's why, so yes correct
But on point 3, as you said it will refund and then charge for 6
No way to just add 3 more?
Or it calculate as we passing proration_behavior
it doesn't really "refund" it calculates a credit owed and an amount owed. It's mostly the same as charging for the extra 3. Just try it in Test mode
Ok. When billing cycle renew it charges for
monthly plan price + price of 6 seats
correcT?
yes
Let's say before renewal user want to decrease 2 seats.
Should I use same subscription update call and set the quantity to 4 from 6. OR use the subscription item api call Stripe::SubscriptionItem.update( )
it does the same exact thing!
yes both work and yes you change the quantity (up or down) to represent what you want the quantity to be
Does the above API call send invoice to user? I am unable to test in test mode. If user buy 3 seats..
if you pass proration_behavior: 'always_invoice' then yes it would invoice them immediately (and send an Invoice assuming you have collection_method: 'send_invoice')
collection_method -- need to pass in the api call?
Hello! I'm taking over and catching up...
If I am doing this
Stripe::SubscriptionItem.create({
subscription: 'xx',
price: 'xx',
quantity: 5,
proration_behavior: 'always_invoice'
})
Will it send invoice? or need to pas here anything?
If the quantity or Price is different then yes, that will immediately Invoice: https://stripe.com/docs/api/subscription_items/create#create_subscription_item-proration_behavior
let me check
Before doing
Stripe::SubscriptionItem.create({
subscription: 'xx',
price: 'xx',
quantity: 5,
proration_behavior: 'always_invoice'
})
I want to check how much I will be charged today. The subscription is created on 2 jan. But I am going to add new item with 5 quantity,
You can use the upcoming Invoice API to preview changes like that: https://stripe.com/docs/api/invoices/upcoming
that is to retrieve... But I have not added the new item yet. I wan to see the prorated amount that is going to charge today and will be next date and amount going to charge
Right, you're retrieving an upcoming Invoice that doesn't exist yet using the options you provide. It's a preview you can see before making the actual change.