#mochi-invoice-upcoming

1 messages ยท Page 1 of 1 (latest)

torn hazelBOT
wide folio
#

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

patent grail
#

how do i get this to work

wide folio
#

did you read the error message? What's unclear?

patent grail
#

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

wide folio
#

how do you do the update? Can you share the exact code?

patent grail
#

yea

#
            payment_behavior: 'pending_if_incomplete',
            proration_behavior: 'always_invoice',
            items: [
                {
                    id: subscription.items.data[0].id,
                    price: newPriceId,
                },
            ],
        });```
wide folio
#

okay so you're doing it clearly differently right?

#

you pass price and id in that call but not the Upcoming Invoice one

patent grail
#

when you say id

#

you mean the id of the subscription or subscription item

wide folio
#

the latter, the one inside items

patent grail
#

ok

wide folio
#

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

patent grail
#

so do i just need to add the id

wide folio
#

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

patent grail
#

lol I just saw where it said that

#

this is on me sorry lol

#

its very clear

#

thank you

wide folio
#

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 ๐Ÿ˜ฆ

patent grail
#

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

wide folio
#

hahaha depends on the character of each member of my team

#

me? A LOT lol and I show it :p

#

but overall it's fair, we reply fast and it's so easy to just ask a question. As long as you're willing to work with us, try things, etc. we're always happy to help ๐Ÿ™‚

patent grail
#

I appreciate it!

#

I'll be back lol