Double-entry bookkeeping is a system that keeps track of a company's finances by showing how assets and liabilities flow between different accounts. An account in double-entry bookkeeping is a tally of amounts that the business owes or is owed. When a sum is transferred from an account reflecting a debt to an account reflecting an asset, the process of removing it from an account is known as a debit, and the process of adding it to another account is known as a credit.
Accounts receivable is an accounting term describing the sums that are owed to a business for transactions for which customers have not yet paid. If you bill your customers and give them 30 days to pay for products or services, these transactions are recorded in your accounts receivable account until they're paid. Once the customer pays, the bookkeeping entry is transferred from the accounts receivable account to the sales account. Your accounts receivable account is debited, and your sales account is credited.
Accounts payable is an accounting term describing the list of financial obligations that your business has accrued that must be paid in the near future. If you buy materials from suppliers who offer terms such as payment due after 30 days, these unpaid sums belong in your accounts payable account. Once you make the payments, your accounts payable account is debited as the transaction is transferred, or credited, to the account that records payments or purchases you have made.
When your business makes a sale, double-entry bookkeeping requires you to record this amount as a credit. However, every credit must be balanced by a corresponding debit. This debit will be recorded as a transfer from accounts receivable, even if you received payment right away and never actually billed the customer. The rationale for this convention is that in the time between when you negotiated the sale or handed the product to the customer, the money was owed to you and then it was subsequently paid.
When your business makes a purchase, such as buying materials or supplies, double-entry bookkeeping requires you to take the money out of a different account to balance the outgoing money from the purchase. Your business might have an account for cash, or revenue on hand or in the bank. Because you've spent some of this money on the purchase, you debit the cash account and credit another account, such as inventory.