#kevin-amount-number

1 messages · Page 1 of 1 (latest)

plucky cradleBOT
knotty rampart
#

kevin-amount-number

#

Hey @autumn pike what exact code did you write, what exact error did you get?

autumn pike
#

let me sharee with you the error

knotty rampart
#

that's a picture of poorly formatted text

#

but if you read it it's telling you we expect an integer and you passed a decimal number

#

Our amounts are always in the smallest currency unit for for USD it's in cents. So amount: 1234 is $12.34

#

so if you want to charge $283.50 you need to pass amount: 28350

autumn pike
#

the one above has been multiplied already it was 2.835 which iwas passing so the new amaount is 283.5

knotty rampart
#

sure but that's still not an integer

#

we don't do sub-cents

#

you can't charge someone $2.835

autumn pike
#

for that then what amount should i pass

knotty rampart
#

you can't do that at all

#

you either pass 283 for $2.83 or 284 for $2.84

autumn pike
#

mmh okay thanks on that