#abhishek-kumar_docs

1 messages ยท Page 1 of 1 (latest)

grim carbonBOT
#

๐Ÿ‘‹ 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/1222625826072166555

๐Ÿ“ Have more to share? Add more details, code, screenshots, videos, etc. below.

limber yarrowBOT
#

Below are links to other discussions we've had with you in the past week in case you want to review that information. If your question is related to one of these previous discussions, please provide a comprehensive summary of the current state and what you need help with now. We help many users simultaneously, so a summary allows us to resolve your issue as soon as possible.

jovial ginkgo
#

Hello

tulip peak
#

Hi @jovial ginkgo ๐Ÿ‘‹

#

give me 2 mins, I'm just adding more details ๐Ÿ™‚

jovial ginkgo
#

Okay

tulip peak
#

$10 / seat

  • Default subscription is created with 1 seat
  • Upon every addition of a seat, the user would have to pay the whole seat amount upfront without proration
  • Upon removing a seat, the current billing cycle shouldn't be affected, the user would have to pay the whole price but from the next billing cycle the decreased seats would take affect.

eg.

Subscription started with 1 user ( default )

Billing Amount: $10
1x seat

Adds 1 user

User needs to pay $10 upfront ( irrespective of the date, I don't want this to be prorated ๐Ÿ˜… )
Billing Amount: $20
2x seat
( The user has ideally paid for both the seats, hence the month end billing would only have the other pricing from the product as per seat is already paid for )

Removes a seat

No change in current billing cycle as user has already utilised the seat this month.
Billing Amount: $20
( Although in next billing cycle there would only be 1x seat )

#

Thanks for quick response @jovial ginkgo
Please let me know if this is feasible with current version of Stripe and if so it'd be great if could guide me to it.

Thanks a lot !

jovial ginkgo
#

Okay so to summarize:

  • On upgrade, the customer pays immediately for the added seat and the billing cycle doesn't change (they pay for the total amount of seats again at the next cycle)
  • On downgrade, I don't really understand this one... you want to just charge them for the new total amount of seats at next billing cycle? Do you want to charge anything immediately on downgrade?
tulip peak
# jovial ginkgo Okay so to summarize: - On upgrade, the customer pays immediately for the added ...

yes you got it!

  • On upgrade, the customer pays for added seat immediately and since he already paid for his seat while subscription is being created and the new seat immediately, I guess we shouldn't charge them again at the end of month.

While creating $10 was paid for their seat.
While adding new seat another $10 was paid.

So in theory, customer already paid for all the seats in the subscription and shouldn't be charged for the seats again, ( although it'd be mentioned in invoice, ofc )

  • On downgrading, the customer can downgrade the seat but it'd take affect in the next billing cycle, ( schedule Subscription update I guess ). Resulting in this billing cycle now reducing the amount since they've already used the seat but from next billing cycle the seat is removed and isn't charged for.
jovial ginkgo
#

Okay let's start with upgrading.

#

A specific example:

  • Jan 1st Customer subscribes with 1 seat and pays $10
  • Jan 15th they add a seat, you wan them to pay $10 for the new seat.
  • Next time they pay should be March 1st where they pay $20
#

Is that all correct?

tulip peak
jovial ginkgo
#

Wait so they do pay on Feb 1st as well?

tulip peak
#

No, the amount is to be paid at the end of billing cycle right?

jovial ginkgo
#

Only with metered, not with per-seat

tulip peak
#

oh, then can you tell me when is per-seat billed?

#

if in the period of 1 Feb to 1 March customer doesn't change anything

jovial ginkgo
#

At beginning of the period

tulip peak
#

oh

#

interesting, kinda makes sense why the per-seat was already being charged at beginning.

#

okay, thanks for this clarification.

but moving back to the case of upgradation.

How can I collect the whole per-seat price while user is adding a seat?
I've already checked out proration_behaviour to invoice_now but that changes the amount based on when the seat was added.

#

I'm guessing I'll have to move the type of per-seat from flat-rate right?

jovial ginkgo
#

If you want to charge immediately for the whole amount without changing the billing cycle then you would create an Invoice Item and and Invoice yourself upon this upgrade and set proration_behavior: none

tulip peak
#

Yep, that's how I've configured right now.

#

can you also help me with how can I handle downgrading?

