#satanclaus5320
1 messages · Page 1 of 1 (latest)
Hello there
Can you summarize what you are trying to accomplish here?
Snufkin had to step away a bit ago
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?
Okay so you likely want to use metered billing here
Snufkin suggested that Q1 can be achieved with recurring pricing model - https://stripe.com/docs/products-prices/pricing-models
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?
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.
At the end of the month, I need to charge them for all the hours + all the API requests they made (acorss many "servers").
Have you read through https://stripe.com/docs/products-prices/pricing-models#usage-based-pricing yet?
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?
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)
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.
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
but they can spin up 5 servers in parallel
Do they cost different amounts?
yes
and no
there are product types
they can spin up 3 products A and 2 products B
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
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)
You record the time yourself via submitting usage
Gotcha. All of that still 1 subscription?
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
Agreed. Thanks. I will try to explore further. All in all, as a summary, I could do the following:
-
Customer creates an account with my service, and provides CC details - I create a new customer and a new subscription right away.
-
A customer uses various products - I report usage based on product/price and associate it with the subscription
-
Cancel subscription only if a customer deletes their account.
Yep that's exactly how I'd do it
Thanks a lot!