#satanclaus5320

1 messages · Page 1 of 1 (latest)

gilded harnessBOT
eager yarrow
#

Hello there

#

Can you summarize what you are trying to accomplish here?

#

Snufkin had to step away a bit ago

carmine whale
#

Ok.

#

Here is my initial message. Sec

#

Hi team. My service sells product X. Customers can launch a product and use it via an API. There is a cost per hour and a cost per API request. Q1: Is it possible to model it with Stripe? Q2: If a customer launches/terminates a product 5 times a day, would that be 5 subscriptions started/canceled?

eager yarrow
#

Okay so you likely want to use metered billing here

carmine whale
eager yarrow
#

Yep, I would use metered (usage-based)

#

So that you can track the per hour and the per API request

#

Does it matter in terms of charging whether the customer "launches"/"terminates"

#

Or it is just based on use across sessions

#

And are you planning on charging after a certain amount of time? Like monthly?

carmine whale
#

Think of it as servers. A customer spins up a "server" (or many servers). Each server costs money if they don't use it. So I need to charge per hour.

#

If they make API reqests to the server to do some processing, there is a Pay Per Request charge.

eager yarrow
#

Okay sure

#

So all of this can easily be tracked via usage-based billing

carmine whale
#

At the end of the month, I need to charge them for all the hours + all the API requests they made (acorss many "servers").

eager yarrow
carmine whale
#

I integrated with metered billing, but it's per "unit". In my case a unit is either an "hour" or API request. But how do I combine both?

eager yarrow
#

You would have two different Prices

#

One to track the hours and one to track the API requests

#

Then you submit usage separately to each Price (each Subscription Item)

carmine whale
#

ohhhh, i see. Ok. Thanks. What about Q2? If a customers launches/terminates 100 servers within a month, - that would be 100 subscriptions, right?

#

Every time they launch - create subscription, every time they terminate - cancel subscription.

eager yarrow
#

No I wouldn't do that

#

That would be really really messy

#

I would just submit usage when they terminate for the hours that the server was "launched"

#

So you will just need to track that on your side

#

When they start using the server

carmine whale
#

but they can spin up 5 servers in parallel

eager yarrow
#

Do they cost different amounts?

carmine whale
#

yes

#

and no

#

there are product types

#

they can spin up 3 products A and 2 products B

eager yarrow
#

Yeah mostly this is up to you. I'd recommend just adding a different Price/Product for each different type of server

#

You can still combine all of those into the same Subscription

#

So you can have 3 quantity of Price/Product A and then each unit of usage charges x3 at that Price.

#

And quantitiy 2 of Price/Product B

carmine whale
#

hm, would that account for time?

Day 1: launch product A.1 (hourly metering starts)
Day 2: launch product A.2 (A1: 24hours, A2: 0)
Day 3: launch product A.3 and product B.1 (A1:48 hours, A2: 24 hours, A3: 0, B1: 0)

eager yarrow
#

You record the time yourself via submitting usage

carmine whale
#

Gotcha. All of that still 1 subscription?

eager yarrow
#

So yeah not really an issue

#

Yep you can do it all in 1 subscription

#

Which would be my recommendation as it will make a lot more sense to the customer than having multiple subscriptions

carmine whale
#

Agreed. Thanks. I will try to explore further. All in all, as a summary, I could do the following:

  1. Customer creates an account with my service, and provides CC details - I create a new customer and a new subscription right away.

  2. A customer uses various products - I report usage based on product/price and associate it with the subscription

  3. Cancel subscription only if a customer deletes their account.

eager yarrow
#

Yep that's exactly how I'd do it

carmine whale
#

Thanks a lot!