#munjay_api

1 messages ยท Page 1 of 1 (latest)

fallen sinewBOT
#

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

flint rapids
#

๐Ÿ‘‹ happy to help

main rover
#

I currently have two meters set up with event names 'paper' and 'minute'

#

but it seems i cant attach two meters to one subscription

flint rapids
main rover
#

im trying to do it via the stripe console

#

is it possible to have two meters attached to the subscription?

flint rapids
#

even with stripe console you can get the request ID it's req_xxx

main rover
#

i havent made a request though

flint rapids
#

but it seems i cant attach two meters to one subscription
where did you get that from then?

main rover
#

theres no option to add more meters

flint rapids
#

each meter is linked to a price

#

and you can have multiple prices on the same subscription

main rover
#

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?

flint rapids
main rover
#

okay

#

and what api would i be using to add those?

#

billing.meteredEvents?
or invoiceItems?
or subscriptionItems?

flint rapids
#

you add the prices to the subscription items

#

with meter events

main rover
#

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

fallen sinewBOT
main rover
#

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?

plush zenith
#

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

main rover
#

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

plush zenith
#

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

main rover
#

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

plush zenith
#

Yea, you can leave them with 0 reported usage which should have no impact as long as your price has no base cost

main rover
#

when you say no base cost, do you mean the pricing model is usage-based

plush zenith
#

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