Create a money transaction. See schema for all options.
Replace the following fields with real IDs:
<BUSINESS_ID>
- The business for which the Transaction is recorded.
<ANCHOR_ACCOUNT_ID>
- The Anchor Account from which payment is made, or into which funds are deposited.
<LINE_ITEM_ACCOUNT_ID>
- The Categorization Account(s) used to categorize the Transaction (eg. sales, expenses).
- Operation
-
mutation ($input:MoneyTransactionCreateInput!){ moneyTransactionCreate(input:$input){ didSucceed inputErrors{ path message code } transaction{ id } } }
- Operation Variables
-
{ "input": { "businessId": "<BUSINESS_ID>", "externalId": "some-reference-id", "date": "2021-02-05", "description": "My first sale", "anchor": { # Eg. Business checking account "accountId": "<ANCHOR_ACCOUNT_ID>", "amount": 100.00, "direction": "DEPOSIT" }, "lineItems": [{ # Eg. Sales Account "accountId": "<LINE_ITEM_ACCOUNT_ID>", "amount": 100.00, "balance": "INCREASE" }] } }
Notes:
- The moneyTransactionCreate mutation is equivalent to creating a standard transaction directly in Wave, i.e. a transaction where a withdrawal or deposit to or from a bank, credit card, or other (mostly) "real world" account is categorized to one or more accounting categories. We strongly recommend you become familiar with manually creating transactions in Wave as the best way to gain an understanding of this mutation's effects.
- 'Anchor' accounts include Asset accounts in the Cash and Bank sub-type, and Liability accounts in the Credit Card and Loans and Line of Credit sub-types. Certain other account sub-types can also include Anchor accounts. The best way to discover these is to manually add some transactions in your Wave test business and inspect the offered Accounts in which this is possible.
- All other accounts can be referenced in Line Items, but avoid using Anchor-type accounts as Line Items. Wave has a special way to process transfers between bank/credit card accounts, which is not yet available via the API.
- The total of the line items must balance the deposit/withdrawal to the Anchor account.
- All amounts should be entered as positive values with up to 2 decimal places.
- "Under the hood" Wave uses conventional accounting concepts of Debits and Credits. We abstract this complexity by using the terms "DEPOSIT" and "WITHDRAWAL" for the Anchor account direction. Deposits are made when your business receives money; Withdrawals when it spends money. DEPOSIT is equivalent to DEBIT when the chosen Anchor Account is an Asset Account, and to CREDIT when the Anchor Account is a liability; WITHDRAWAL, the opposite.
For Line Items, we recommend using the convenience values "INCREASE" and "DECREASE" for balance direction. INCREASE is equivalent to Debit when the line item account is of type ASSET or EXPENSE, and to Credit when it is INCOME, LIABILITY, or OWNERS EQUITY; DECREASE, the reverse. Note that INCREASE and DECREASE also abstract the expected usage of contra-accounts. For example, INCOME DISCOUNT is a contra account sub-type of INCOME type. The normal balance direction of INCOME accounts is CREDIT, however our API will interpret 'INCREASE' for this sub-type as DEBIT. This meets the abstraction's goal of allowing you to record "more discount" as an INCREASE in discount and have it record correctly, even though - in the context of this being a contra-account, you are actually recording a reduction in Income.
If you have a strong understanding of accounting principles and prefer to express line item balance as DEBIT or CREDIT, that is also supported.