#drzajwo_api

1 messages ยท Page 1 of 1 (latest)

earnest saffronBOT
#

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

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

thick bluff
#

Hello

#

Your Price is a multicurrency Price

#

So it is localizing based on your location

#

I assume you are in the US, so it is localizing to USD

#

Ah sorry I see what you are saying

#

This is server-side on creation

worldly brook
#

I was using the vpn to move my location to UK, then when I was issuing subscription currency was properly detected to GBP (producs default is USD but supports GBP)

thick bluff
#

I assume USD is set as the default on the Price though, one sec.

#

Yep USD is the default

worldly brook
#

soo is it then configuration issue?

thick bluff
#

No it is fine, your top level Subscription response shows currency: 'gbp'

worldly brook
#

to return same currency as one on which subscripition was issued?

thick bluff
#

Really all of this is handled by us automatically based on geolocation

#

You are doing the correct thing here

#

If you want to create a Subscription for a UK customer

#

You can see the initial Invoice was generated in GBP

#

So that Subscription is locked into GBP now

worldly brook
#

so when getting subscription I should get GBP?

#

because now stripe.subscriptionItems.retrieve returns me currency: usd

thick bluff
#

If you are concerned about the actual currency of the Sub then you should look top level

#

Not at the subscriptionItem

worldly brook
#

so my goal is to retrieve subscriptionItem with the currency on which the transaction was made. Any hint how to do that? I don't get what top level is :/

thick bluff
#

Then you can either expand the latest_invoice to see the actual data about the most recent invoice

#

You don't want to look at the Subscription Item as the Price itself will just show you data about the default currency/amount.

worldly brook
#

ah! got it now! thanks!!

thick bluff
#

๐Ÿ‘