Correcting a mistake
Somebody keyed $240 where they meant $24, or recorded a payment against the wrong order. The fix is to remove the payment and record the right one. There is no editing a payment in place, and nothing here sends money anywhere.
Removing a payment
Open the order and look at Payment history in the Payment panel. Each payment there has a Remove beside it, for anyone who can record payments in the first place.
Press it and you are asked to confirm, with the amount named: removing it adds that amount back to what the order is owed, and it cannot be undone. Take the question seriously — there is no bin to fish it out of afterwards.
Recording the corrected payment is the second half of the job — see Recording what a customer paid. The new payment gets a new code of its own; the old one does not come back.
The removal is written down too
A removal is an event, not an erasure of one. The order's activity gains a line saying a payment of that amount was removed, naming the code that payment had, with who did it and when.
That line matters more than it looks. The payment itself is gone, so the activity entry is the only surviving record that the code ever existed — and a customer may be standing in front of you holding a receipt that quotes it. It also appears on that teammate's own trail, see What somebody did.
An order with money on it cannot be taken off the books
Removing an order — taking it off every list, count and total — is refused while any payment sits against it. The button tells you before you press it: this order has a $24 payment on it, remove the payment first. With several, it names the count and what they come to.
The reasoning is worth knowing, because the extra step is the point. If an order could be removed with money on it, the fastest way to make a collected payment disappear from the books would be to delete the order it was collected against. Requiring the payments to come off first means somebody has to remove each one by name, each removal is logged, and the removal of the order itself needs a written reason. Nothing vanishes quietly.
The same rule is what keeps the payments ledger honest: a removed order can never be hiding a payment, because it cannot hold one.