The following API call allows voiding a bill-payment in QuickBooks Online:
curl -X PATCH \ https://api.openconnectors.us2.ext.hana.ondemand.com/elements/api-v2/bill-payments/IdOfTheBillPayment/void \ -H 'Authorization: User *****, Organization *****, Connector *****' \ -H 'accept: application/json' \
After the bill-payment is voided, a privateNote with the Voided message appears in the response body of the bill-payment. Here is an example of the above API response:
{ "checkPayment": { "printStatus": "NOT_SET", "bankAccountRef": { "name": "10100 Checking", "value": "58" } }, "systemId": "8730", "syncToken": "1", "vendorRef": { "name": "Patton Hardware Supplies", "value": "11" }, "metaData": { "createTime": "2019-06-17T05:54:39Z", "lastUpdatedTime": "2019-06-17T06:19:30Z" }, "payType": "CHECK", "totalAmt": 0, "privateNote": "Voided - RC 93", "sparse": false, "currencyRef": { "name": "United States Dollar", "value": "USD" }, "exchangeRate": 1, "domain": "QBO", "id": "8730|1", "txnDate": "2019-06-16T00:00:00Z" }