#Moshe

1 messages ยท Page 1 of 1 (latest)

frosty nicheBOT
untold basin
#

Hi ๐Ÿ‘‹ 0.08 does represent $0.0008 USD in our API, as amounts are represented in the smallest unit for the selected currency (cents for USD).

Retrieving the Price object is the correct way to check the per unit price via the API.

warped lintel
#

I'd like to calculate on my end how much n units will cost the user. Given 100,000 units with the Price, it will cost the customer $80. However, if another Price is $0.0002, it cost the user $20.

#

I need the base cost per unit to do this math

#

It seems like unit_amount_decimal / 100 would be the way for me to get the price per unit

untold basin
#

If you are representing amounts on your end in dollars, then yes that approach seems right.

#

I'm closing this thread, but if there are additional questions or anything else that we can assist with, then please let us know in #dev-help. ๐Ÿ‘‹