Help, how to write accounting entries! ~ (question about posting)

After the payment for C's goods arrives, first do the revenue account:

Borrow: bank deposit

Credit: main business income

Taxes payable - VAT payable (output tax)

Then do the account for repaying A's outstanding amount:

Borrow: accounts payable

Credit: bank deposit