#mehdi-product-currency

1 messages ยท Page 1 of 1 (latest)

sullen grottoBOT
dawn ether
#

That is expected, I think the currency is automatically set when you charge the Customer with a certain currency

#

If you need something set to tell you the customer's preferred currency, it may make sense to set that as metadata

rotund stratus
#

Thanks @dawn ether , but we dont have the availability to create bills in a default currency that we can define by advance ?

dawn ether
#

Not really unfortuantely, you will be specifying the currency whenever you create an invoice or payment intent or whatever else

rotund stratus
#

I just created an invoice and it's automatically set in EUR instead of GBP
The associated product was only specified in GBP.
Do you have any hints to better automate the initialisation for the currency ?

dawn ether
#

Can you send me the ID of that invoice? I will take a look

rotund stratus
#

in_1NxWLnHKAGUjiNbk3iq5js08

dawn ether
#

Thank you, checking in to this

#

It looks like the default currency on that customer was set by the creation of that invoice

rotund stratus
#

thanks, the fact is we tried to create that invoice with a GBP product. What is the difference with your solution ?
Our main goal is to setup our customer database, after that our operators will create bills with Stripe Interface

#

Or should we create a draft invoice by API and specify the currency directly after the customer creation ?

dawn ether
#

I did not see a GBP product on the invoce, did you create an invoice item with a GBP product before creating that invoice?

rotund stratus
#

i added this product before leaving the invoice prod_Ol1Vk0M73tNufB

#

but i specified nothing, the total was immediately settled in EUR

dawn ether
#

Can you tell me what API call specifically you used here?

#

Products don't have a currency assosciated with them as far as I am aware, though Prices that use that product would have a currency. So I am not immediately clear on how that product was used in a way to try to set the currency for the invoice

sullen grottoBOT
silk phoenix
#

mohamed-product-currency

#

mehdi-product-currency

#

@rotund stratus did you have more context to provide or details?

rotund stratus
#
  1. We created a customer using your API
  2. I tried to initiate the currency by creating a bill with a product with a price in GBP
silk phoenix
#

I tried to initiate the currency by creating a bill with a product with a price in GBP
Unfortunatley those words don't mean much to me yet. What does "creating a bill" mean? What code did you write exactly?

rotund stratus
#

no code, it's through the user interface

silk phoenix
#

What is "the user interface"? Do you mean the Dashboard? I'm sorry but the vocabulary is crucial to give you the right help here.
If so, in the Dashboard you can choose the currency of a Customer. Click on the Edit button on the left near Details and then scroll to pick a currency

rotund stratus
#

yes the dashboard

#

sorry I'm doing my best to be precise

silk phoenix
#

see what I just said after in that case. Here we help developers with their code though. You do seem quite lost but if you're using the Dashboard only and clicking around you should work directly with our support team instead for help: https://support.stripe.com/contact

rotund stratus
#

the problem is that we would like to manage the initialisation of the currency by developping it.

We tried to overcome the missing currency field in the API with this walkaround

It's not good enough for us to ask our users to set the currencies for each customers

silk phoenix
#

There is absolutely no reason to do this in the API though

#

You pick the currency that is used based on the Price(s) id(s) you pass in the API on Invoice or Subscription creation. You can not and don't need to set the currency on a given Customer in the API.

#

We only have this in the Dashboard for users that only use the Dashboard. Unfortunately you haven't make your ask clear yet. You said something, then when I asked for code, you said no code and Dashboard only, but now you are saying the opposite.

Can you please explain exactly what you are trying to do with your environment in details so that I can help you figure this out?

rotund stratus
#

Here is the use case :
We would like to help our billing agents to send invoices to our customers.

The invoices will be sent by email and written through the Dashboard

We want to help our billing agents to write the bills by setting all our customers with the appropriate data in Stripe

After that, we plan to automate flows with our accounting solution for follow-up

silk phoenix
#

Gotcha, that is unfortunately impossible to set this information in the API. So the best option is to train your agents to set the currency on Customer creation from the Dashboard.

Otherwise the only solution I can think of in this case is to do a hack:
1/ Create an InvoiceItem in the currency you want: https://stripe.com/docs/api/invoiceitems/create
2/ Delete that InvoiceItem immediately after: https://stripe.com/docs/api/invoiceitems/delete

This will force the currency on the Customer to be the same as that InvoiceItem. Not great but it should work

rotund stratus
#

yes

#

thanks

#

your trick will be more reliable than mine with the Dashboard

#

๐Ÿ™‚

#

We will try your hack

#

otherwise we will train our teams to set it corrrectly

silk phoenix
#

๐Ÿ‘

rotund stratus
#

thanks