#tomasfejfar_code

1 messages ยท Page 1 of 1 (latest)

fiery flameBOT
#

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

๐Ÿ“ 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.

flint chasm
#

I also searched for the error, but what I found suggested that the problem is that it doesn't match the account currency.

astral compass
#

hi there!

flint chasm
#

I also searched the deprecations for "currency" which didn't provide anything useful in terms of BC breaks

#

Hi again ๐Ÿ™‚

#

So I have this set up now - which should be correct IIUC

astral compass
#

that customer has a default currency set to "czk". so you need to use the same currency for the invoice items

flint chasm
#

How did I set it for the customer?

#

it's newly created customer made in code and the code doesn't contain "czk" anywhere

astral compass
#

it's set automatically. you can unset it if you void all invoices/subscription of that customer, and make sure the customer balance is set to 0.

flint chasm
#

I'll check if I can set it manually when creating

#

that would be easiest

#

It's under the more attributes, I'll try that

astral compass
#

nope, like I said, it's set automatically. that's not something you can directly control

flint chasm
#

So I need to create the customer and then immediately update it with the new currency?

#

Or how do I "unset" the CZK?

astral compass
#

if a customer has an open invoice in currency A, then the customer default currency is A, and you can only create invoice in currency A.

#

Or how do I "unset" the CZK?
I already explained that earlier:
you can unset it if you void all invoices/subscription of that customer, and make sure the customer balance is set to 0.

flint chasm
#

So customer has the currency of any open invoice. If there are no open invoices, it can have any.

#

I'll test that.

#

Thanks

astral compass
flint chasm
#

I removed all invoices of the test customer cus_S3qXXpPggXALwh

#

But then when I create new empty draft invoice, it'S created in CZK

#

So I need to unset now the currency via API, before I create the invoice?

astral compass
#

is this the new Invoice ID? in_0R9jEj6BNHJembTsBT2Qnc3H

flint chasm
#

No such invoice: 'in_0R9jEj6BNHJembTsBT2Qnc3H'

#

I deleted it from the customer, so maybe. I can run the payment again to create a new one

#

This is the one I created now with new payment in_0R9jJE6BNHJembTsaEjqu3zh

#

Even though the customer didn't have any other invoices, it was created in CZK and refused to add the USD project - so it's empty

#

I may pass the USD to the invoice create I guess ๐Ÿค”

astral compass
#

hum... that's odd.

#

can you try with a brand new customer to see if that works?

#

I may pass the USD to the invoice create I guess ๐Ÿค”
yes you can try that too

flint chasm
#

That works.

#

๐ŸŽ‰

#

The API update is proving more complicated than it seemed ๐Ÿ˜„