> For the complete documentation index, see [llms.txt](https://docs.opencollective.com/help/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.opencollective.com/help/product/ledger/transaction-pairs-groups-and-perspectives.md).

# Transaction Pairs, Groups & Perspectives

## Transaction Pairs

Transactions are always created in complementary pairs: a credit transaction and a debit transaction. For example, when Contributor A makes a contribution to Collective B, two transactions are created:

<figure><img src="https://2931279126-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LWSZizTt4ZC1UNDV89f%2Fuploads%2FUf4muCdzctfQmz8cH0P5%2Fimage.png?alt=media&amp;token=9fbe6a30-2376-4a60-b925-ce3ec8d77638" alt=""><figcaption></figcaption></figure>

Or when an expense is paid from Collective B to Payee C, two transactions are also created:

<figure><img src="https://2931279126-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LWSZizTt4ZC1UNDV89f%2Fuploads%2FAs1sdFXNle00ybS6p24D%2Fimage.png?alt=media&amp;token=28258db4-a1ed-43ce-8f42-b5c2443d8d67" alt=""><figcaption></figcaption></figure>

{% hint style="warning" %}

#### Not quite Double Entry Book Keeping

Though the “transactions pairs” is a fundamental ledger pattern and it may sound like it is compatible with double entry book keeping, it isn’t.
{% endhint %}

## Transaction Groups

Usually transactions are created in groups that have a shared context. For example, when a contribution is made by Contributor A via Stripe to Collective B that is hosted by Fiscal Host C the following transaction group will be created:

1. A pair of CONTRIBUTION transactions.
2. A pair of PAYMENT PROCESSOR FEE transactions.
3. A pair of HOST FEE transactions

<figure><img src="https://2931279126-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LWSZizTt4ZC1UNDV89f%2Fuploads%2F8r7DHMAE35BgZbiVujRA%2Fimage.png?alt=media&amp;token=2e4bc29a-fd4b-49d9-a606-aa78f33bfa25" alt=""><figcaption></figcaption></figure>

## Ledger Perspectives

Different users sees a different perspective of the same ledger. The perspective a user sees depends on the account through which they are looking at the ledger. Typically each account sees only transactions related to it. Fiscal hosts are an exception since they see both their own transactions and the transactions of the collectives they host.In the above contribution example, the contributor will see just one transaction - their contribution 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%2FRh0wB8vYUOTjetPar99M%2Fimage.png?alt=media&amp;token=e1c98ab8-f0d7-4180-98b7-ae053722faf9" alt=""><figcaption></figcaption></figure>

A collective admin will see three transactions which correctly represent the contribution and two fees - resulting in a net $8.50 for the collective:

<figure><img src="https://2931279126-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LWSZizTt4ZC1UNDV89f%2Fuploads%2FlWPoiZQF2nvQevCo7NcG%2Fimage.png?alt=media&amp;token=19ad2f37-ceee-47ed-9134-c4ea09e2781c" alt=""><figcaption></figcaption></figure>

The Stripe account (though it has no users, there is a global Stripe account to which transactions are attributed) will show just the payment processor fee that it charged:

<figure><img src="https://2931279126-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LWSZizTt4ZC1UNDV89f%2Fuploads%2FRHGLZtjBS65Kig359uOm%2Fimage.png?alt=media&amp;token=fe9e4cae-ee63-4223-8cf3-97f2d2708414" alt=""><figcaption></figcaption></figure>

Fiscal hosts see the largest amount of transactions since they see both their own transactions and the transactions of their hosted collectives (for which they are fiscally responsible):

<figure><img src="https://2931279126-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LWSZizTt4ZC1UNDV89f%2Fuploads%2Fc9EsQgp5b3WkBJpkhj7i%2Fimage.png?alt=media&amp;token=1bfe7bbb-3bff-46ce-9365-65debac18f7f" alt=""><figcaption></figcaption></figure>

See more about [the fiscal host perspective](/help/product/ledger/fiscal-host-ledger-perspective.md)<br>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.opencollective.com/help/product/ledger/transaction-pairs-groups-and-perspectives.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
