You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As we are processing money, I think maybe we should be careful with float numbers rounding up issue. Currently, I use
Numeric(10, 2)
for all money fields (also for discount field). I am not sure are two digits float number good enough. Also, we have discount for subscriptions, and we have prorated_refund for canceling a subscription. In this two cases, money amount could be rated. It could be
amount=original_amount*discount*prorated
After all, I have no money processing experience. I have no idea how to process them. Is there anything I should notice? What do youguys think?
The text was updated successfully, but these errors were encountered:
The Balanced API send and receives all money values as integers since everything is represented via cents.
This is an easy way to implement since a cent is the smallest amount of money that can be represented via a transfer. In fact, the minimum amount that can be sent via the Balanced API is 50 cents.
Are there any scenarios where you need to record a fraction of a cent?
As we are processing money, I think maybe we should be careful with float numbers rounding up issue. Currently, I use
for all money fields (also for discount field). I am not sure are two digits float number good enough. Also, we have
discount
for subscriptions, and we haveprorated_refund
for canceling a subscription. In this two cases, money amount could be rated. It could beAfter all, I have no money processing experience. I have no idea how to process them. Is there anything I should notice? What do youguys think?
The text was updated successfully, but these errors were encountered: