#multi-thread

1 messages · Page 1 of 1 (latest)

weak vortexBOT
atomic mango
#

@dry elm let's chat here!

dry elm
#

Yep! thanks.

#

How can I display the balance in SEK aka true balance.
Used stripe.balance.retrieve to get the balance (NodeJS)

#

Because now it displays 92179 "öre", when it should display 921,79 sek.

#

Which gives the customers the wrong impression.

atomic mango
#

Got it. Stripe returns balances in the currency's smallest units (with some exceptions)

#

In this case, you'll want to divide the value by 100 in order to get 921.79

dry elm
#

Ahh alright got it, so that should work for any currency?

#

as, when I made the product price. I did times 100.

#

But my concern with that, is will it work for any currency?

atomic mango
#

Not any currency. There are a few currencies where you won't have to multiply/divide by 100. I recommend starting here and adding any logic to your code depending on which currencies you accept: https://stripe.com/docs/currencies

dry elm
#

Alright, got it! thanks for the explanation and help. appricate it!