Void the invoice. Only invoices with status OPEN can be be voided.
Example Request
curl -X POST https://api.payjunction.com/invoices/e321790e-c030-4501-aa99-09e35158c1a6/void \ -u "login:password" \ -H "Accept:application/json" \ -H "X-PJ-Application-Key: YOUR_PRODUCTION_APP_KEY"
Example Response - Success
{ "amountBase" : "1.99", "created" : "2020-11-24T01:19:23Z", "customerEmail" : "jdoe@payjunction.com", "customerFirstName" : "John", "customerIdentifier" : "customer-id", "customerLastName" : "Doe", "invoiceId" : "e321790e-c030-4501-aa99-09e35158c1a6", "invoiceNumber" : "TO-123456", "lastModified" : "2020-11-24T01:37:37Z", "message" : "Invoice for takeout order #123456", "status" : "VOID", "terminalId" : 1 }
Example Response - Error
{ "errors" : [ { "message" : "Unable to void invoice because status is already VOID." } ] }