#mochi-invoice-upcoming
1 messages ยท Page 1 of 1 (latest)
mochi-invoice-upcoming
@patent grail can you tell me what's confusing?
I ask because someone on my team literally rewrote that error message 2 weeks ago to make it way clearer so if it's not good enough I want to know
how do i get this to work
did you read the error message? What's unclear?
well the weird thing is that I can update the subscription to this price no problem but i want to be able to preview it
so there must be some fields that I'm missing or something
how do you do the update? Can you share the exact code?
yea
payment_behavior: 'pending_if_incomplete',
proration_behavior: 'always_invoice',
items: [
{
id: subscription.items.data[0].id,
price: newPriceId,
},
],
});```
okay so you're doing it clearly differently right?
you pass price and id in that call but not the Upcoming Invoice one
the latter, the one inside items
ok
what the error message is trying to tell you is that you're having 2 separate Prices with different billing cycles
If you meant to update an existing subscription item instead of creating a new one, make sure to include the subscription item ID in your request
so that part of the error is trying to be clear
so do i just need to add the id
it's totally fine if it's not, you're just the first developer who raises this after our rewording
yeah
you basically want your code for both to look ~identical
lol I just saw where it said that
this is on me sorry lol
its very clear
thank you
haha all good
the problem with error messages is that if they are short they are vague if they are long most of us developers just skim them and ignore them
it's really hard to find the right balance ๐ฆ
you are correct my good sir
also I cant even imagine how many times you get frustrated with devs that just want you to answer things that are clearly spelled out in the documentation
trying to use this as a human version of chat gpt lol