In Acumatica, on screen AR302000, I have a Closed payment that I want to change to Voided Payment using the APIs. In the UI, the process is simple: we click VOID, then REMOVE HOLD, and the document becomes voided.
The VOID button triggers the action /24.200.001/Payment/VoidCheck, and the REMOVE HOLD button triggers /24.200.001/Payment/ReleaseFromHold.
I called these two APIs sequentially. The first one returned 204, but the second one failed because the payment is not placed on hold after running VoidCheck, meaning Acumatica does not allow ReleaseFromHold.
Here is the payload I’m sending for the first API call:
json
{
"entity": {
"ReferenceNbr": {
"value": "000025"
}
}
}
And here is the payload I’m sending for the second API call:
json
{
"entity": {
"id": "eed4ab6d-ccd5-f011-a83a-6045bd6d244f",
"ReferenceNbr": {
"value": "000025"
},
"Hold": {
"value": true // I also have tried false
},
"Type": {
"value": "Voided Payment"
},
"PaymentAmount": {
"value": -10.6600 // I also have tried to remove this attribute
}
}
}