jovial ginkgo
#

Can you clarify the behavior you want for downgrading with an example?

tulip peak
#

sure

jovial ginkgo
#

I'm not sure I understand exactly what you want based on what you stated above

tulip peak
#

alright my bad, I'll try to explain with an example

#

1 Jan
User creates a subscription, $10 paid
a seat is added for the user by default.

1 x seat

5 Jan
User adds another seat and pays $10

2 x seat

10 Jan
user removes a seat
In the application we remove the seat and all but from stripe we don't want to refund any amount to the user for removal of seat, i.e. no proration happens for this.

1 Feb

user pays whatever amount due in metered usage of other products
and user has already paid $20 for the 2 used seats, even though seat was removed in middle of billing cycle

2 Feb ( or 1 Feb )
new cycle begins with just 1x seat.

and user pays $10 for the current seat ( either at the beginning or end of cycle - need we'll come to this in a bit )

#

let me know if this isn't clear enough, ๐Ÿ˜…
sorry, I usually face bit of issues explaining haha

Thanks for bearing wth me ๐Ÿฅน

jovial ginkgo
#

Mostly you just want to set proration_behavior: none on the downgrade on Jan 10th in that case.

#

That would lead to no charge occuring, no refund, no proration items.

#

Then they would be charged for the 1xseat on Feb 1st at the next renewal

tulip peak
#

ahh got it.
Since the user already paid the whole amount at the beginning itself then there wouldn't be any refunds or anything

#

makes sense.

jovial ginkgo
#

Yep

tulip peak
#

but without proration how can I charge the user whole seat amount?

I only see this kind of behaviour proration_behaviour: invoice_now

or am I missing something?

jovial ginkgo
#

What do you mean by that?

#

You mean on the upgrade?

tulip peak
#

correct, on upgrade I wanted to charge user for whole seat amount

jovial ginkgo
#

Yeah then we discussed that above

#

You set proration_behavior: none so that the Subscription itself doesn't generate a prorated invoice

tulip peak
#

huh, I didn't see this behaviour upon simulating time. ๐Ÿค”

jovial ginkgo
#

You likely aren't creating the separate Invoice Item and Invoice to actually charge... right?

tulip peak
#

Yeah, I'm just updating the quantity of the per-seat flat-item

#

Is using flat-item for per-seat pricing the right thing?

#

or should I move to usage-based?

jovial ginkgo
#

flat rate is correct to charge up front

#

usage-based is for metered billing

#

And would charge at the end of the cycle based on submitting usage

tulip peak
#

got it, and another query.
if it's metered usage, then do I have update the quantity for every cycle?

( I didn't try this is simulation hence asking ๐Ÿ˜“ )

#

I'm sure that flat-price persists the quantity through the cycles, but I don't think metered billing does it right?

jovial ginkgo
#

Yes metered relies on your submitting usage records

tulip peak
#

got it.
Then sticking to flat-seat.

  • For upgrading, upgrade with proration_behaviour: none and this'd charge immediately ( confirming again if this'd absolutely charge immediately or do I need to create an invoice parallely? )
  • For downgrading, downgrade with the same proration_behaviour and it should be fine.
jovial ginkgo
#

For upgrading, upgrade with proration_behaviour: none and this'd charge immediately ( confirming again if this'd absolutely charge immediately or do I need to create an invoice parallely? )
No nothing will happen unless you also create the Invoice

tulip peak
#

got it, I'll create an invoice and it'll be charged immediately.

and for upcoming billing cycles, per-seat is charged in the beginning of the cycle

jovial ginkgo
#

got it, I'll create an invoice and it'll be charged immediately.
You create the Invoice and then you will need to call the /pay endpoint (https://docs.stripe.com/api/invoices/pay) to have it be charged immediately

#

and for upcoming billing cycles, per-seat is charged in the beginning of the cycle
yes

tulip peak
#

perfect!
I'll try this out.

Thanks for your support ๐Ÿซก
and bearing with me โค๏ธ

Is there a way to reopen this thread if something doesn't work?
or I'll open a new support ticket?

jovial ginkgo
#

You just create a new post and someone will be around to help!

tulip peak
#

perfect!
thanks a lot for helping me out ๐Ÿซก

jovial ginkgo
#

Sure thing