#firstpatriarch-amount

1 messages · Page 1 of 1 (latest)

vivid tangle
#

Hi there

scenic knoll
#

Hi

vivid tangle
#

The Stripe API does not accept decimals in most cases

#

So I'd recommend storing and charging in cents

scenic knoll
#

Okay, but how do we deal with some cases where we need to divide amounts already stored in cents in case of partial refunds for example?

#

Does stripe store these values in cents or in decimals?

#

And how many decimal places does it consider?

vivid tangle
#

We don't accept decimals for refunds

#

So you should perform any rounding you need to prior to passing the amount to the Stripe API

#

Then I would store the actual amount your refunded

scenic knoll
#

I see

#

Just out of curiosity, do you also store these values as integers (cents) or does the stripe db store it as decimal values?

vivid tangle
#

Integers

scenic knoll
#

I see alright, thanks so much 🙂

vivid tangle
#

Sure thing!