API REFERENCE

Financial API

The financial endpoints cover the ledger: transactions, credits, invoice items, payment methods, reconciliation, and reports. Most calls operate on money already owed or paid, so run them after a client and its contracts exist.

Calculate before you charge

POST /financial/billing/calculate returns what a client owes for a period without writing anything. Use it to preview a run, then commit through invoice and transaction endpoints. POST /financial/tax/calculate does the same for tax, and GET /financial/tax/rates lists the rates in effect.

Transactions and credits

Every money movement is a transaction. Post one with POST /financial/transactions, read it back from GET /financial/transactions/{id}, and amend it with PUT /financial/transactions/{id}. Credits have their own flow: list balances with GET /financial/credits, check headroom with POST /financial/credits/validate, then apply, transfer between clients, or issue a prepayment invoice through /financial/credits/apply, /financial/credits/transfer, and /financial/credits/prepayment.

curl
curl https://algapsa.com/api/v1/financial/credits/apply \
  -H "X-API-Key: $ALGA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "client_id": "cl_3f9a2c",
    "invoice_id": "inv_8821",
    "amount": 15000
  }'

Invoices, reconciliation, reports

Add a line with POST /financial/invoices/{id}/items and lock the invoice with POST /financial/invoices/{id}/finalize. Reconcile a period through POST /financial/reconciliation/run and clear flagged items with POST /financial/reconciliation/{id}/resolve. For read-only views, hit GET /financial/reports/aging, /reports/balance, and /reports/analytics. The /financial/bulk/* endpoints batch invoices, transactions, and credits when you need to move many records at once.

List invoices and payment methods

GET /financial/invoices returns a paginated invoice list for the tenant. Narrow it with status (draft, sent, paid, overdue, and more), client_id, billing_cycle_id, a due-date or amount range, or has_credit_applied, and sort by fields like invoice_date or total_amount. GET /financial/payment-methods lists the methods on file: filter by type (credit_card or bank_account), client_id, or is_default. Soft-deleted methods are left out unless you set exclude_deleted=false.

Endpoints

Every endpoint links through to its full parameters, request and response schemas, and code samples.

GET/api/v1/financialAlgaPSAFinancial API namespace rootPOST/api/v1/financial/billing/calculateAlgaPSACalculate client billing chargesGET/api/v1/financial/billing/payment-termsAlgaPSAList billing payment termsPOST/api/v1/financial/bulk/creditsAlgaPSARun bulk credit operationPOST/api/v1/financial/bulk/invoicesAlgaPSARun bulk invoice operationPOST/api/v1/financial/bulk/transactionsAlgaPSARun bulk transaction operationGET/api/v1/financial/creditsAlgaPSAList credit balances and recordsPOST/api/v1/financial/credits/applyAlgaPSAApply credit to invoicePOST/api/v1/financial/credits/prepaymentAlgaPSACreate prepayment invoicePOST/api/v1/financial/credits/transferAlgaPSATransfer credit between clientsPOST/api/v1/financial/credits/validateAlgaPSAValidate client credit balanceGET/api/v1/financial/invoicesAlgaPSAList invoicesPOST/api/v1/financial/invoices/{id}/finalizeAlgaPSAFinalize financial invoice (maps to generic update)POST/api/v1/financial/invoices/{id}/itemsAlgaPSAAdd financial invoice item (maps to generic create)GET/api/v1/financial/payment-methodsAlgaPSAList payment methodsPOST/api/v1/financial/payment-methodsAlgaPSACreate payment methodGET/api/v1/financial/payment-methods/{id}AlgaPSAGet payment method by id (transaction get wiring)PUT/api/v1/financial/payment-methods/{id}AlgaPSAUpdate payment method by id (transaction update wiring)DELETE/api/v1/financial/payment-methods/{id}AlgaPSADelete payment method by id (transaction delete wiring)POST/api/v1/financial/reconciliation/{id}/resolveAlgaPSAResolve reconciliation reportPOST/api/v1/financial/reconciliation/runAlgaPSARun financial reconciliationGET/api/v1/financial/reports/agingAlgaPSAGet aging reportGET/api/v1/financial/reports/analyticsAlgaPSAGet financial analyticsGET/api/v1/financial/reports/balanceAlgaPSAGet account balance reportPOST/api/v1/financial/tax/calculateAlgaPSACalculate financial taxGET/api/v1/financial/tax/ratesAlgaPSAList financial tax rates (transaction list wiring)GET/api/v1/financial/transactionsAlgaPSAList financial transactionsPOST/api/v1/financial/transactionsAlgaPSACreate financial transactionGET/api/v1/financial/transactions/{id}AlgaPSAGet financial transaction by idPUT/api/v1/financial/transactions/{id}AlgaPSAUpdate financial transaction