How to delete a payment recorded against an invoice on Web?

To delete a payment please go to the Invoices >> Select the invoice >> Tap on the payment mode >> Click on the delete option >> Click on update payment.