Payments

A complete guide to the Payments module — recording patient payments, linking to invoices, tracking payment methods, and reviewing payment history.

Written By Dev010

Last updated 19 days ago

The Payments module records all money received from patients. Every payment is linked to a patient and optionally to a specific invoice, creating a complete financial trail from invoice issuance through to payment receipt. Payment data feeds directly into the Admin dashboard revenue charts and financial summaries.

Accessing the Module

Sidebar → Payments

Direct URL:

https://yourdomain.com/dashboard/payments

Who can access:

Action

Admin

Doctor

Receptionist

Nurse

View payments

Record payment

Edit payment

Delete payment

Payments are accessible to Admin and Receptionist roles by default. Adjust in Dashboard → Permissions if needed.

Payments List

The main payments page shows a paginated, searchable list of all recorded payments.

Each row displays:

  • Patient name

  • Amount

  • Payment method

  • Description

  • Linked invoice number

  • Status badge

  • Transaction ID

  • Date recorded

  • Action buttons (edit, delete)

Search

The search bar filters payments by:

  • Patient name

  • Transaction ID

  • Description

Results update as you type.

Payment Statuses

Status

Description

completed

Payment successfully received — default

pending

Payment initiated but not yet confirmed

failed

Payment attempt was unsuccessful

refunded

Payment was returned to the patient

Recording a Payment

Click the Record Payment button on the payments list page.

Required Fields

Field

Notes

Patient

Search and select from registered patients

Amount

Amount received

Payment Method

How payment was made

Description

Brief description of what the payment covers

Optional Fields

Field

Notes

Invoice

Link to a specific invoice — search by invoice number

Transaction ID

Reference number from card terminal, bank transfer, or payment gateway

Status

Defaults to completed

Payment Methods

CareNova supports the following payment methods as free text — use consistent naming across your team for clean reporting:

Method

Use Case

Cash

In-person cash payment

Card

Debit or credit card via terminal

Bank Transfer

Direct bank-to-bank payment

Insurance

Payment received from insurer

Cheque

Payment by cheque

Online

Payment via online gateway

Mobile

Mobile money or wallet payment

Payment method is a free text field — you can use any value your clinic requires. Standardize the values your team uses to ensure consistent filtering and reporting.

Transaction ID

The Transaction ID field stores the reference number from an external payment system — for example:

  • Card terminal receipt number

  • Bank transfer reference

  • Insurance claim number

  • Online payment gateway reference

Recording transaction IDs creates a traceable link between CareNova's payment record and the external payment system, making reconciliation and dispute resolution straightforward.

Saving the Payment

Click Save Payment to record. The payment appears immediately in the payments list and is attributed to the patient's payment history.

Recording a payment does not automatically update the linked invoice status to paid. After recording the payment, return to the invoice and manually set the status to paid. See the Invoices & Billing guide for the complete workflow.

Editing a Payment

Click the Edit button on any payment row to update the record.

All fields are editable including amount, method, transaction ID, linked invoice, and status.

Common edit operations:

  • Adding a transaction ID that was not available at time of recording

  • Correcting an amount entry error

  • Updating status from pending to completed when payment is confirmed

  • Recording a refund by updating status to refunded

Deleting a Payment

Click the Delete option from the payment row action menu.

A confirmation dialog appears before deletion.

⚠️ Deleting a payment removes it from revenue calculations and the patient's payment history permanently. If a payment was recorded in error, consider updating the status to failed or adding a corrective note instead of deleting. Only Admin accounts can delete payments.

Linking Payments to Invoices

Linking a payment to an invoice creates a clear financial trail — you can see exactly which invoice a payment settles.

When recording a payment:

  1. In the Invoice field, search by invoice number or patient name

  2. Select the matching invoice from the dropdown

  3. The invoice number appears on the payment record

After recording the linked payment, update the invoice status manually:

  1. Sidebar → Invoices

  2. Find the invoice

  3. Edit → set Status to paid

  4. Set Paid At to the payment date

  5. Save

Partial Payments

CareNova supports recording partial payments against an invoice. If a patient pays in installments:

  1. Record each installment as a separate payment — all linked to the same invoice

  2. Keep the invoice status as unpaid until the full amount is received

  3. Update invoice status to paid only when the total invoice amount is settled

To check the total amount paid against a specific invoice:

SELECT i.invoice_number,
       i.total_amount as invoice_total,
       SUM(p.amount) as total_paid,
       i.total_amount - SUM(p.amount) as balance_due
FROM invoices i
LEFT JOIN payments p ON p.invoice_id = i.id
  AND p.status = 'completed'
WHERE i.invoice_number = 'INV-XXXX'
GROUP BY i.id, i.invoice_number, i.total_amount;

Viewing Payments Per Patient

To review all payments from a specific patient:

Option A — Search by patient name:

  1. Sidebar → Payments

  2. Type the patient name in the search bar

  3. All payments for that patient appear in the filtered list

Option B — Full Profile Sheet:

  1. Sidebar → Patients

  2. Find the patient → View Full Profile

  3. Navigate to the Invoices tab

  4. Review linked invoices and their payment status

Payment History and Reporting

Total Revenue by Payment Method

Useful for reconciling against cash drawers, card terminals, and bank statements:

SELECT payment_method,
       COUNT(*) as transaction_count,
       SUM(amount) as total_amount
FROM payments
WHERE status = 'completed'
  AND created_at >= date_trunc('month', now())
ORDER BY total_amount DESC;

Daily Payment Summary

SELECT DATE(created_at) as payment_date,
       COUNT(*) as transactions,
       SUM(amount) as daily_total
FROM payments
WHERE status = 'completed'
  AND created_at >= now() - interval '30 days'
