Managing ledgers
The first step to submitting your user’s transactions is to map their real-world financial accounts, such as their bank account, to a corresponding ledger in their chart of accounts. The process works a bit differently depending on the end user’s accounting package.
Create a financial account ledger
Real-world financial accounts are represented by financial account ledgers. You create these ledgers like any ledger by using the Create Ledger endpoint.
Financial account ledgers must have a financial_account_type
. By selecting the financial account type, we
set smart defaults to ensure that the accounting treatment is accurate. For example, setting financial_account_type
to
bank
automatically sets type
to asset
, debit_credit
to debit
, and report_cash_flow
to true
.
Each real-world financial acount should have its own individual ledger. You can see the complete list of supported financial account types here.
Map the ledger
Once you have created a financial account ledger, you must store the association between the ledger_id
of the
financial account ledger and the real-world financial account it represents.
We call this mapping, and you will use this mapping for various use cases such as submitting transactions.
Set the opening balance
It is important that the balance of the financial account ledger matches that of the real-world financial account on your user’s start date, or else their accounting will be inaccurate.
If the real-world financial account was opened before your user’s start date, an opening balance must be set via the Opening Balance endpoint.
Best practices
Create a financial account ledger
Real-world financial accounts are represented by financial account ledgers. You create these ledgers like any ledger by using the Create Ledger endpoint.
Financial account ledgers must have a financial_account_type
. By selecting the financial account type, we
set smart defaults to ensure that the accounting treatment is accurate. For example, setting financial_account_type
to
bank
automatically sets type
to asset
, debit_credit
to debit
, and report_cash_flow
to true
.
Each real-world financial acount should have its own individual ledger. You can see the complete list of supported financial account types here.
Map the ledger
Once you have created a financial account ledger, you must store the association between the ledger_id
of the
financial account ledger and the real-world financial account it represents.
We call this mapping, and you will use this mapping for various use cases such as submitting transactions.
Set the opening balance
It is important that the balance of the financial account ledger matches that of the real-world financial account on your user’s start date, or else their accounting will be inaccurate.
If the real-world financial account was opened before your user’s start date, an opening balance must be set via the Opening Balance endpoint.
Best practices
For QuickBooks
instances, you do not have full control over your user’s chart of accounts. You can’t know for sure
if a ledger that represents your user’s real-world financial account already exists, or if you need to create a new one
in order to complete the mapping.
Therefore, you will need to get input from your user.
Identify the ledger in QuickBooks
We recommend creating an interface that presents the user’s chart of accounts and asks them to select the ledger that represents the real-world financial account that you want to map. Use the Get Ledgers endpoint to generate the list. If a ledger does not yet exist, then create one using the Create Ledger endpoint.
Map the ledger
Once the user has identified the ledger to be used, or you have created a new ledger, you must store the association between
the id
and the real-world financial account it represents.
We call this mapping, and you will use this mapping for various use cases such as submitting transactions.
Link the Account
In order to be able to submit transactions to the mapped ledger, you need to call the Link Account
endpoint and set the financial_account_type
. Setting the financial account type also lets Teal know that transactions can
be written to this QuickBooks ledger.
By setting the financial account type, we also set smart defaults to ensure that the accounting treatment is accurate. For example,
if you set financial_account_type
to bank, we set type
to asset, debit_credit
to debit, and report_cash_flow
to true.