#nickdnk - metered upgrade
1 messages ยท Page 1 of 1 (latest)
๐ happy to help, I'm stepping in for my colleague
I'm not sure I really follow the question
I have a sub with 3 prices all on metered billing. I need them moved to a new price, with the same metered structure, but a higher price
you just want to update the subscription items?
So I'm thinking I loop the sub, match the price id against the ones I want to replace and update each items price ID. Then for each item I fetch a usage record summary and resolve the highest quantity on there for each item, then update the sub and create 3 new usage records?
Yeah that would work for non-metered billing
the link, that is
I could test it but I'm pretty sure it would
I think I got it, I'll get back to you if I can't make it owrk
I just wanted to make sure there wasn't an easier way
I think if you just update the price for the same item (by providing the id) is the best thing to do
But what will happen to the metered values?
Wouldn't they go to 0 for the item?
take sub_1LFGtQL7ilRdQXxE8zaT0sNk for example
Currently has 4, 2 and 1 as values
for ucpoming invoice
I think since proration will be applied
I don't need proration
ok in that case I'm pretty sure the usage would not be affected
Okay I'll try one
It totally worked
I guess since I was replacing the price and not the item it kept its metered values
Thanks
Yeah no that didn't work for tiered pricing
Look here
sub_1K1rTxL7ilRdQXxEAFLf6CG1
It has the correct quantity, 603, but it says 0 in unit price?
Doesn't even make any sense
price_1LAD8hL7ilRdQXxExKPaMhp4 is the price
it should have 5.5 euro per 100 to begin with
๐ I'm taking over since @cyan plinth had to head out - let me wrap up a few other threads and I can take a look
Alright. Kind of an SOS though now
haha
It worked fine for "Active User" and "Identity" but those are not tiered
It might be because the top tier is free and it's somehow not correctly applying the bottom tiers
Because it did work for this one, which is on the same new price but on a lower tier: sub_1LFGtQL7ilRdQXxE8zaT0sNk
It correctly has quantity of 2 at 5.5 each: 11 euro
Exact same code updated both subs
Let me look now
Looks broken to me
I have to run the script for all my subscriptions pretty soon as they are currently not updating correctly when users make changes on our end, since it does not find the expected price objects in each sub.
So should I try creating a new usage record for the sub and see if that fixes it?
Give me just a couple more minutes - still looking at something
Sure, I won't change anything until you get back to me
Was your intention to have each tier applied before moving on to the next one?
My intention was for the sub to remain as-is
Just with a new pricing model
But it seems ot have applied the highest tier (free) to the full quantity of the item
That's because price price_1LAD8hL7ilRdQXxExKPaMhp4 has tiers_mode: volume - it looks at the total quantity and then applies the tier that matches
Which in this case is the free tier (because the quantity is greater than 200, which is the highest tier that has a unit cost)
I would expect it to apply from quantity 1 and up, similarly to if I created a usage record
so how do I fix this? create a new usage record?
I would expect it to look like this: sub_JJFcBJ8Dx8qTuT
Because the tiers are identical on the new price
Yeah, but if you look at pl_1EXvSZL7ilRdQXxEjgtYMnY3 it has 'tiers_mode: graduated'
That's why they're behaving differently
I don't see that anywhere on the dash though
So it's simply because it's completely different price I created
Yeah - fundamentally you're getting different behavior because the old and new price are different (more specifically, they have different tiering schemes)
Alright, so I can fix this by creating a new, correct one and just migrating them again
with the same quantity
price_1LIEsnL7ilRdQXxERjJEsRTG would work then
Yup, I believe that one should work
Yea it's good now: sub_1K1rTxL7ilRdQXxEAFLf6CG1
Thanks for clearing that up. I totally missed that there were two types of tiered pricing types
So yea we have some very angry people that have been trying to get their money back for a while
And it's taken a looong time
Alright
And now the funds are just listed under that "future refunds" section which is not really useful
The funds were transferred explicitly to cover this negative balance
Copying your original question here:
Is it normal for incoming payouts (to cover a negative balance) to not affect an account's balance? acct_18w8yoIFDslEWhBA has -10,150.40 DKK and 11,224.80 DKK under "future refunds or disputes" It's supposed to use those funds to cover pending refunds.
@lunar bridge the "future refunds" balance is essentially a holding place for funds to make sure that any refunds that come through are covered first and foremost. If you need to transfer that balance to the existing negative balance, then you'll need to reach out to support and have them review your account to see if that can be done manually from their end.
Find help and support for Stripe. Our support center provides answers on all types of situations, including account information, charges and refunds, and subscriptions information. Get your questions answered and find international support for Stripe.
Alright, but what is the point of not using those funds?
I don't understand the use-case for not consuming those immedaitely for pending refunds. It even says "add to balance" to cover the negative balance, which is what we did
It also says "Each day, these funds will be used to cover any negative balance on your account."
so I should wait 1 daY?
I'm not sure. I wish I could help, but this chat is focused on developers and technical questions. Our support team will be able to assist you better than I can: https://support.stripe.com/contact/email
Find help and support for Stripe. Our support center provides answers on all types of situations, including account information, charges and refunds, and subscriptions information. Get your questions answered and find international support for Stripe.