GROUP BY DATE(created_at)
ORDER BY payment_date DESC;

Payments Without Linked Invoices

Identify payments that were recorded without being linked to an invoice — useful for reconciliation cleanup:

SELECT p.id, pt.full_name as patient,
       p.amount, p.payment_method,
       p.description, p.created_at
FROM payments p
JOIN patients pt ON p.patient_id = pt.id
WHERE p.invoice_id IS NULL
  AND p.status = 'completed'
ORDER BY p.created_at DESC;

Monthly Revenue Summary

SELECT DATE_TRUNC('month', created_at) as month,
       COUNT(*) as payment_count,
       SUM(amount) as monthly_revenue
FROM payments
WHERE status = 'completed'
GROUP BY DATE_TRUNC('month', created_at)
ORDER BY month DESC;

Refunds

CareNova does not have a dedicated refund workflow. To record a refund:

  1. Find the original payment — Sidebar → Payments

  2. Edit the payment

  3. Update Status to refunded

  4. Add a note in Description explaining the refund reason and date

  5. Save

Also update the linked invoice status back to unpaid if the refund relates to a full reversal:

  1. Sidebar → Invoices

  2. Find the invoice → Edit

  3. Set Status back to unpaid

  4. Clear the Paid At field

  5. Save

For partial refunds, record a separate negative-amount expense in the Expenses module to reflect the outgoing amount, and add a note on the original payment record.

Dashboard Integration

Payment data feeds into the Admin dashboard financial widgets:

Widget

Data Used

Monthly Revenue stat card

Sum of completed payments this month

Revenue vs Expenses chart

Monthly completed payment totals

Outstanding invoices

Unpaid invoice amounts (not payments)

Receptionist billing queue

Count of unpaid invoices pending payment

The Admin dashboard revenue figures are calculated from invoice status = 'paid' for some widgets and from payment amounts for others. Keep both invoice statuses and payment records in sync for accurate financial reporting.

Database Schema Reference

payments

Column

Type

Description

id

uuid

Unique payment ID

patient_id

uuid

FK → patients (cascade delete)

invoice_id

uuid

FK → invoices (set null on delete)

amount

numeric

Payment amount

payment_method

text

Method used

transaction_id

text

External reference number

description

text

Payment description

status

text

completed / pending / failed / refunded

created_at

timestamptz

Payment record timestamp

updated_at

timestamptz

Last updated timestamp

Indexes are set on patient_id, invoice_id, created_at, and status for fast filtering and reporting queries.

Relationship to Other Modules

Module

Relationship

Patients

Every payment belongs to one patient

Invoices

Payments optionally linked to settle an invoice

Dashboard

Payment totals feed Admin revenue charts

Expenses

Expenses track outgoing costs — payments track incoming revenue

Workflow Examples

Standard payment at checkout:

  1. Patient visit complete — invoice already created

  2. Sidebar → Payments → Record Payment

  3. Select patient

  4. Enter amount

  5. Set payment method (Cash / Card)

  6. Link to the invoice

  7. Enter transaction ID if card payment

  8. Save payment

  9. Sidebar → Invoices → find invoice → Edit → Status: paid → Save

Recording an insurance payment:

  1. Insurance company sends payment

  2. Sidebar → Payments → Record Payment

  3. Select patient

  4. Enter amount received from insurer

  5. Payment Method: Insurance

  6. Transaction ID: claim reference number

  7. Link to the invoice

  8. Description: "Insurance payment — [Provider Name] claim [number]"

  9. Save payment

  10. Update invoice status to paid

Recording a partial payment:

  1. Patient pays partial amount today

  2. Record Payment → enter partial amount

  3. Link to invoice

  4. Save — keep invoice status as unpaid

  5. When second installment arrives, record another payment linked to the same invoice

  6. Once fully paid, update invoice status to paid

End of day cash reconciliation:

  1. Run the payment method query above for today's date

  2. Compare Cash total against physical cash drawer

  3. Compare Card total against card terminal daily report

  4. Investigate and correct any discrepancies

Processing a refund:

  1. Find original payment → Edit

  2. Update status to refunded

  3. Update description with refund reason and date

  4. Save

  5. Update linked invoice status back to unpaid

  6. Arrange actual refund via cash or bank transfer externally

Troubleshooting

Payments not visible in sidebar:

  • Confirm your role has billing.view permission in Dashboard → Permissions

  • Doctor and Nurse do not have billing access by default

Invoice status not updating after recording payment:

  • Recording a payment does not automatically update invoice status

  • Manually update the invoice status to paid after recording the payment — these are two separate steps

Revenue chart not reflecting recent payments:

  • Confirm payment status is set to completed — pending and failed payments are excluded from revenue totals

  • Hard refresh the Admin dashboard

  • Check that the payment created_at date falls within the chart's displayed date range

Cannot find invoice in payment dropdown:

  • The invoice dropdown searches by invoice number and patient name

  • Confirm the invoice exists — check Supabase → Table Editor → invoices

  • Confirm the invoice status is not cancelled — cancelled invoices may be excluded from the dropdown

Duplicate payment recorded:

  • Do not delete the duplicate if it was an actual transaction

  • Edit the duplicate and update status to failed or refunded with a note explaining the error

  • This preserves the audit trail while excluding it from revenue

Cannot delete a payment:

  • Payment deletion is restricted to Admin role only

  • Receptionist can record and edit but not delete payments

  • Consider updating status to failed instead of deleting

Transaction ID missing on card payments:

  • If the terminal receipt was not available at time of recording, edit the payment later to add the transaction ID

  • Transaction IDs are not required but are strongly recommended for card and bank transfer payments

Next Step

Continue to the Expenses module guide to learn how to record and track clinic operational expenses in CareNova.