#.saberkhan

1 messages · Page 1 of 1 (latest)

topaz lintelBOT
elder dove
#

Hello! Not sure I understand. Can you provide more details? What's your question?

potent stag
#

I am creating checkout session and I added the above line of code "eur" as a currency. The checkous session is created without erro but when I visited the chekout url, I do not see the shipping cost in "eur". Not sure that is what I am suppose to see it in text checkout url. So I inputed "eur" in the code: shipping_options.shipping_rate_data.fixed_amount.currency_options.<currency>.amount

elder dove
potent stag
#

cs_test_b1sSZ4guEKcfqbaWa5ScKep3NDGLSxl6F1Kl3hQEOe8AttIRJuzkbLegvZ

elder dove
potent stag
#

True but look at the document here Shipping rates defined in each available currency option. Each key must be a three-letter ISO currency code and a supported currency. For example, to define your shipping rate in eur, pass the fields below in the eur key of currency_options.

Hide child parameters
shipping_options.shipping_rate_data.fixed_amount.currency_options.<currency>.amount
REQUIRED
A non-negative integer in cents representing how much to charge.

#

I think that I should see the shipping rate in EUR.

elder dove
#

Yep, and that would have been used if the Checkout Session used EUR, but all of the line items you specified were in USD.

potent stag
#

Then what is the purpose to include this line of code "shipping_options.shipping_rate_data.fixed_amount.currency_options"

elder dove
potent stag
#

In my checkout integration, I am using automatic currency conversion. So I should able to see the shipping price if I include another currency in here shipping_options.shipping_rate_data.fixed_amount.currency_options. Am I right?

elder dove
#

Currency conversion is different from presentment currencies.

#

The option you're setting in the API pertains to the currency presented to the customer.

potent stag
#

I understand but when customer see it for example from a European country the Stripe will display both usd and eur currency. And european customer have a choice to pay either usd and eur. If this is true, then European customer should be able to see the shipping price in eur.

elder dove
#

That's now how this Checkout Session is configured though, you're specifically specifying only USD for most of it.

topaz lintelBOT
elder dove
#

If you want Checkout to automatically display different currencies to different users based on their location you need to specify multi-currency Prices.

potent stag
#

Where at

#

How can I set up multi-currency prices?

elder dove
#

The details are on the page I linked you to above.

potent stag
#

I set it up.

flint hemlock
#

Ok, and is something not working like you expect? If so, what specifically?

potent stag
#

How to test that multicurrency is working in test mode?

flint hemlock
#

You would visit the checkout session url and see the currency options. You can try using a VPN to geolocate yourself somewhere else to affect the default Stripe chooses.

potent stag
#

Cool

#

Is currency options in checkout url? Becasue I do not see it in checkout url

flint hemlock
#

What do you mean in the URL? What options? You configure this on the session when you create it.

potent stag
#

Ok then I do vpn and geolocate to another place to see if different curreny appears on the url. Right

#

Do you have an url from where I can use vpn for testing purpose?

flint hemlock
#

No, we don't provide that. You can test different defaults with the session create parameter.

potent stag
#

You can test different defaults with the session create parameter. Please share a code snippet.

topaz lintelBOT
potent stag
#

I used vpn and change location to Netherlands from USA, copy and paste url but I do not see any change in currency from usd to eur.

#

This is to test multicurrency

flint hemlock
#

Can you share the session ID you tested?

potent stag
#

ok

#

cs_test_b1mj0gS9qR75IgveZBrPjCO1CXIAsxvbhPk0Z4B5FQ52wwvhb5Hcka65IC

flint hemlock
#

You can't specify multicurrency prices with this pattern, you must create & provide explicit price IDs like price_123

potent stag
#

So I should not use price_data feature?

flint hemlock
#

Not if you want to set up multi-currency prices, no

potent stag
#

Ok I will test again by removing price_data features.

flint hemlock
#

you'll need to create the multi currency price and specify it as price: 'price_123' in the line items

potent stag
#

How to create multi currency price?

#

line_items.price" This is the one I should be using to set up price. Right?

flint hemlock
#

Yep, after you create it

potent stag
#

So for each line item, I should set up multiple currency. Right?

#

If you have a sample code to share that would be great.

#

to setup multicurrency line items.

flint hemlock
#

You need to create the price separately, either in the dashboard or API

#

you cannot do it in the session create request

flint hemlock
# potent stag So for each line item, I should set up multiple currency. Right?

If you have multiple line items, yes the feature will only work if all prices have the matching currency option for the customer, otherwise the default is used
Read more here: https://stripe.com/docs/payments/checkout/present-local-currencies?platform=multi-currency-prices#supported-integrations

Present prices and charge payments in your customer’s local currency using Checkout or Payment Links.

potent stag
#

So i need to use price api then

flint hemlock
#

Yes, or the dashboard

potent stag
#

ok

#

Price localization isn’t available for:

Checkout Sessions that use manual tax rates.

#

What is manual tax rate. I created tax rate using tax rate api. So it is not manual? Right

flint hemlock