Hi,
I am trying to track the amount of returned items of an order. I checked the doc of Order API and found the field “net_amounts” in which it says “The net money amounts (sales money - return money).” However, when I partially refunded an order (itemized return) on Square Dashboard, the net amounts from API response is unchanged, that is, it still shows the original total, not deducted by returned money. Is the doc not accurate, or is there anything I should do to get the net_amounts reflect the returns?
Also, it’d be helpful if the doc can tell us how to create itemized refunds on sandbox environment via API calls. I am struggled to create such test cases in sandbox, since the user interface does not all me to create orders or refund transactions.
To check partial refunds reliably, it is necessary to access Payments API, which implies further requirements of App Marketplace listing, that do not meet our business model. It’ll be very helpful if the relationship of the refund items can be found from the read-only Order API endpoints.
Thanks!
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
Refund Payments
Refunds API
Pay or Refund Invoices
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.
To track the amount of returned items in an order using the Square APIs, you should focus on the OrderReturn object within the Orders API. When you perform an itemized refund, the Orders API creates a return order that includes details about the returned items. However, the net_amounts field in the original order might not reflect these changes directly, as it represents the net sales amount minus return amounts, but it might not update immediately or in the way you expect.
Currently with sandbox itemized returns aren’t supported since all refund have to be with the API and the Orders API doesn’t currently support itemized refunds.
You can check for partial refund with the Orders API. When an order is refunded even partially it will create a refund order. That refund order with have the source_order_id which is the original source of the order. 