I have a suggestion for you, Samanvaya.
Instead of matching the deposit to the invoice, you match it to the payment. We'll receive the invoice payment and deposit it to Undeposited funds. On the Bank Deposit page, we'll add the fee. This way, you don't have to resolve the difference since we'll deduct the merchant credit card charges to match the payment with the deposit. This will also prevent any tax error codes.
Here's how to receive the payment:
Then, let's add the fee. Here's how:
After these steps, try to match the deposit to the payment.
Feel free to leave a comment if you need further help. We're just around.