> ## Documentation Index
> Fetch the complete documentation index at: https://docs.morf.health/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Customer Invoice

> Event payload details and trigger documentation for Customer Invoice data from Hint Health

<img src="https://mintlify.s3.us-west-1.amazonaws.com/morfhealth/images/hint_health.svg" alt="images/hint_health.svg" />

# Events

## Triggering Webhook Types

The following event types are associated with the Customer Invoice event payload from Hint Health.

* `Hint Health Customer Invoice Created`
* `Hint Health Customer Invoice Updated`

<RequestExample>
  ```json Example theme={null}
  {
    "amount_in_cents": 5000,
    "charges": [
      {
        "amount_in_cents": 5000,
        "description": "Monthly membership fee",
        "id": "chg-ab12C345DeF6",
        "service_date": null
      }
    ],
    "charges_count": 1,
    "created_at": null,
    "date": null,
    "due_in_cents": 5000,
    "human_status": "paid",
    "id": "inv-ab12C345DeF6",
    "integration_record_id": "ext-12345",
    "invoice_number": 1042,
    "last_sent_at": null,
    "last_viewed_at": null,
    "owner": {
      "id": "pat-ab12C345DeF6",
      "name": "Gordon Thomas Sumner"
    },
    "paid_at": null,
    "paid_in_cents": 5000,
    "payment_status": "paid",
    "payments_count": 1,
    "provider_web_link": "https://app.hint.com/invoices/inv-ab12C345DeF6",
    "received_in_cents": 5000,
    "status": "paid",
    "subtotal_in_cents": 5000,
    "tax_in_cents": 0,
    "total_in_cents": 5000,
    "updated_at": null
  }
  ```
</RequestExample>

<ResponseExample>
  ```json Description theme={null}
  {
    "amount_in_cents": "Total amount of the invoice in cents",
    "charges": {
      "amount_in_cents": "Charge amount in cents",
      "description": "Description of the charge",
      "id": "Unique identifier for the charge",
      "service_date": "Date the service was provided"
    },
    "charges_count": "Number of charges on the invoice",
    "created_at": "Timestamp when the invoice was created",
    "date": "Invoice date",
    "due_in_cents": "Amount due in cents",
    "human_status": "Human-readable status of the invoice",
    "id": "Unique identifier for the customer invoice",
    "integration_record_id": "External system identifier",
    "invoice_number": "Sequential invoice number",
    "last_sent_at": "Timestamp when the invoice was last sent",
    "last_viewed_at": "Timestamp when the invoice was last viewed",
    "owner": {
      "id": "Unique identifier for the invoice owner",
      "name": "Name of the invoice owner"
    },
    "paid_at": "Timestamp when the invoice was paid",
    "paid_in_cents": "Amount paid in cents",
    "payment_status": "Payment status of the invoice",
    "payments_count": "Number of payments received",
    "provider_web_link": "URL to the invoice in the provider portal",
    "received_in_cents": "Amount received in cents",
    "status": "Status of the invoice",
    "subtotal_in_cents": "Subtotal amount in cents before tax",
    "tax_in_cents": "Tax amount in cents",
    "total_in_cents": "Total invoice amount in cents including tax",
    "updated_at": "Timestamp when the invoice was last updated"
  }
  ```
</ResponseExample>

### Payload Field Details

