# Expenses in the Ledger

## Expense Types

Expenses in the ledger are used to represent various kinds of financial activities. Therefore, in order to properly understand expense transactions you need to first look at the “Expense Type” field:

1. **Invoices** are expenses submitted by an expense submitter paid against submitted invoices.
2. **Reimbursements** are expenses submitted by an expense submitter that have already been paid by the expense submitter who is asking to be reimbursed against a receipt or another proof-of-payment.
3. **Virtual Card Charges** are expenses created on the platform when expenses have been paid using virtual credit cards.
4. **Settlements**  are expenses generated by the platform based on and to account for debt transactions (PLATFORM\_TIP\_DEBT & HOST\_FEE\_SHARE\_DEBT) that accumulate on the platform. These are typically paid from fiscal hosts to the platform.
5. **Grants** are also represented as expenses by which funds are typically transferred within a fiscal host from a fund account to recipients collectives.

## Expense Transactions

An expense transaction group will typically include:

1. A pair of EXPENSE transactions.
2. A pair of PAYMENT PROCESSOR FEE transactions.

<figure><img src="https://2931279126-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LWSZizTt4ZC1UNDV89f%2Fuploads%2FmYNyokCu3NtEuq6VT7DD%2Fimage.png?alt=media&#x26;token=9d84294d-af2e-4e3e-95af-81a0af8079bc" alt=""><figcaption></figcaption></figure>

## Unpaid Expenses

Fiscal hosts are able to mark expenses as unpaid when they encounter a payment error (it is the responsibility of the fiscal host admin to verify that the funds paid are accounted for). When an expense is marked as unpaid a new transaction group is created in which:

1. The expense is credited back to the paying collective and debited from the payee.
2. Payment processor fees transactions are NOT reversed since they are typically not refunded by the payment processors. In such cases fiscal hosts cover the not-refunded payment processor fees and this is represented in the ledger with a pair of PAYMENT\_PROCESSOR\_COVER transactions.

<figure><img src="https://2931279126-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LWSZizTt4ZC1UNDV89f%2Fuploads%2FzsZOt6M9Xf6s2XynVQz4%2Fimage.png?alt=media&#x26;token=a72df85c-d9ff-421c-8f76-ae69b2c85702" alt=""><figcaption></figcaption></figure>

A complete transaction set for an expense marked as unpaid can therefor look like:

As a result, the ledger footprint of an expense marked as unpaid includes:

1. The expense payment transactions are one transaction group.
2. The expense "unpaid"  transactions are a second transaction group.
3. Relationships between the transactions in the two transaction groups. Each transaction in the expense transaction group (except the payment processor fees) will have a Refund Transaction ID that points to the opposite transaction in the "unpaid" transaction group.
4. The expense transactions will be marked as REFUNDED.
5. The related "unpaid" transactions will be marked as REFUND.

<figure><img src="https://2931279126-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LWSZizTt4ZC1UNDV89f%2Fuploads%2Fm50sCTSOGIjvjRRdVv3J%2Fimage.png?alt=media&#x26;token=916f2aba-699b-46e8-bab6-1c17a7489ee8" alt=""><figcaption></figcaption></figure>

It is possible to imagine these two transaction sets side by side:

<figure><img src="https://2931279126-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LWSZizTt4ZC1UNDV89f%2Fuploads%2Fl90M7agJizTjiJIf5qlh%2Fimage.png?alt=media&#x26;token=04cb23f2-0b1e-42c9-b0cb-e437006714ea" alt=""><figcaption></figcaption></figure>

## Perspectives of Unpaid Expenses

From the perspective of the payee (the person or organization being paid) the expense was first credited and then debited from their account:

<figure><img src="https://2931279126-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LWSZizTt4ZC1UNDV89f%2Fuploads%2Fuz4INVU0t8DoczhWjUJc%2Fimage.png?alt=media&#x26;token=fb0717dd-7e37-4910-aa59-37b42be05b48" alt=""><figcaption></figcaption></figure>

From the perspective of the paying collective an expense and payment processor fee were first debited from the collective and then, when the expense was marked as unpaid, the funds are credited back to the collective together with credit from the fiscal host to cover the payment processor fees:

<figure><img src="https://2931279126-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LWSZizTt4ZC1UNDV89f%2Fuploads%2FEuma4uZrtHvvXIbMA74p%2Fimage.png?alt=media&#x26;token=4984d106-c7ba-4c28-b427-72e221c4f2c1" alt=""><figcaption></figcaption></figure>

From a fiscal host “Operational Funds” perspective an “Unpaid” expense leaves only a PAYMENT PROCESSOR COVER transaction debited from the fiscal host to the collective to cover the un-refunded payment processor fees:

<figure><img src="https://2931279126-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LWSZizTt4ZC1UNDV89f%2Fuploads%2F8SlEbQ0e05GwaBJ8PXRK%2Fimage.png?alt=media&#x26;token=4e328869-a59f-493a-9588-be77aed5d2e8" alt=""><figcaption></figcaption></figure>

From a fiscal host “Managed Funds” perspective, an “Unpaid” expense looks the same as it does from a collective perspective:

<figure><img src="https://2931279126-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LWSZizTt4ZC1UNDV89f%2Fuploads%2F3GmZKFAC5FhdJe9x8pnx%2Fimage.png?alt=media&#x26;token=1bb5208b-8849-414c-b756-7c441e79f172" alt=""><figcaption></figcaption></figure>
