#clement-pinchedez_best-practices

1 messages ยท Page 1 of 1 (latest)

river craneBOT
#

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

๐Ÿ“ Have more to share? Add more details, code, screenshots, videos, etc. below.

urban mantle
wheat latch
#

Hey there

urban mantle
#

Hello

wheat latch
#

How do you normally charge customers?

#

For one-off payments and invoices, you should be able to charge a customer in any presentment currency you like at any time

#

For subscriptions, you cannot have simultaneous active subscriptions in different currencies for a single customer

urban mantle
#

Hello, we usually create and send invoice with charge_automatically property

wheat latch
#

One off invoices?

urban mantle
#

yes

wheat latch
#

Ok then you can just use a price with a different currency and that should be respected. Are you encountering an error when you try to do this?

#

Customers used to be locked to a single invoice/subscription currency based on the first payment, and it was not mutable, but that's been loosened since.

urban mantle
#

yes, here is the issue we had:

  • the customer has the USD default currency
  • we create invoice line items in EUR
  • we create an invoice in EUR currency
    The invoice line items are not added to the invoice when we finalize it
wheat latch
#

Can you share an example?

#

eg, a request or invoice ID

urban mantle
#

let me check

#

and this invoice in_1Ro0FEAMgvgeiO2ubwOUKcgX

#

I am sorry - for this invoice, we had this issue:
-the customer is in EUR default currency (because he got invoices in EUR)
-we created USD invoice lines

  • we created an invoice - but this created a 0 EUR invoice without the USD invoice lines
wheat latch
#

Right, because USD invoice items cannot be included on a EUR invoice

#

Try specifying currency=usd when you create the invoice

urban mantle
#

Indeed, we do not specify it

wheat latch
#

Which, for context, is setting the currency of the invoice rather than the customer

urban mantle
#

and then the pending invoice items will be included to the invoice if they have the same currencies ?

wheat latch
#

Yes, I expect that is what you'll observe

urban mantle
#

ok, thanks!

wheat latch
#

Give it a try for that customer and i can take a look

urban mantle
#

this is a production environment I will rather try on the test environment

river craneBOT
urban mantle
#

Googd news, I did the test for this invoice in_1SNDjpAMgvgeiO2uCFHdd8mN in a test environement and that works

wheat latch
#

Great!

urban mantle
#

so I will use this. Thanks for your help.

wheat latch
#

NP! Glad that got you what you needed ๐Ÿ™‚