<ResponseField name="Customer Invoice" type="Event Payload">
  <Expandable title="fields" defaultOpen="true">
    <ResponseField name="id" type="string" required>
      Unique identifier for the customer invoice

      ```json CEL theme={null}
      id
      ```

      ```json Example theme={null}
      "inv-ab12C345DeF6"
      ```
    </ResponseField>

    <ResponseField name="amount_in_cents" type="int64">
      Total amount of the invoice in cents

      ```json CEL theme={null}
      amount_in_cents
      ```

      ```json Example theme={null}
      5000
      ```
    </ResponseField>

    <ResponseField name="charges_count" type="int64">
      Number of charges on the invoice

      ```json CEL theme={null}
      charges_count
      ```

      ```json Example theme={null}
      1
      ```
    </ResponseField>

    <ResponseField name="created_at" type="timing.v1.Timestamp">
      Timestamp when the invoice was created

      ```json CEL theme={null}
      created_at
      ```

      ```json Example theme={null}
      null
      ```
    </ResponseField>

    <ResponseField name="date" type="values.v1.Date">
      Invoice date

      ```json CEL theme={null}
      date
      ```

      ```json Example theme={null}
      null
      ```
    </ResponseField>

    <ResponseField name="due_in_cents" type="int64">
      Amount due in cents

      ```json CEL theme={null}
      due_in_cents
      ```

      ```json Example theme={null}
      5000
      ```
    </ResponseField>

    <ResponseField name="human_status" type="string">
      Human-readable status of the invoice

      ```json CEL theme={null}
      human_status
      ```

      ```json Example theme={null}
      "paid"
      ```
    </ResponseField>

    <ResponseField name="integration_record_id" type="string">
      External system identifier

      ```json CEL theme={null}
      integration_record_id
      ```

      ```json Example theme={null}
      "ext-12345"
      ```
    </ResponseField>

    <ResponseField name="invoice_number" type="int64">
      Sequential invoice number

      ```json CEL theme={null}
      invoice_number
      ```

      ```json Example theme={null}
      1042
      ```
    </ResponseField>

    <ResponseField name="last_sent_at" type="timing.v1.Timestamp">
      Timestamp when the invoice was last sent

      ```json CEL theme={null}
      last_sent_at
      ```

      ```json Example theme={null}
      null
      ```
    </ResponseField>

    <ResponseField name="last_viewed_at" type="timing.v1.Timestamp">
      Timestamp when the invoice was last viewed

      ```json CEL theme={null}
      last_viewed_at
      ```

      ```json Example theme={null}
      null
      ```
    </ResponseField>

    <ResponseField name="paid_at" type="timing.v1.Timestamp">
      Timestamp when the invoice was paid

      ```json CEL theme={null}
      paid_at
      ```

      ```json Example theme={null}
      null
      ```
    </ResponseField>

    <ResponseField name="paid_in_cents" type="int64">
      Amount paid in cents

      ```json CEL theme={null}
      paid_in_cents
      ```

      ```json Example theme={null}
      5000
      ```
    </ResponseField>

    <ResponseField name="payment_status" type="string">
      Payment status of the invoice

      ```json CEL theme={null}
      payment_status
      ```

      ```json Example theme={null}
      "paid"
      ```
    </ResponseField>

    <ResponseField name="payments_count" type="int64">
      Number of payments received

      ```json CEL theme={null}
      payments_count
      ```

      ```json Example theme={null}
      1
      ```
    </ResponseField>

    <ResponseField name="provider_web_link" type="string">
      URL to the invoice in the provider portal

      ```json CEL theme={null}
      provider_web_link
      ```

      ```json Example theme={null}
      "https://app.hint.com/invoices/inv-ab12C345DeF6"
      ```
    </ResponseField>

    <ResponseField name="received_in_cents" type="int64">
      Amount received in cents

      ```json CEL theme={null}
      received_in_cents
      ```

      ```json Example theme={null}
      5000
      ```
    </ResponseField>

    <ResponseField name="status" type="string">
      Status of the invoice

      ```json CEL theme={null}
      status
      ```

      ```json Example theme={null}
      "paid"
      ```
    </ResponseField>

    <ResponseField name="subtotal_in_cents" type="int64">
      Subtotal amount in cents before tax

      ```json CEL theme={null}
      subtotal_in_cents
      ```

      ```json Example theme={null}
      5000
      ```
    </ResponseField>

    <ResponseField name="tax_in_cents" type="int64">
      Tax amount in cents

      ```json CEL theme={null}
      tax_in_cents
      ```

      ```json Example theme={null}
      0
      ```
    </ResponseField>

    <ResponseField name="total_in_cents" type="int64">
      Total invoice amount in cents including tax

      ```json CEL theme={null}
      total_in_cents
      ```

      ```json Example theme={null}
      5000
      ```
    </ResponseField>

    <ResponseField name="updated_at" type="timing.v1.Timestamp">
      Timestamp when the invoice was last updated

      ```json CEL theme={null}
      updated_at
      ```

      ```json Example theme={null}
      null
      ```
    </ResponseField>

    <ResponseField name="charges" type="[]object" required>
      Charges on the invoice

      ```json CEL theme={null}
      charges
      ```

      ```json Example theme={null}
      [
      {
      "amount_in_cents": 5000,
      "description": "Monthly membership fee",
      "id": "chg-ab12C345DeF6",
      "service_date": null
      }
      ]
      ```
    </ResponseField>

    <ResponseField name="charges.map(x, x.id)" type="[]string" required>
      Mapped array of: Unique identifier for the charge

      ```json CEL theme={null}
      charges.map(x, x.id)
      ```

      ```json Example theme={null}
      [
      "chg-ab12C345DeF6"
      ]
      ```
    </ResponseField>

    <ResponseField name="charges.map(x, x.amount_in_cents)" type="[]int64" required>
      Mapped array of: Charge amount in cents

      ```json CEL theme={null}
      charges.map(x, x.amount_in_cents)
      ```

      ```json Example theme={null}
      [
      5000
      ]
      ```
    </ResponseField>

    <ResponseField name="charges.map(x, x.description)" type="[]string" required>
      Mapped array of: Description of the charge

      ```json CEL theme={null}
      charges.map(x, x.description)
      ```

      ```json Example theme={null}
      [
      "Monthly membership fee"
      ]
      ```
    </ResponseField>

    <ResponseField name="charges.map(x, x.service_date)" type="[]values.v1.Date" required>
      Mapped array of: Date the service was provided

      ```json CEL theme={null}
      charges.map(x, x.service_date)
      ```

      ```json Example theme={null}
      [
      null
      ]
      ```
    </ResponseField>

    <ResponseField name="owner" type="object">
      Patient who owns the invoice

      ```json CEL theme={null}
      owner
      ```

      ```json Example theme={null}
      {
      "id": "pat-ab12C345DeF6",
      "name": "Gordon Thomas Sumner"
      }
      ```
    </ResponseField>

    <ResponseField name="owner.id" type="string">
      Unique identifier for the invoice owner

      ```json CEL theme={null}
      owner.id
      ```

      ```json Example theme={null}
      "pat-ab12C345DeF6"
      ```
    </ResponseField>

    <ResponseField name="owner.name" type="string">
      Name of the invoice owner

      ```json CEL theme={null}
      owner.name
      ```

      ```json Example theme={null}
      "Gordon Thomas Sumner"
      ```
    </ResponseField>
  </Expandable>
</ResponseField>
