The accounts payable balance is a credit, so a debit to this account will decrease the balance.
Debit (decrease) accounts payable and then credit (decrease) cash.
When you have returned damaged goods then you will need to credit accounts receivable and debit accounts payable. This will decrease your revenue for the account.
[Debit] Purchases [Credit] Accounts payable
[Debit] Accounts payable [Credit] Cash / bank
Debits decrease the balance of the Accounts Payable account. Accounts Payable is presented in the Liability section of the Balance Sheet. If you purchase a printer for $200 and enter the bill into the accounting program, the program will debit the expense account you choose (e.g. Office Equipment) for $200 and credit Accounts Payable $200. Then, when you pay the bill, the accounting program will debit Accounts Payable $200 - thereby canceling out, you might say, the earlier credit. (And the accounting program will, of course, also credit the Checking Account by $200.) So when we enter bills into the accounting program, Accounts Payable is credited. And when we pay the bill, Accounts Payable is debited, its balance is decreased.
credit
Debit Accounts Payable and Credit either the account where the original debit was made or Credit Other Income
[Debit] Purchases account [Credit] Accounts Payable
debit
Accounts Payable is a Liability and therefore its normal balance is a Credit on the Balance Sheet
account payable account debit to bank account