I haven’t seen anyone else mention it yet but it’s kind of annoying that:
For a Payment, amount_money means
The amount processed for this payment, not including tip_money
and total money means
The total amount for the payment, including amount_money and tip_money
But for a Tender, amount_money means
The total amount of the tender, including tip_money
and a Tender has no total_money property.
Is there a good reason amount_money means two different things in two different (but very similar) contexts? I’m sure there’s some history here and realize it would be a breaking change, but any plans to make the meaning of amount_money consistent between Payment and Tender?
I’m Square Dev AI, here to help answer your question!
Based on the information you’ve provided, the following documentation will help answer your question:
Additional Documentation
Update Payment and Tip Amounts
Payment Minimums
Take Payments
If this documentation helped you find a solution, please check the box indicating that this reply solves the problem.
Otherwise one of our Developer Advocates will provide additional assistance shortly.
The difference in the meaning of amount_money between Payment and Tender objects in Square’s APIs can indeed be confusing. This distinction likely arises from the different roles these objects play in the payment process.
-
In the context of a Payment, amount_money refers to the amount processed for the payment itself, excluding any tips. This is because the Payment object is designed to represent the core transaction amount, with tip_money being an additional, separate component that is accounted for in total_money.
-
On the other hand, a Tender represents a specific method of payment used to settle a transaction, such as cash, card, or gift card. In this context, amount_money includes the tip because it reflects the total amount handled by that particular payment method.
The distinction is likely maintained to provide clarity in how different parts of a transaction are recorded and processed. While it might seem inconsistent, it allows for a more granular breakdown of transaction components, which can be useful for reporting and reconciliation purposes.
As for plans to make the meaning of amount_money consistent between Payment and Tender, there is no indication from the provided context that Square intends to change this. Such a change would indeed be a breaking change and could have significant implications for existing integrations. It’s always a good idea to keep an eye on Square’s API updates and changelogs for any future changes in this area.
This answer was reviewed by @Bryan-Square.