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

# Overview

> The payments recorded against Invoices.

The Invoice Payments Data Model represents payments recorded against invoices. This unified model streamlines the representation and management of invoice payment information across multiple accounting platforms.

* **Unified payment properties**: Essential payment details, such as amount, currency, payment date, and payment mode, are standardized across different accounting platforms
* **Linked to contacts, accounts, and invoices**: Each payment entry is connected to a specific contact, account, and invoice using their respective platform IDs, ensuring accurate data representation and easier cross-referencing
* **Currency rate conversion support**: The `currency_rate` property enables the tracking of currency conversion rates between the payment currency and the base currency, facilitating accurate financial reporting

## Attributes

### Invoice Payments Attributes

| Property                  | Type    | Description                                                                        |
| ------------------------- | ------- | ---------------------------------------------------------------------------------- |
| `rootfi_id`               | integer | Unique identifier assigned by Commenda for this invoice payment                    |
| `rootfi_created_at`       | string  | Timestamp when this record was created in Commenda's system (ISO 8601)             |
| `rootfi_updated_at`       | string  | Timestamp when this record was last updated in Commenda's system (ISO 8601)        |
| `rootfi_integration_type` | enum    |                                                                                    |
| `platform_id`             | string  | Unique identifier for this invoice payment in the source accounting platform       |
| `payment_id`              | string  |                                                                                    |
| `invoice_id`              | string  | The invoice ID of the invoice payment                                              |
| `account_id`              | string  | The account ID of the invoice payment                                              |
| `credit_note_id`          | string  | The credit note ID associated with the invoice payment (if paying via credit note) |
| `amount`                  | double  | The total amount of the invoice payment                                            |
| `payment_mode`            | string  | The payment mode of the invoice payment                                            |
| `currency_id`             | enum    | ISO 4217 currency code                                                             |
| `currency_rate`           | double  | The currency rate of the invoice payment                                           |
| `document_number`         | string  | The document number of the invoice payment                                         |
| `memo`                    | string  | The memo or notes of the invoice payment                                           |
| `payment_date`            | string  | The payment date of the invoice payment                                            |
| `contact_id`              | string  | The contact ID of the invoice payment                                              |
| `updated_at`              | string  | The date and time the invoice payment was last updated                             |

## Expandable Attributes

Use the `expand` query parameter to include related objects:

* `expand=invoice` — includes the related Invoice object(s).
* `expand=contact` — includes the related Contact object(s).
* `expand=currency` — includes the related Currency object(s).
* `expand=account` — includes the related Account object(s).

## Properties Supported

Fields accepted when creating or updating a record:

| Property          | Type   | Description                                                                        |
| ----------------- | ------ | ---------------------------------------------------------------------------------- |
| `platform_id`     | string | Unique identifier for this invoice payment in the source accounting platform       |
| `payment_id`      | string |                                                                                    |
| `invoice_id`      | string | The invoice ID of the invoice payment                                              |
| `account_id`      | string | The account ID of the invoice payment                                              |
| `credit_note_id`  | string | The credit note ID associated with the invoice payment (if paying via credit note) |
| `amount`          | double | The total amount of the invoice payment                                            |
| `payment_mode`    | string | The payment mode of the invoice payment                                            |
| `currency_id`     | enum   | ISO 4217 currency code                                                             |
| `currency_rate`   | double | The currency rate of the invoice payment                                           |
| `document_number` | string | The document number of the invoice payment                                         |
| `memo`            | string | The memo or notes of the invoice payment                                           |
| `payment_date`    | string | The payment date of the invoice payment                                            |
| `contact_id`      | string | The contact ID of the invoice payment                                              |
| `updated_at`      | string | The date and time the invoice payment was last updated                             |
