#.saberkhan
1 messages · Page 1 of 1 (latest)
Hello! Not sure I understand. Can you provide more details? What's your question?
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
Can you give me the request ID for the Checkout Session creation request? Here's how you can find a request ID: https://support.stripe.com/questions/finding-the-id-for-an-api-request
cs_test_b1sSZ4guEKcfqbaWa5ScKep3NDGLSxl6F1Kl3hQEOe8AttIRJuzkbLegvZ
The EUR option you specified in that request was not used becuse this Checkout Session used USD for everything else: https://dashboard.stripe.com/test/logs/req_vJNq3viT5ZmBTY
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.
Yep, and that would have been used if the Checkout Session used EUR, but all of the line items you specified were in USD.
Then what is the purpose to include this line of code "shipping_options.shipping_rate_data.fixed_amount.currency_options"
That's for when you're using things like multi-currency Prices: https://stripe.com/docs/payments/checkout/present-local-currencies?platform=multi-currency-prices
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?
Currency conversion is different from presentment currencies.
The option you're setting in the API pertains to the currency presented to the customer.
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.
That's now how this Checkout Session is configured though, you're specifically specifying only USD for most of it.
If you want Checkout to automatically display different currencies to different users based on their location you need to specify multi-currency Prices.
The details are on the page I linked you to above.
I set it up.
Ok, and is something not working like you expect? If so, what specifically?
How to test that multicurrency is working in test mode?
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.
What do you mean in the URL? What options? You configure this on the session when you create it.
If you want to force a specific default currency you can provide that when you create the session with a multicurrency price:
https://stripe.com/docs/payments/checkout/present-local-currencies?platform=multi-currency-prices#specify-a-currency
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?
No, we don't provide that. You can test different defaults with the session create parameter.
You can test different defaults with the session create parameter. Please share a code snippet.
There's a snippet here
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
Can you share the session ID you tested?
Look here: https://dashboard.stripe.com/test/logs/req_WUCP7Bv39eBWe7 -- there are a ton of extra parameters here, but the key ones are:
- You set
currency=usdin this request - You're setting items with
price_data
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.
You can't specify multicurrency prices with this pattern, you must create & provide explicit price IDs like price_123
So I should not use price_data feature?
Not if you want to set up multi-currency prices, no
Ok I will test again by removing price_data features.
you'll need to create the multi currency price and specify it as price: 'price_123' in the line items
How to create multi currency price?
line_items.price" This is the one I should be using to set up price. Right?
Yep, after you create it
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.
You need to create the price separately, either in the dashboard or API
you cannot do it in the session create request
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
So i need to use price api then
Yes, or the dashboard
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
Yes, creating tax rates via the API is manual tax rates, compares to automatic tax:
https://stripe.com/docs/tax/checkout