X-Payments:Canceling payments when using X-Payments with Magento 2
In the "Authorize" workflow - as opposed to the "Authorize and capture" workflow - it is possible to cancel (void) a payment before it has been captured. For example, if you have a payment for which an invoice was created with the "Not Capture" payment option, you can cancel it via the invoice page.
To cancel a payment:
- In the Admin panel, select Sales > Orders:
- In the Orders list, locate the order for which you want to cancel a payment and click to open the order details.
- In the Order View menu on the left-hand side of the screen, select the Invoices tab. This opens a list of invoices pertaining to the order. Locate the invoice you need to cancel and click to open it.
- In the upper right of the Invoice page, click the Cancel button.
The authorization to capture the invoice amount will be voided. You should see a success message:
The invoice status will be updated to Canceled.
In X-Payments, you should be able to find the respective Void transaction with the status Voided. The status of the payment in X-Payments should be updated to Declined by merchant.