Skip to main content
Loans and lines of credit are tracked in Layer as accounts in the chart of accounts, rather than through a dedicated loan import endpoint. Layer provides account types for the common forms of debt, including:
Account typeUse
LOANS_PAYABLETerm loans the business owes
NOTES_PAYABLEPromissory notes payable
LINE_OF_CREDITRevolving lines of credit
SHAREHOLDER_LOANLoans from owners or shareholders
LOANS_RECEIVABLELoans the business has made to others
Interest paid on debt is posted separately to an expense account such as INTEREST_EXPENSES or LOAN_EXPENSES.
Loan support may need to be enabled for your platform. Reach out to your Layer contact for access.

Set up the loan account

How you represent the loan depends on whether it has an ongoing transaction feed:
  • Revolving accounts with a statement feed (e.g. a line of credit that behaves like a credit card) are best imported as an account. Call the Create Custom Account endpoint with an appropriate account_type and account_subtype, then import its activity (see below).
  • Term loans tracked only by balance can be represented as a ledger account in the chart of accounts using Create Ledger Account with one of the loan account subtypes above.
Request
curl --request POST \
  --url https://sandbox.layerfi.com/v1/businesses/{businessId}/custom-accounts/ \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "external_id": "line-of-credit-001",
  "account_name": "Business Line of Credit",
  "institution_name": "Acme Bank",
  "account_type": "LOAN",
  "account_subtype": "LOAN"
}'

Import loan activity

For accounts with a transaction feed, pass loan activity (draws, repayments, fees, and interest) to the Import Transactions endpoint, using the customAccountId of the account you created. This mirrors how bank data is imported. The loan proceeds (a draw) and each repayment will appear as transactions ready to be categorized.

Categorize principal and interest

A loan repayment usually covers both principal and interest. When categorizing the repayment in Layer:
  • The principal portion reduces the loan liability account (e.g. LOANS_PAYABLE).
  • The interest portion posts to an interest expense account (e.g. INTEREST_EXPENSES).
You can split a single transaction across these accounts during transaction categorization. For help modeling a specific loan structure, such as amortization schedules or shareholder loans, reach out to your Layer contact.