#alex-from-fuxam_api

1 messages ¡ Page 1 of 1 (latest)

lunar rivetBOT
#

👋 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/1427293965606060103

📝 Have more to share? Add more details, code, screenshots, videos, etc. below.

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.

old dock
#

Hello, it looks like your question may have gotten cut off:

I can see that a previous subscription's invoice gets updated by

#

Oh I gotcha, I think the main question is that the metered events are updating multiple subscriptions. Unfortunately that is expected behavior as far as I am aware. Meter events only support updating things at the customer level, they don't have a subscriptionItemId parameter as far as I can see. So at the moment the only way to have multiple metered subscriptions for one customer is to create multiple meters and multiple metered prices and create one subscription with each price on the customer.

carmine venture
#

So i would have to dynamically create prices also every time somebody creates a subscription?

#

this used to be so much more reusable and simple with stripe.subscriptionItems.createUsageRecord

old dock
#

Not necessarily, you can use meters across different customers perfectly fine, the issue is that customers can only have one event count per meter. So one way to solve for this could be to have price_1, price_2, price_3, etc and then a customer's first subscription would always use price_1, the second would be price_2, etc

this used to be so much more reusable and simple with stripe.subscriptionItems.createUsageRecord
Absolutely, this is by far the most common feedback I've heard on how these meters works (I'll make sure to add a +1 to it for you). Unfortunately I'm not privvy to why that is the design decision we made there, but it definitely makes use cases like this much more difficult to implement.

carmine venture
#

this still forces me to create prices dynamically because a can make an infinite amount of subscriptions with the same meter and it could create issues if the prices run out

#

is there any other workaround for this? I'm not too happy about creating meters and prices dynamically to be honest, it makes everything a lot more messy

#

appreciate your honesty with this!

#

and your help ofc

old dock
#

Not that this makes this much better but there is a limit of 500 subscriptions per customer, so theoretically you could do this with "only" 500 prices.
The other solution is making a new Customer object each time the customer wants to create a new subscription on that price. The issue there is that by default you can't clone payment methods between customers on your own account. If you reach out to our support team, they may be able to help with that cloning part, but I'm not sure what criteria there may be around it.

carmine venture
#

Okay gotcha, I think we will jsut dynamically create prices and meters then.

Thank you and have a good rest of the day!