#munjay_api
1 messages ยท Page 1 of 1 (latest)
๐ 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/1397560359077937282
๐ Have more to share? Add more details, code, screenshots, videos, etc. below.
๐ happy to help
I currently have two meters set up with event names 'paper' and 'minute'
but it seems i cant attach two meters to one subscription
would you mind sharing the request where you saw this error?
im trying to do it via the stripe console
is it possible to have two meters attached to the subscription?
even with stripe console you can get the request ID it's req_xxx
i havent made a request though
but it seems i cant attach two meters to one subscription
where did you get that from then?
each meter is linked to a price
and you can have multiple prices on the same subscription
okay so
i have a product
which contains my 3 subscription tiers (as 3 prices)
i should define two new prices which are linked to those meters
and add those to the subscription as needed?
correct
yes
okay
and what api would i be using to add those?
billing.meteredEvents?
or invoiceItems?
or subscriptionItems?
you add the prices to the subscription items
and then you record the usage https://docs.stripe.com/billing/subscriptions/usage-based/recording-usage-api
with meter events
so i have to do subscriptionItems.create() - where i add those two prices to the subscription, and then i can call meterEvents.create?
ill give this a try
i have a follow up
since i have 2 subscriptions, and im only managing one subscription id per user,
if they change from the Tier C (where they will be on a metered usage)
to Tier B where they are not on metered usage, will i have to remove those subscription items?
hey there, stepping in for tarzan who needs to step away
You can either remove the metered price item and add a seated price item, or you can swap out the price used on the existing item, both should work with similar results on the invoice.
I suggest trying both, and see which gives you the invoice behaviour that you want
im not sure i understand -
currently, if a user attempts to upgrade or downgrade their subscription, im calling subscription.update( with some new priceID here )
this is already working
my concern is what happens when i add 2 new subscription items to Tier C, and whether i need to remove those 2 subscription items, should i downgrade to Tier B
Are you describing "Tier B" has just a single item, say price_1, while "Tier C" has 3 items: price_1, price_2, price_3?
And so upgrading from B to C is really adding two items?
In that case yes I'd say that downgrading from C to B involves deleting the items with price_2 and price_3
Tier B - this is a recurring subscription 15$ per month
Tier C - this is a recurring subscription 50$ per month
but Tier C (in this new method that i want to implement) will have two additional items -
a metered usage for $1 per unit, and
metered usage for $0.33 per unit
on second thoughts - could i just leave the metered price items on the account? if they are on Tier B, we wont be creating any metered events anyway, so they wont be charged
Yea, you can leave them with 0 reported usage which should have no impact as long as your price has no base cost
when you say no base cost, do you mean the pricing model is usage-based
metered prices can have a fixed/base cost, eg $100/mo for up to 1000 units, then 1c/unit over that or something
so if you have something like that then leaving the item on will cost your customer even if they arent using it
depends on your pricing model
if your meter price is purely consumption based, no fixed/flat cost, then no problem