#Cvijo

1 messages · Page 1 of 1 (latest)

somber slateBOT
old helm
#

Good question. Checking in to this. Is there a reason you are looking to avoid the normal conversion other than code cleanliness?

balmy sky
#

well problem are those edge cases currencies that has 0 decimal places like YPN so i have to do cases in my code

old helm
balmy sky
#

well for example in paymentIntent i got amounts as long so 100€ you will send to me as 10000 .. so for this i can just devide by 100, but for JPN if you send 100 jpn i should not devide if i get this correctly so i was thinking that SDK might have some utils, extensions for that

old helm
#

Gotcha, thank you for the clarification. Checking in to that and will get back to you

balmy sky
#

btw i asked chat gpt he gave me some answers but in current sdk there are no such extensions, some replays for gpt: Stripe.AmountUtils.ConvertAmountToString(amount, "usd"); StripeConfiguration.Get().StripeDecimalUtils.ConvertAmountToString(amountInCents, currency); StripeDecimalUtils.ConvertAmountToString(amountInCents, currency); but all of those doesnt exists 🙂

old helm
#

So unfortunately it looks like our API and SDK do not currently have a way to differentiate these currencies programmatically. We likely will never change which currencies we do and don't do this with, so you can take that info from the doc and use that to guide how your code treats prices in each of those currencies.

balmy sky
#

ok, tnx Pompey