This is a bit of a workaround, full support for Liabilities is on the roadmap
Capitally does not (yet) support Liabilites with a full-blown user-experience, but you can use negative prices to track these as well.
Create a Custom Asset, you can use Real-Estate for mortgage and Deposit for short-term debts (so they properly offset value of your assets)
Create a regular Buy transaction when you take the loan.
Quantity is positive - equal to the amount you borrowed
Set the Transaction Price AND the Market Price to -1
Create a Sell transaction when you repay the debt
Paid principal is your Quantity
Paid interest is your Fee
Some metrics may be off when using negative prices
You can easily create an import template to add principal & interest payments in bulk from your broker or spreadsheet.
Use tags to group loans together with what they finance (eg. Real-estate + Mortgage, Stocks + Margin account).