Skip to main content

clinik.invoices

Invoices (FHIR Invoice) represent billing documents for healthcare services. ClinikAPI exposes the most commonly used fields — use the FHIR passthrough for advanced invoice scenarios.

create

const { data, meta } = await clinik.invoices.create(request: InvoiceCreateRequest): Promise<ApiResponse<Invoice>>
FieldTypeRequiredDescription
statusstringYesdraft, issued, balanced, cancelled
patientIdstringNoPatient the invoice is for
typestringNoInvoice type
recipientIdstringNoRecipient (Organization/Patient reference)
datestringNoInvoice date (defaults to now)
issuerIdstringNoIssuing Organization ID
accountIdstringNoAccount ID
participantArrayNoParticipants involved
lineItemArrayNoLine items with charge codes and pricing
totalNet{ value, currency? }NoTotal net amount
totalGross{ value, currency? }NoTotal gross amount
paymentTermsstringNoPayment terms text
cancelledReasonstringNoReason for cancellation
notestringNoAdditional notes

Participant Object

FieldTypeRequiredDescription
rolestringNoParticipant role
actorIdstringYesActor reference ID

Line Item Object

FieldTypeRequiredDescription
sequencenumberNoSequence number
chargeItemCodestringYesCharge item code
priceComponentArrayNoPrice components

Example

const { data } = await clinik.invoices.create({
  status: 'issued',
  patientId: 'pt_abc123',
  type: 'professional-services',
  issuerId: 'org_clinic456',
  lineItem: [
    {
      sequence: 1,
      chargeItemCode: '99213',
      priceComponent: [
        { type: 'base', amount: { value: 150.00, currency: 'USD' } },
      ],
    },
  ],
  totalNet: { value: 150.00, currency: 'USD' },
  totalGross: { value: 150.00, currency: 'USD' },
  paymentTerms: 'Net 30',
});
Same pattern as other resources. Update supports status, cancelledReason, note. Search supports patientId, status, dateFrom, dateTo, issuerId filters.