Hello,
What you could do is setup a liability account in QB to track the loan you have with Shopkeep. When you get a deposit from Shopkeep, enter the FULL amount of the deposit before the loan payment they remove and on the deposit, add a second line with a NEGATIVE amount for the loan payment and offset the liability account you created. This way it shows you had correct income, but you had to use some of the deposit to pay the loan.
(picture below)