I’m looking for a generic word that means “debit or credit”.

Say I have a transaction, and I don’t know whether it’s a debit on the account or a credit on the account, and I want to ask about it, is there a word I can use?

For example, if I were asking whether a book were green or blue, I would ask, “What’s its color?” If I ask whether a transaction was a debit or a credit, can I fill in the blank, “What’s its _?”

(Background: I’m looking to name a variable while programming, and the best I can come up with is type, which is not very descriptive).

  • I can't think of anything. Perhaps I'd use debit-or-credit... Commented Jan 7, 2011 at 23:08
  • 1
    I have a feeling that many programming paradigms would suggest using camel case rather than hypens in variable names (as hyphens are a reserved character in languages like C and Pascal), in which case I think "debitOrCredit" would be more suitable, although ultimately it all comes down to readability.
    – Andy F
    Commented Jan 7, 2011 at 23:35
  • @Andy: Good point. Commented Jan 7, 2011 at 23:43
  • 2
    I don't think it is correct to say that a transaction is a credit or a debit, but rather each line item in a transaction holds that 'action'. A transaction should be the equal summation of the credit line items and the debit line items. (in T-accounting)
    – Luke
    Commented Sep 10, 2012 at 14:13
  • I am facing the same issue during app development. I need to generate cash transactions based on BUY/SELL transactions to calculate the current balance in a base currency. I need to generate 2 extra transactions for each BUY/SELL, like this: BUY;volume:10;price per piece: 5;fee:0.05 > (1) WITHDRAWAL;10*5 and (2) WITHDRAWAL;0.05. After spending 1 hour to find a good name for this I decided I will call the generated debit/credit transactions in my app bookkeepingTransaction and the class that generates the missing transactions bookkeepingTransactionGenerator.
    – zappee
    Commented Feb 20, 2022 at 18:58

8 Answers 8


I don't believe there's a single word that fits your request. In the ERP systems I've had access to, it's generally been referred to as Transaction Type (or Distribution Type, for AR and AP).


As Hellion suggested, I'd use the variable name transactionType.

I've worked as a programmer on some accounting-related projects. In a nutshell, an accounting application is a log of transactions, and each transaction has a type. There may be more types than just credit and debit, however. For example, in my programs there is often a void transaction type. And if you are accepting credit cards there are transaction types specific to a credit card, such as authorization and capture, to name two.

  • 3
    Just piling on at this point (gotta use that eight years of writing banking software sometime, I suppose), but yes, I'd use transactionType. I'll add comment transactions to what @Scott included, and depending on the institution(s) and account types involved, Debits might be broken down into fees and withdrawals, while Credits can be principal payments, interest payments, deposits, and so on. And of course, transfers have both credit and debit sides. (stopping now…)
    – Dori
    Commented Jan 8, 2011 at 1:49
  • Good point about other transaction types, thanks :) Commented Jan 8, 2011 at 7:00

Side: Which side (debit or credit) of the ledger would this entry have been written on back in the days of pen and paper bookkeeping? (Don't ask me which is right or left -- I always have to look that up.)

Edit: "Side" was my own solution to essentially the same programming problem. I've never seen it used by anybody else.


transactionDirection could work to indicate which way the money is flowing

As for variable names, camelCaseNamingStyle or underscored_naming_style in most language. I don't believe I've seen hyphens used for user-defined terms anywhere except Scheme/Lisp.


Personally, I feel that "type" is almost never the best choice for a variable name (or a column label, descriptive text, etc.). Too many things can be covered by "type". It would be almost as bad as having variable names like "thing" or "stuff". So I applaud your instinct to try to find something better.

One strategy in naming a variable to hold a binary choice is to just pick one of them. Say you call it "credit". If the transaction is a credit, the variable is True, 1, or 'Y'. If it's not, it's False, 0, or 'N'. (Or, if your variable is holding the amount, make it signed and test whether the value is positive or negative. That is, the sign serves as your "transaction type" indicator.)

If you have more than two transaction types, then of course this doesn't work too well.

  • The problem with signed values, though, is that in asset accounts, a debit is positive and a credit is negative, but in liability accounts it's the opposite. Fun with accounting! Commented Jan 8, 2011 at 7:06

You used the generic term in your question ('I have a transaction') so use it: 'transaction'.

  • From a programming standpoint though, that would be a bad idea. You would want to use "transactionType" like others have said since "transaction" should apply to the entire transaction, which includes the amount, payor, receiver, etc.
    – JoeCool
    Commented Feb 23, 2011 at 22:12

Maybe solvency or a related term could convey what you intend?


If you are using an object-oriented programming language, you could make an abstract Transaction class and use inheritance to make Debit and Credit subclasses.

Then you can have multiple "Transactions" as line-items in one "Purchase" or "Refund", or to generalize, "Receipt".

Not the answer you're looking for? Browse other questions tagged or ask your own question.