BioEcko Docs
API

Billing API

The Billing API provides access to invoices, payments, and financial data. Use it to integrate with accounting systems, payment gateways, insurance claim...

2026-02-01 · 4 min

Manual area

API

Coverage

5 sections

Operator notes

2 implementation notes

Overview

The Billing API provides access to invoices, payments, and financial data. Use it to integrate with accounting systems, payment gateways, insurance claim platforms, or custom financial dashboards.

List Invoices

GET /api/v1/billing/invoices

Query parameters:

  • patient_id (string): Filter by patient.
  • status (string): draft, finalized, paid, partially_paid, cancelled.
  • date_from / date_to (date): Date range filter.
  • branch_id (string): Filter by branch.
  • page / per_page: Pagination.

Response: Array of invoice summaries (id, invoice_number, patient_name, total, paid, balance, status, date). Requires billing:read scope.

Get Invoice Detail

GET /api/v1/billing/invoices/{id}

Returns the full invoice with:

  • Header: Invoice number, date, patient details, branch.
  • Line items: Service name, department, quantity, rate, discount, tax, amount.
  • Totals: Sub-total, discount, tax breakdown (CGST, SGST/IGST), grand total.
  • Payments: List of payments received against this invoice.
  • Balance: Outstanding amount.

Record Payment

POST /api/v1/billing/invoices/{id}/payments

Request body: { "amount": 1500.00, "payment_mode": "upi", "reference": "UPI-TXN-123456", "payment_date": "2026-03-15" }

Payment modes: cash, card, upi, neft, cheque, online, insurance. The invoice status auto-updates to paid if balance becomes zero. Requires billing:write scope.

Financial Summary

GET /api/v1/billing/summary

Query parameters: date_from, date_to, branch_id.

Response: { "total_billed": 450000.00, "total_collected": 380000.00, "total_outstanding": 70000.00, "collection_by_mode": { "cash": 120000, "card": 80000, "upi": 150000, "insurance": 30000 }, "revenue_by_department": { "General Medicine": 150000, "Surgery": 120000, ... } }

Notes

Tip

Use the billing summary endpoint for dashboard integrations. It provides aggregated financial data without needing to process individual invoices.

Warning

Payment recording via API is irreversible. Ensure payment validation (amount, reference) is handled in your integration before posting.

On this page