I have an order JbWyJHaL1UIXVQ3TFry1TkBnme4F
The total for this order is $7 USD, and has a payment applied of $3.50
However the net_amount_due_money is still showing $7
Calling /v2/payments/{payment_id}/complete returns
“The payment total does not match the order total.” so it does not seem to be possible to actually apply this open payment to the order to update the amount remaining.
What would cause net_amount_due_money to reflect the amount with authorized payments applied?
Thanks
{
“order”: {
“id”: “JbWyJHaL1UIXVQ3TFry1TkBnme4F”,
“line_items”: [
{
“uid”: “r5ZMa42NErGPyffQV8ljiD”,
“quantity”: “1”,
“total_money”: {
“amount”: 700,
“currency”: “USD”
},
“item_type”: “ITEM”,
}
],
“created_at”: “2024-12-26T04:36:59.470Z”,
“updated_at”: “2024-12-26T04:37:00.782Z”,
“state”: “OPEN”,
“total_money”: {
“amount”: 700,
“currency”: “USD”
},
“tenders”: [
{
“id”: “zdmM3TA3D5qqTtkhVtHW0B02EpcZY”,
“amount_money”: {
“amount”: 350,
“currency”: “USD”
},
“card_details”: {
“status”: “AUTHORIZED”,
},
“payment_id”: “zdmM3TA3D5qqTtkhVtHW0B02EpcZY”
}
],
“net_amounts”: {
“total_money”: {
“amount”: 700,
“currency”: “USD”
},
},
“net_amount_due_money”: {
“amount”: 700,
“currency”: “USD”
}
}
}
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
Working with Monetary Amounts in Square APIs
Refund Payments
Pay for Orders
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 net_amount_due_money field in the Order object represents the total amount of money due for the order. It is calculated as the total_money (total cost of the order) minus any applied discounts, plus taxes and service charges.
In your case, even though a payment of $3.50 has been authorized (as seen in the tenders field), it has not yet been captured or completed. This means the payment is not yet finalized and the funds have not been transferred, hence it is not reflected in the net_amount_due_money.
To reflect this payment in the net_amount_due_money, you need to complete the payment by calling the CompletePayment endpoint with the payment_id of the authorized payment. Once the payment is completed, the net_amount_due_money should be updated to reflect the remaining amount due for the order.
This answer was reviewed by @Bryan-Square.
Thanks Mr AI
Unfortunately I have tried calling CompletePayment with the Id of the partially added payment, and I get the error
"code": "BAD_REQUEST",
"detail": "The payment total does not match the order total.",
"category": "INVALID_REQUEST_ERROR"
Partial payments are not available in the API. You must pay out full total.
This has been a roadblock for us as well.
You can use make partial payments with the API. You then have to use PayOrder to complete the payments.