#alphazero_best-practices
1 messages ยท Page 1 of 1 (latest)
๐ 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/1235220858944098374
๐ Have more to share? Add more details, code, screenshots, videos, etc. below.
The doc you shared outlines the steps: https://docs.stripe.com/payments/checkout/multi-currency-prices#add-multiple-currencies-to-a-price
but for that I need to explicitly provide currency correct?
I want a solution that would directly present correct currency based on the currency available on the product
You only specify the currency if you want to override the checkout behaivor of currency localisation. If you don't pass currency then Checkout handles it automatically
https://docs.stripe.com/payments/checkout/multi-currency-prices#specify-currency
When you use multi-currency Prices in a Session, Checkout automatically handles currency localisation for your customers.
However, you can override this behaviour by specifying a currency during Checkout Session creation.
alright
but there is another issue
for example current product has few subscription active rather than being able to add currency to that product I am only able to add new price
Oh I wasn't aware of that limitation, let me check
I think i misunderstood you there.
Are you saying you can't add a new price with different currency to the product? OR are you saying you can't update the current currency of the price that your customers are subscribed to?
Let me provide the screenshot
sorry my laptop is glitching
didn't get a notification
Ah so you're trying to update currency on an existing price. That's not something we support. You can only create a new price with the new currency.
Taking a step back, why are you trying to update an existing price currency? I thought you wanted to present currency based on location?
Yes, but some limitation on development side is such that they are leveraging price id rather than product Id to get subscription rate
I understand this is wrong
and it's a complete mess, and I really dont want to refactor the payment module
Yes, but some limitation on development side is such that they are leveraging price id rather than product Id to get subscription rate
I don't know what you mean by that. Can you elaborate?
Hello ๐ catching up but I am having trouble understanding what you are blocked on here. Is it updating the price on the existing subscriptions that were created at this current price? Or something else?
No, it isn't updating price on currently active subscription. I am trying to implement geolocation based pricing. Well as hanzo mentioned above that I cant update currency on existing price. So I'll have to reference a new priceId
however there is only one issue left in checkout
Gotcha, and what is that issue?
I have configured new price for the same product however it is unable to load PKR price in pakistan region
Interesting, so the price's other geos work but specifically Pakistan is not localizing properly?
Can you send me the ID of that price? (price_1234)
price_1PBLK7HsXs2PHaSLZPdhtHTx
Unfortunately it looks like we don't support PKR for adaptive pricing at the moment. We have a list of supported currencies here:
https://docs.stripe.com/payments/checkout/adaptive-pricing#supported-currencies
So how can I charge in PKR?
from checkout
do I have to check IP address and show localised pricing from there?
that can be circumvented via VPN
Yep, to present in PKR you would specifically need to specify it. So I think for now that would meant that you would need to have some geolocation logic to know when to specify PKR
and to use currency within context of checkout session, I'll have to utilize productId rather than priceId
The doc that hanzo linked to shows that you can pass the price ID and specify a currency. So you can send that price ID and then specify pkr as the Session's currency https://docs.stripe.com/payments/checkout/multi-currency-prices#specify-currency
though it presents few issues
You cannot combine currencies on a single customer. This customer has an active subscription, subscription schedule, discount, quote, or invoice item with currency usd.
that's the error
You can't have two active subscriptions with different currencies on the same customer but you should be able to change the price on their existing subscription if they have one https://docs.stripe.com/invoicing/multi-currency-customers
To have two subscriptions with different currencies, you would need to make another Customer object to represent that same person. I understand that that may not be ideal but that is the workaround at the moment