Hi Square Support Team,
When querying order data through the Square Orders API, I noticed that the total_money field in some Order objects is returned as null. Since an order amount being null appears to be an invalid state for an order, I’d like to understand whether this is expected behavior.
Order ID: cZn3hcEpl2GVvmQoCKZYK7Mtn8XZY
Should Square set a default value of 0 for the total_money field when the actual amount is not available? Or does a null value indicate a specific internal status or processing state of the order?
Any clarification on this behavior would be greatly appreciated.
Thank you!
M
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
Orders API: How It Works
Migrate from the Connect V1 Payments API
Clear API Object Fields
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.
If you expand the return_amounts and returns do you see total_money? 
Hi Bryan,
Yes, expanding return_amounts allows us to retrieve the total_money value. However, from a data design and API consistency perspective, wouldn’t it be more aligned with standard design principles if total_money were guaranteed to be non-null?
For most commerce systems, an order amount being null is considered an invalid or ambiguous state. Setting a default value (such as 0) or providing a guaranteed non-null structure might help avoid confusion and reduce defensive checks on the client side.
Could you please share Square’s design considerations behind allowing total_money to be null, and whether ensuring it is always non-null has been considered?
Thank you again for your support!
Murphy
Where are you looking for total_money? Are you looking for it to be more top level? 