To edit or delete a payment you've already included in a deposit, you must first remove the payment from the original deposit transaction.
QuickBooks deletes the payment from the deposit. The payment still exists in your QuickBooks records; it's just undeposited. QuickBooks puts the money back into Undeposited Funds.