#dvlden-currency-conversion

1 messages · Page 1 of 1 (latest)

outer kilnBOT
idle dune
#

Hello!

fallow cloud
#

Hello Karbi 🙂

idle dune
fallow cloud
#

Hmmm I can see there that I need to create price with multiple currencies myself and specify the unit_amount for each currency.

stripe prices create  \
  --unit-amount=1000 \
  --currency=usd \
  --product="{{PRODUCT_ID}}" \
  -d "currency_options[eur][unit_amount]"=9000 \
  -d "currency_options[jpy][unit_amount]"=12000

Am I mistaken? If not, I want to know how would I do these conversions dynamically, cause I don't want to manually convert these day-to-day for each product and its prices.

I've been given this by Stripe support:
https://dashboard.stripe.com/currency_conversion

But I need an API access to this or an alternative.

idle dune
#

Yeah, unfortunately getting dynamic pricing like that is not something we support right now, and we don't have a specific currency conversion API either

#

There should be third-party apis that do this, but we don't have any specific recommendations for which one to use

fallow cloud
#

Also, I've read the Automatic Currency Conversion that is only for Checkout. We applied for that feature a while ago, no approval yet.

Now we're working on much more flexible and custom flow and we'll switch to Stripe Elements instead.

I read this bit:
"This price updates automatically as exchange rates change without you needing to update your integration."

How does this work exactly, so I can know some important implementation details for my problem here.

As I'm aware, once a price has a checkout or subscription, price cannot be updated. Is that not the case for additional currencies?

idle dune
#

Ah, so you already know about the beta feature - I'm not sure of the internals of how it works (and we try not to talk about beta features in this channel as well)

#

dvlden-currency-conversion

fallow cloud
#

Oh sorry about that.
Can you at least tell me about this last question?

#

Can we update additional currencies of an price if we already had a sale on it?

#

And by updating, I do not mean adding more currencies, but changing the price?

Cause value of one currency can change drastically over time.

idle dune
#

As far as I know, once you've set the unit amount for a price you can't update it

fallow cloud
#

Hmmm so using currencies is not recommended then?

That's why I find the beta feature interesting as it will constantly set additional currencies to the latest currency conversion based on original product price. And if we cannot do that with API ourselves, then I guess it's recommended not to use multiple currencies?

idle dune
#

You're still totally welcome to do this yourself - you just can't be constantly updating the Price. You'd likely want to use one-off Prices (so if you were creating a Subcription you'd set price_data instead of passing in a Price ID)

fallow cloud
#

So wait, I must be missing something.

Let's say that I'm creating now a product and 1 price for it with multiple currencies.

This product will now be saved on both Stripe and my own database.

Hence, client-side app will receive data from my database, so we don't hit Stripe again.

Customer comes to buy a product and sees price in his local currency by geo. Say 10€ and original price is $11.

Then after 1 month some other customer comes and sees price 10€ (but in the meantime EUR became much more worthy than USD) so the price should now be 8€ (for example)

How do I tell Stripe that the price should now be 8€ instead of 10€ which is set as additional currency unit value on the Stripe product's price?

idle dune
#

You would NOT create a price with multiple currencies. For each purchase made by your customer, you'd need to dynamically calculate what you want the price to be (and in which currency), and then pass that data to us to create a one-off price just for that purchase. So as an example, if you were doing Subscriptions you'd set items[0][price_data https://stripe.com/docs/api/subscriptions/create#create_subscription-items-price_data and give all the unit amount and currency information for that specific purchase)

fallow cloud
#

I do not see price_data available for Create Checkout Session

Is it not possible for one-time payments?

fallow cloud
#

Oooh neat

#

Now I understand. I was making a Product with a price and assigning multiple currencies on it, but this is only for Stripe Checkout (I assume).

Instead I should be creating a product with single primary currency and convert on the fly for each Checkout and pass it to this property that you sent me.

#

Thanks karbi. You've been of great help!

idle dune
#

yup, if you want dynamic currency conversion right now then that's what you should do 👍