# API Types

Source: https://fragment.dev/api-reference/ledger-types

[Documentation index](https://fragment.dev/llms.txt)

<a id="ledger-types"></a>

<a id="core-types"></a>

## Core Types

<a id="core-types-externalaccount"></a>

### ExternalAccount

```json
{
  "currency": Currency,
  "currencyMode": "multi",
  "externalId": "3116551f-5efc-4c9e-84ac-5a36a51b09c1",
  "id": "3116551f-5efc-4c9e-84ac-5a36a51b09c1",
  "ledgerAccounts": LedgerAccountsConnection,
  "link": Link,
  "linkId": "3116551f-5efc-4c9e-84ac-5a36a51b09c1",
  "name": "abc123",
  "txs": TxsConnection
}
```

- **currency** ([Currency](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-currency))

  The currency of this external account.

- **currencyMode** ([CurrencyMode!](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-currencymode))

  Indicates if the account allows multiple currencies or is restricted to a single currency

- **externalId** ([ID!](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-id))

  ID used for the external account

- **id** ([ID!](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-id))

  Fragment ID of External Account

- **ledgerAccounts** ([LedgerAccountsConnection!](https://fragment.dev/markdown/api-reference/ledger-types.md#connection-types-ledgeraccountsconnection))

  Ledger Accounts linked to this External Account. Ledger Accounts are paginated and sorted in reverse-chronological order by created date.

  Arguments:

  - **after** ([String](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-string))

    Where to start paginating from, when paginating forwards. Send endCursor from a response to get its next page. Learn more about [pagination](https://fragment.dev/markdown/guides/query-data.md#basics-pagination).

  - **before** ([String](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-string))

    Where to start paginating from, when paginating backwards. Send startCursor from a response to get the previous page. Learn more about [pagination](https://fragment.dev/markdown/guides/query-data.md#basics-pagination).

  - **first** ([Int](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-int))

    The number of Ledger Accounts to return per page, when paginating forwards. Defaults to 20, maximum is 200.

  - **last** ([Int](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-int))

    The number of Ledger Accounts to return per page, when paginating backwards. Defaults to 20, maximum is 200.

- **link** ([Link!](https://fragment.dev/markdown/api-reference/ledger-types.md#core-types-link))

  The Link that this External Account belongs to.

- **linkId** ([ID!](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-id))

  Fragment ID of this transaction's external link

- **name** ([String!](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-string))

- **txs** ([TxsConnection!](https://fragment.dev/markdown/api-reference/ledger-types.md#connection-types-txsconnection))

  All Txs in this External Account.

  Arguments:

  - **after** ([String](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-string))

    Where to start paginating from, when paginating forwards. Send endCursor from a response to get its next page. Learn more about [pagination](https://fragment.dev/markdown/guides/query-data.md#basics-pagination).

  - **before** ([String](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-string))

    Where to start paginating from, when paginating backwards. Send startCursor from a response to get the previous page. Learn more about [pagination](https://fragment.dev/markdown/guides/query-data.md#basics-pagination).

  - **first** ([Int](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-int))

    The number of transactions to return per page, when paginating forwards. Defaults to 20, maximum is 200.

  - **last** ([Int](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-int))

    The number of transactions to return per page, when paginating backwards. Defaults to 20, maximum is 200.

<a id="core-types-ledger"></a>

### Ledger

Ledgers are databases designed for managing money

```json
{
  "balanceUTCOffset": "-08:00",
  "created": "2007-12-03T10:15:30Z",
  "dashboardUrl": "abc123",
  "entryStats": LedgerEntryStatsConnection,
  "id": "3116551f-5efc-4c9e-84ac-5a36a51b09c1",
  "ik": "some-safe-string-ik",
  "ledgerAccountDataMigrations": LedgerAccountDataMigrationConnection,
  "ledgerAccounts": LedgerAccountsConnection,
  "ledgerEntries": LedgerEntriesConnection,
  "ledgerEntryDataMigrations": LedgerEntryDataMigrationConnection,
  "ledgerEntryGroup": LedgerEntryGroup,
  "ledgerEntryGroups": LedgerEntryGroupsConnection,
  "lines": LedgerLinesConnection,
  "migrations": LedgerMigrationConnection,
  "name": "abc123",
  "payments": PaymentsConnection,
  "reconciliationReport": ReconciliationReport,
  "schema": Schema,
  "type": "double",
  "unreconciledTxs": TxsConnection,
  "workspaceId": "3116551f-5efc-4c9e-84ac-5a36a51b09c1"
}
```

- **balanceUTCOffset** ([UTCOffset!](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-utcoffset))

  When aggregating balances, all transactions within a 24 hour period starting at midnight UTC plus this offset are included in each day.

- **created** ([DateTime!](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-datetime))

- **dashboardUrl** ([String!](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-string))

  URL to the Fragment  Dashboard for this Ledger.

- **entryStats** ([LedgerEntryStatsConnection!](https://fragment.dev/markdown/api-reference/ledger-types.md#connection-types-ledgerentrystatsconnection))

  Entry statistics for this Ledger.

  Arguments:

  - **after** ([String](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-string))

    Where to start paginating from, when paginating forwards. Send endCursor from a response to get its next page. Learn more about [pagination](https://fragment.dev/markdown/guides/query-data.md#basics-pagination).

  - **before** ([String](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-string))

    Where to start paginating from, when paginating backwards. Send startCursor from a response to get the previous page. Learn more about [pagination](https://fragment.dev/markdown/guides/query-data.md#basics-pagination).

  - **first** ([Int](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-int))

    The number of Ledger Entry Stats to return per page, when paginating forwards. Defaults to 20, maximum is 200.

  - **last** ([Int](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-int))

    The number of Ledger Entry Stats to return per page, when paginating backwards. Defaults to 20, maximum is 200.

- **id** ([ID!](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-id))

- **ik** ([SafeString!](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-safestring))

  The IK passed into the [createLedger](https://fragment.dev/markdown/api-reference/ledger-mutations.md#createledger) mutation. This is treated as a unique identifier for this Ledger.

- **ledgerAccountDataMigrations** ([LedgerAccountDataMigrationConnection!](https://fragment.dev/markdown/api-reference/ledger-types.md#connection-types-ledgeraccountdatamigrationconnection))

  Ledger Account data migrations affecting this Ledger.

  Arguments:

  - **after** ([String](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-string))

    Where to start paginating from, when paginating forwards. Send endCursor from a response to get its next page. Learn more about [pagination](https://fragment.dev/markdown/guides/query-data.md#basics-pagination).

  - **before** ([String](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-string))

    Where to start paginating from, when paginating backwards. Send startCursor from a response to get the previous page. Learn more about [pagination](https://fragment.dev/markdown/guides/query-data.md#basics-pagination).

  - **filter** ([LedgerAccountDataMigrationsFilterSet](https://fragment.dev/markdown/api-reference/ledger-types.md#filter-types-ledgeraccountdatamigrationsfilterset))

    Filter the list of Ledger Account data migrations returned.

  - **first** ([Int](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-int))

    The number of Ledger Account Data Migrations to return per page, when paginating forwards. Defaults to 20, maximum is 200.

  - **last** ([Int](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-int))

    The number of Ledger Account Data Migrations to return per page, when paginating backwards. Defaults to 20, maximum is 200.

- **ledgerAccounts** ([LedgerAccountsConnection!](https://fragment.dev/markdown/api-reference/ledger-types.md#connection-types-ledgeraccountsconnection))

  Query LedgerAccounts in Ledger. Ledger Accounts are paginated and returned in reverse-chronological order by their created date.

  Arguments:

  - **after** ([String](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-string))

    Where to start paginating from, when paginating forwards. Send endCursor from a response to get its next page. Learn more about [pagination](https://fragment.dev/markdown/guides/query-data.md#basics-pagination).

  - **before** ([String](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-string))

    Where to start paginating from, when paginating backwards. Send startCursor from a response to get the previous page. Learn more about [pagination](https://fragment.dev/markdown/guides/query-data.md#basics-pagination).

  - **filter** ([LedgerAccountsFilterSet](https://fragment.dev/markdown/api-reference/ledger-types.md#filter-types-ledgeraccountsfilterset))

    Filter the Ledger Accounts returned. Learn more about [querying Ledger Accounts](https://fragment.dev/markdown/guides/query-data.md#ledger-accounts).

  - **first** ([Int](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-int))

    The number of Ledger Accounts to return per page, when paginating forwards. Defaults to 20, maximum is 200.

  - **last** ([Int](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-int))

    The number of Ledger Accounts to return per page, when paginating backwards. Defaults to 20, maximum is 200.

- **ledgerEntries** ([LedgerEntriesConnection!](https://fragment.dev/markdown/api-reference/ledger-types.md#connection-types-ledgerentriesconnection))

  Query Ledger Entries in a Ledger. Ledger Entries are paginated and sorted in reverse-chronological order by posted date.

  Arguments:

  - **after** ([String](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-string))

    Where to start paginating from, when paginating forwards. Send endCursor from a response to get its next page. Learn more about [pagination](https://fragment.dev/markdown/guides/query-data.md#basics-pagination).

  - **before** ([String](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-string))

    Where to start paginating from, when paginating backwards. Send startCursor from a response to get the previous page. Learn more about [pagination](https://fragment.dev/markdown/guides/query-data.md#basics-pagination).

  - **filter** ([LedgerEntriesFilterSet](https://fragment.dev/markdown/api-reference/ledger-types.md#filter-types-ledgerentriesfilterset))

    Filter the Ledger Entries returned. Learn more about [querying Ledger Entries](https://fragment.dev/markdown/guides/query-data.md#ledger-entries).

  - **first** ([Int](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-int))

    The number of Ledger Entries to return per page, when paginating forwards. Defaults to 20, maximum is 200.

  - **last** ([Int](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-int))

    The number of Ledger Entries to return per page, when paginating backwards. Defaults to 20, maximum is 200.

- **ledgerEntryDataMigrations** ([LedgerEntryDataMigrationConnection!](https://fragment.dev/markdown/api-reference/ledger-types.md#connection-types-ledgerentrydatamigrationconnection))

  Ledger Entry data migrations affecting this Ledger.

  Arguments:

  - **after** ([String](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-string))

    Where to start paginating from, when paginating forwards. Send endCursor from a response to get its next page. Learn more about [pagination](https://fragment.dev/markdown/guides/query-data.md#basics-pagination).

  - **before** ([String](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-string))

    Where to start paginating from, when paginating backwards. Send startCursor from a response to get the previous page. Learn more about [pagination](https://fragment.dev/markdown/guides/query-data.md#basics-pagination).

  - **filter** ([LedgerEntryDataMigrationsFilterSet](https://fragment.dev/markdown/api-reference/ledger-types.md#filter-types-ledgerentrydatamigrationsfilterset))

    Filter the list of Ledger Entry data migrations returned.

  - **first** ([Int](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-int))

    The number of Ledger Entry Data Migrations to return per page, when paginating forwards. Defaults to 20, maximum is 200.

  - **last** ([Int](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-int))

    The number of Ledger Entry Data Migrations to return per page, when paginating backwards. Defaults to 20, maximum is 200.

- **ledgerEntryGroup** ([LedgerEntryGroup!](https://fragment.dev/markdown/api-reference/ledger-types.md#utility-types-ledgerentrygroup))

  Query a Ledger Entry Group for this Ledger given its key and value.

  Arguments:

  - **ledgerEntryGroup** ([EntryGroupMatchInput!](https://fragment.dev/markdown/api-reference/ledger-types.md#matchinput-types-entrygroupmatchinput))

- **ledgerEntryGroups** ([LedgerEntryGroupsConnection!](https://fragment.dev/markdown/api-reference/ledger-types.md#connection-types-ledgerentrygroupsconnection))

  Query LedgerEntryGroups in Ledger. Ledger Entry Groups are paginated and returned in order lexigraphically key then inverse chronologically by created.

  Arguments:

  - **after** ([String](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-string))

    Where to start paginating from, when paginating forwards. Send endCursor from a response to get its next page. Learn more about [pagination](https://fragment.dev/markdown/guides/query-data.md#basics-pagination).

  - **before** ([String](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-string))

    Where to start paginating from, when paginating backwards. Send startCursor from a response to get the previous page. Learn more about [pagination](https://fragment.dev/markdown/guides/query-data.md#basics-pagination).

  - **filter** ([LedgerEntryGroupsFilterSet](https://fragment.dev/markdown/api-reference/ledger-types.md#filter-types-ledgerentrygroupsfilterset))

    Filter the Ledger Entry Groups returned.

  - **first** ([Int](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-int))

    The number of Ledger Entry Groups to return per page, when paginating forwards. Defaults to 20, maximum is 200.

  - **last** ([Int](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-int))

    The number of Ledger Entry Groups to return per page, when paginating backwards. Defaults to 20, maximum is 200.

- **lines** ([LedgerLinesConnection!](https://fragment.dev/markdown/api-reference/ledger-types.md#connection-types-ledgerlinesconnection))

  List Ledger Lines across accounts in this Ledger, sorted by `posted` in reverse chronological order. Specify a single Ledger Account via the `ledgerAccount` field, or query across multiple accounts using the `path` filter or `ledgerAccount.in`.

  Arguments:

  - **after** ([String](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-string))

    Where to start paginating from, when paginating forwards. Send endCursor from a response to get its next page. Learn more about [pagination](https://fragment.dev/markdown/guides/query-data.md#basics-pagination).

  - **before** ([String](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-string))

    Where to start paginating from, when paginating backwards. Send startCursor from a response to get the previous page. Learn more about [pagination](https://fragment.dev/markdown/guides/query-data.md#basics-pagination).

  - **filter** ([LedgerLinesFilterSet!](https://fragment.dev/markdown/api-reference/ledger-types.md#filter-types-ledgerlinesfilterset))

    Filter the Ledger Lines returned. Either the `ledgerAccount` or `path` field is required. Learn more about [querying Ledger Lines](https://fragment.dev/markdown/guides/query-data.md#ledger-lines).

  - **first** ([Int](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-int))

    The number of Ledger Lines to return per page, when paginating forwards. Defaults to 20, maximum is 200.

  - **last** ([Int](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-int))

    The number of Ledger Lines to return per page, when paginating backwards. Defaults to 20, maximum is 200.

- **migrations** ([LedgerMigrationConnection!](https://fragment.dev/markdown/api-reference/ledger-types.md#connection-types-ledgermigrationconnection))

  Schema migrations affecting this Ledger.

  Arguments:

  - **after** ([String](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-string))

    Where to start paginating from, when paginating forwards. Send endCursor from a response to get its next page. Learn more about [pagination](https://fragment.dev/markdown/guides/query-data.md#basics-pagination).

  - **before** ([String](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-string))

    Where to start paginating from, when paginating backwards. Send startCursor from a response to get the previous page. Learn more about [pagination](https://fragment.dev/markdown/guides/query-data.md#basics-pagination).

  - **first** ([Int](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-int))

    The number of Ledger Migrations to return per page, when paginating forwards. Defaults to 20, maximum is 200.

  - **last** ([Int](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-int))

    The number of Ledger Migrations to return per page, when paginating backwards. Defaults to 20, maximum is 200.

- **name** ([String!](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-string))

  The name of the Ledger. Can be updated with the [updateLedger](https://fragment.dev/markdown/api-reference/ledger-mutations.md#updateledger) mutation.

- **payments** ([PaymentsConnection!](https://fragment.dev/markdown/api-reference/ledger-types.md#connection-types-paymentsconnection))

  List the Payments on a Ledger, most recent first.

  Arguments:

  - **after** ([String](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-string))

    Where to start paginating from, when paginating forwards. Send endCursor from a response to get its next page. Learn more about [pagination](https://fragment.dev/markdown/guides/query-data.md#basics-pagination).

  - **before** ([String](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-string))

    Where to start paginating from, when paginating backwards. Send startCursor from a response to get the previous page. Learn more about [pagination](https://fragment.dev/markdown/guides/query-data.md#basics-pagination).

  - **filter** ([PaymentsFilterSet](https://fragment.dev/markdown/api-reference/ledger-types.md#filter-types-paymentsfilterset))

    Filter the Payments returned.

  - **first** ([Int](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-int))

    The number of Payments to return per page, when paginating forwards. Defaults to 20, maximum is 200.

  - **last** ([Int](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-int))

    The number of Payments to return per page, when paginating backwards. Defaults to 20, maximum is 200.

- **reconciliationReport** ([ReconciliationReport!](https://fragment.dev/markdown/api-reference/ledger-types.md#utility-types-reconciliationreport))

  Counts of pending clearing accounts and unreconciled transactions, grouped by age measured from the time of the request.

  Arguments:

  - **clearingAccounts** ([AgingClearingAccountsInput](https://fragment.dev/markdown/api-reference/ledger-types.md#input-types-agingclearingaccountsinput))

    Requests clearing-account counts. Omit to skip them; provide an empty object for all pending accounts.

  - **granularity** ([Granularity!](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-granularity))

    Unit of age. Monthly intervals use calendar months.

  - **intervals** ([Int!](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-int))

    Number of intervals, including the open-ended oldest interval. Between 1 and 7.

  - **unreconciledTxs** ([AgingUnreconciledTxsInput](https://fragment.dev/markdown/api-reference/ledger-types.md#input-types-agingunreconciledtxsinput))

    Requests transaction counts for the specified Links. Requires link.read.

- **schema** ([Schema](https://fragment.dev/markdown/api-reference/ledger-types.md#core-types-schema))

  Schema key associated with this Ledger.

- **type** ([LedgerTypes!](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-ledgertypes))

- **unreconciledTxs** ([TxsConnection!](https://fragment.dev/markdown/api-reference/ledger-types.md#connection-types-txsconnection))

  Transactions in the specified Links that have not been reconciled to any account in this Ledger. Includes external accounts not linked to this Ledger. Sorted by posted timestamp, newest first.

  Arguments:

  - **after** ([String](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-string))

    Where to start paginating from, when paginating forwards. Send endCursor from a response to get its next page. Learn more about [pagination](https://fragment.dev/markdown/guides/query-data.md#basics-pagination).

  - **before** ([String](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-string))

    Where to start paginating from, when paginating backwards. Send startCursor from a response to get the previous page. Learn more about [pagination](https://fragment.dev/markdown/guides/query-data.md#basics-pagination).

  - **filter** ([LedgerUnreconciledTxsFilterSet](https://fragment.dev/markdown/api-reference/ledger-types.md#filter-types-ledgerunreconciledtxsfilterset))

    Filter the unreconciled transactions returned.

  - **first** ([Int](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-int))

    The number of unreconciled transactions to return per page, when paginating forwards. Defaults to 20, maximum is 200.

  - **last** ([Int](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-int))

    The number of unreconciled transactions to return per page, when paginating backwards. Defaults to 20, maximum is 200.

  - **links** ([[LinkMatchInput!]!](https://fragment.dev/markdown/api-reference/ledger-types.md#matchinput-types-linkmatchinput))

    Links to search, identified by Fragment  ID or Custom Link creation IK. Provide between 1 and 100 selectors. Duplicate Links are searched once.

- **workspaceId** ([ID!](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-id))

  Callers should not need to query or store this value.

<a id="core-types-ledgeraccount"></a>

### LedgerAccount

A ledger account is a container for money

```json
{
  "balance": "999999999999",
  "balanceChange": "999999999999",
  "balanceChanges": CurrencyAmountConnection,
  "balanceChangesDuring": BalanceChangeDuringConnection,
  "balances": CurrencyAmountConnection,
  "balancesDuring": HistoricalBalanceConnection,
  "childBalance": "999999999999",
  "childBalanceChange": "999999999999",
  "childBalanceChanges": CurrencyAmountConnection,
  "childBalanceChangesDuring": BalanceChangeDuringConnection,
  "childBalances": CurrencyAmountConnection,
  "childBalancesDuring": HistoricalBalanceConnection,
  "childLedgerAccounts": LedgerAccountsConnection,
  "clearingStatus": "cleared",
  "consistencyConfig": LedgerAccountConsistencyConfig,
  "created": "2007-12-03T10:15:30Z",
  "currency": Currency,
  "currencyMode": "multi",
  "dashboardUrl": "abc123",
  "id": "3116551f-5efc-4c9e-84ac-5a36a51b09c1",
  "ik": "abc123",
  "ledger": Ledger,
  "ledgerEntries": LedgerEntriesConnection,
  "ledgerId": "3116551f-5efc-4c9e-84ac-5a36a51b09c1",
  "lines": LedgerLinesConnection,
  "link": Link,
  "linkedAccount": ExternalAccount,
  "name": "abc123",
  "ownBalance": "999999999999",
  "ownBalanceChange": "999999999999",
  "ownBalanceChanges": CurrencyAmountConnection,
  "ownBalanceChangesDuring": BalanceChangeDuringConnection,
  "ownBalances": CurrencyAmountConnection,
  "ownBalancesDuring": HistoricalBalanceConnection,
  "parentLedgerAccount": LedgerAccount,
  "parentLedgerAccountId": "3116551f-5efc-4c9e-84ac-5a36a51b09c1",
  "path": "abc123",
  "payment": LedgerAccountPayment,
  "postedWindow": PostedWindow,
  "type": "asset",
  "unreconciledTxs": TxsConnection,
  "workspaceId": "3116551f-5efc-4c9e-84ac-5a36a51b09c1"
}
```

- **balance** ([Int96!](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-int96))

  Total of all lines in this ledger account and child ledger accounts of the same currency as this ledger account

  Arguments:

  - **at** ([LastMoment](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-lastmoment))

    Provide a timestamp to get this balance at a specific logical time. If not specified, the latest value will be returned e.g. 1969 or 1969-07 or 1969-07-03 or 1969-07-21T02

  - **consistencyMode** ([ReadBalanceConsistencyMode](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-readbalanceconsistencymode))

  - **currency** ([CurrencyMatchInput](https://fragment.dev/markdown/api-reference/ledger-types.md#matchinput-types-currencymatchinput))

    The currency of the balance to query. Required if the account is a multi-currency Ledger Account or if the the Ledger Account has child Ledger Accounts with different currencies.

- **balanceChange** ([Int96!](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-int96))

  How much did the this ledger account's balance change during the specified period. This query will include all child accounts in the same currency as this ledger account.

  Arguments:

  - **currency** ([CurrencyMatchInput](https://fragment.dev/markdown/api-reference/ledger-types.md#matchinput-types-currencymatchinput))

    The currency of the balance change to query. Required if the account is a multi-currency Ledger Account or if the the Ledger Account has child Ledger Accounts with different currencies.

  - **period** ([Period!](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-period))

    Specifies the period of time over which this query will calculate the balance difference e.g. 1969 or 1969-Q3 or 1969-07 or 1969-07-21 or 1969-07-21T02

- **balanceChanges** ([CurrencyAmountConnection!](https://fragment.dev/markdown/api-reference/ledger-types.md#connection-types-currencyamountconnection))

  How much did the this ledger account's balances change during the specified period. This query will include all child accounts of all currencies.

  Arguments:

  - **period** ([Period!](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-period))

    Specifies the period of time over which this query will calculate the balance difference e.g. 1969 or 1969-Q3 or 1969-07 or 1969-07-21 or 1969-07-21T02

- **balanceChangesDuring** ([BalanceChangeDuringConnection!](https://fragment.dev/markdown/api-reference/ledger-types.md#connection-types-balancechangeduringconnection))

  How much did the ledger account's balances change over a time period with a specified granularity. For example, if the period is 1969-07 and the granularity is daily, the query will return the balance changes for each day in the month.

  Arguments:

  - **currency** ([CurrencyMatchInput](https://fragment.dev/markdown/api-reference/ledger-types.md#matchinput-types-currencymatchinput))

    The currency of the balance changes to query. Required if the account is a multi-currency Ledger Account.

  - **duration** ([Int!](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-int))

    The duration of the period to query in units of the granularity. The duration can be positive or negative. Negative durations will return the balance changes for the period before the startTime.

  - **granularity** ([Granularity!](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-granularity))

    The granularity of the balance changes to query. For yearly or quarterly periods, the granularity should be "monthly", "daily", or "hourly". For monthly periods, the granularity should be "daily" or "hourly". For daily periods, the granularity should be "hourly".

  - **startTime** ([FirstMoment!](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-firstmoment))

    Specifies the start time from which to calculate the balance differences for the given duration e.g. 1969 or 1969-Q3 or 1969-07 or 1969-07-21 or 1969-07-21T02

- **balances** ([CurrencyAmountConnection!](https://fragment.dev/markdown/api-reference/ledger-types.md#connection-types-currencyamountconnection))

  Total of all lines in this ledger account and child ledger accounts in all currencies

  Arguments:

  - **after** ([String](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-string))

    Where to start paginating from, when paginating forwards. Send endCursor from a response to get its next page. Learn more about [pagination](https://fragment.dev/markdown/guides/query-data.md#basics-pagination).

  - **at** ([LastMoment](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-lastmoment))

    Provide a timestamp to get this balance at a specific logical time. If not specified, the latest value will be returned e.g. 1969 or 1969-07 or 1969-07-21 or 1969-07-21T02

  - **before** ([String](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-string))

    Where to start paginating from, when paginating backwards. Send startCursor from a response to get the previous page. Learn more about [pagination](https://fragment.dev/markdown/guides/query-data.md#basics-pagination).

  - **consistencyMode** ([ReadBalanceConsistencyMode](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-readbalanceconsistencymode))

  - **first** ([Int](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-int))

    The number of currency amounts to return per page, when paginating forwards. Defaults to 20, maximum is 200.

  - **last** ([Int](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-int))

    The number of currency amounts to return per page, when paginating backwards. Defaults to 20, maximum is 200.

- **balancesDuring** ([HistoricalBalanceConnection!](https://fragment.dev/markdown/api-reference/ledger-types.md#connection-types-historicalbalanceconnection))

  The ledger account's balances over a time period with a specified granularity. For example, if the period is 1969-07 and the granularity is daily, the query will return the balance for each day in the month.

  Arguments:

  - **currency** ([CurrencyMatchInput](https://fragment.dev/markdown/api-reference/ledger-types.md#matchinput-types-currencymatchinput))

    The currency of the balance changes to query. Required if the account is a multi-currency Ledger Account.

  - **duration** ([Int!](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-int))

    The duration of the period to query in units of the granularity. The duration can be positive or negative. Negative durations will return the balance changes for the period before the startTime.

  - **granularity** ([Granularity!](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-granularity))

    The granularity of the balance changes to query. For yearly or quarterly periods, the granularity should be "monthly", "daily", or "hourly". For monthly periods, the granularity should be "daily" or "hourly". For daily periods, the granularity should be "hourly".

  - **startTime** ([FirstMoment!](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-firstmoment))

    Specifies the start time from which to calculate the balance differences for the given duration e.g. 1969 or 1969-Q3 or 1969-07 or 1969-07-21 or 1969-07-21T02

- **childBalance** ([Int96!](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-int96))

  Total of all lines in child ledger accounts of the same currency as this ledger account

  Arguments:

  - **at** ([LastMoment](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-lastmoment))

    Provide a timestamp to get this balance at a specific logical time. If not specified, the latest value will be returned e.g. 1969 or 1969-07 or 1969-07-21 or 1969-07-21T02

  - **consistencyMode** ([ReadBalanceConsistencyMode](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-readbalanceconsistencymode))

  - **currency** ([CurrencyMatchInput](https://fragment.dev/markdown/api-reference/ledger-types.md#matchinput-types-currencymatchinput))

    The currency of the balance to query. Required if the Ledger Account has child Ledger Accounts with different currencies.

- **childBalanceChange** ([Int96!](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-int96))

  How much did the this ledger account's childBalance change during the specified period. This query will only include child accounts which are in the same currency as this one. See childBalanceChanges to include children of different currencies.

  Arguments:

  - **currency** ([CurrencyMatchInput](https://fragment.dev/markdown/api-reference/ledger-types.md#matchinput-types-currencymatchinput))

    The currency of the balance change to query. Required if the Ledger Account has child Ledger Accounts with different currencies.

  - **period** ([Period!](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-period))

    Specifies the period of time over which this query will calculate the balance difference e.g. 1969 or 1969-Q3 or 1969-07 or 1969-07-21 or 1969-07-21T02.

- **childBalanceChanges** ([CurrencyAmountConnection!](https://fragment.dev/markdown/api-reference/ledger-types.md#connection-types-currencyamountconnection))

  How much did the this ledger account's child accounts' balances change during the specified period. This query will include all child accounts of all currencies.

  Arguments:

  - **period** ([Period!](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-period))

    Specifies the period of time over which this query will calculate the balance difference e.g. 1969 or 1969-Q3 or 1969-07 or 1969-07-21 or 1969-07-21T02

- **childBalanceChangesDuring** ([BalanceChangeDuringConnection!](https://fragment.dev/markdown/api-reference/ledger-types.md#connection-types-balancechangeduringconnection))

  How much did the ledger account's childBalances change over a time period with a specified granularity. For example, if the period is 1969-07 and the granularity is daily, the query will return the balance changes for each day in the month.

  Arguments:

  - **currency** ([CurrencyMatchInput](https://fragment.dev/markdown/api-reference/ledger-types.md#matchinput-types-currencymatchinput))

    The currency of the balance changes to query. Required if the account is a multi-currency Ledger Account.

  - **duration** ([Int!](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-int))

    The duration of the period to query in units of the granularity. The duration can be positive or negative. Negative durations will return the balance changes for the period before the startTime.

  - **granularity** ([Granularity!](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-granularity))

    The granularity of the balance changes to query. For yearly or quarterly periods, the granularity should be "monthly", "daily", or "hourly". For monthly periods, the granularity should be "daily" or "hourly". For daily periods, the granularity should be "hourly".

  - **startTime** ([FirstMoment!](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-firstmoment))

    Specifies the start time from which to calculate the balance differences for the given duration e.g. 1969 or 1969-Q3 or 1969-07 or 1969-07-21 or 1969-07-21T02

- **childBalances** ([CurrencyAmountConnection!](https://fragment.dev/markdown/api-reference/ledger-types.md#connection-types-currencyamountconnection))

  Total of all lines in child ledger accounts of this ledger in all currencies

  Arguments:

  - **after** ([String](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-string))

    Where to start paginating from, when paginating forwards. Send endCursor from a response to get its next page. Learn more about [pagination](https://fragment.dev/markdown/guides/query-data.md#basics-pagination).

  - **at** ([LastMoment](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-lastmoment))

    Provide a timestamp to get this balance at a specific logical time. If not specified, the latest value will be returned e.g. 1969 or 1969-07 or 1969-07-21 or 1969-07-21T02

  - **before** ([String](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-string))

    Where to start paginating from, when paginating backwards. Send startCursor from a response to get the previous page. Learn more about [pagination](https://fragment.dev/markdown/guides/query-data.md#basics-pagination).

  - **consistencyMode** ([ReadBalanceConsistencyMode](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-readbalanceconsistencymode))

  - **first** ([Int](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-int))

    The number of currency amounts to return per page, when paginating forwards. Defaults to 20, maximum is 200.

  - **last** ([Int](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-int))

    The number of currency amounts to return per page, when paginating backwards. Defaults to 20, maximum is 200.

- **childBalancesDuring** ([HistoricalBalanceConnection!](https://fragment.dev/markdown/api-reference/ledger-types.md#connection-types-historicalbalanceconnection))

  The ledger account's childBalances over a time period with a specified granularity. For example, if the period is 1969-07 and the granularity is daily, the query will return the balance for each day in the month.

  Arguments:

  - **currency** ([CurrencyMatchInput](https://fragment.dev/markdown/api-reference/ledger-types.md#matchinput-types-currencymatchinput))

    The currency of the balance changes to query. Required if the account is a multi-currency Ledger Account.

  - **duration** ([Int!](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-int))

    The duration of the period to query in units of the granularity. The duration can be positive or negative. Negative durations will return the balance changes for the period before the startTime.

  - **granularity** ([Granularity!](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-granularity))

    The granularity of the balance changes to query. For yearly or quarterly periods, the granularity should be "monthly", "daily", or "hourly". For monthly periods, the granularity should be "daily" or "hourly". For daily periods, the granularity should be "hourly".

  - **startTime** ([FirstMoment!](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-firstmoment))

    Specifies the start time from which to calculate the balance differences for the given duration e.g. 1969 or 1969-Q3 or 1969-07 or 1969-07-21 or 1969-07-21T02

- **childLedgerAccounts** ([LedgerAccountsConnection!](https://fragment.dev/markdown/api-reference/ledger-types.md#connection-types-ledgeraccountsconnection))

  The child Ledger Accounts of this Ledger Accountw

  Arguments:

  - **after** ([String](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-string))

    Where to start paginating from, when paginating forwards. Send endCursor from a response to get its next page. Learn more about [pagination](https://fragment.dev/markdown/guides/query-data.md#basics-pagination).

  - **before** ([String](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-string))

    Where to start paginating from, when paginating backwards. Send startCursor from a response to get the previous page. Learn more about [pagination](https://fragment.dev/markdown/guides/query-data.md#basics-pagination).

  - **first** ([Int](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-int))

    The number of Child Ledger Accounts to return per page, when paginating forwards. Defaults to 20, maximum is 200.

  - **last** ([Int](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-int))

    The number of Child Ledger Accounts to return per page, when paginating backwards. Defaults to 20, maximum is 200.

- **clearingStatus** ([LedgerAccountClearingStatus](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-ledgeraccountclearingstatus))

  The clearing status of the Ledger Account. This field is null when the Ledger Account is not configured to be a Clearing account.

- **consistencyConfig** ([LedgerAccountConsistencyConfig!](https://fragment.dev/markdown/api-reference/ledger-types.md#utility-types-ledgeraccountconsistencyconfig))

  The consistency configuration for this Ledger Account. This defines how updates to this Ledger Account's ownBalance are handled.

- **created** ([DateTime!](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-datetime))

- **currency** ([Currency](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-currency))

  Currency of this ledger account

- **currencyMode** ([CurrencyMode!](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-currencymode))

  Indicates if the account allows multiple currencies or is restricted to a single currency

- **dashboardUrl** ([String!](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-string))

  URL to the Fragment  Dashboard for this Ledger Account.

- **id** ([ID!](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-id))

- **ik** ([String!](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-string))

  The idempotency key used to create this account

- **ledger** ([Ledger!](https://fragment.dev/markdown/api-reference/ledger-types.md#core-types-ledger))

  Ledger this account is in

- **ledgerEntries** ([LedgerEntriesConnection!](https://fragment.dev/markdown/api-reference/ledger-types.md#connection-types-ledgerentriesconnection))

  All Ledger Entries that have posted to this Ledger Account. Ledger Entries are paginated and sorted in reverse-chronological order by posted date.

  Arguments:

  - **after** ([String](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-string))

    Where to start paginating from, when paginating forwards. Send endCursor from a response to get its next page. Learn more about [pagination](https://fragment.dev/markdown/guides/query-data.md#basics-pagination).

  - **before** ([String](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-string))

    Where to start paginating from, when paginating backwards. Send startCursor from a response to get the previous page. Learn more about [pagination](https://fragment.dev/markdown/guides/query-data.md#basics-pagination).

  - **first** ([Int](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-int))

    The number of Ledger Entries to return per page, when paginating forwards. Defaults to 20, maximum is 200.

  - **last** ([Int](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-int))

    The number of Ledger Entries to return per page, when paginating backwards. Defaults to 20, maximum is 200.

- **ledgerId** ([ID!](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-id))

  ID of the ledger this account is in

- **lines** ([LedgerLinesConnection!](https://fragment.dev/markdown/api-reference/ledger-types.md#connection-types-ledgerlinesconnection))

  List Ledger Lines in this account, sorted by `posted` in reverse chronological order. Does not include Ledger Lines from child Ledger Accounts.

  Arguments:

  - **after** ([String](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-string))

    Where to start paginating from, when paginating forwards. Send endCursor from a response to get its next page. Learn more about [pagination](https://fragment.dev/markdown/guides/query-data.md#basics-pagination).

  - **before** ([String](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-string))

    Where to start paginating from, when paginating backwards. Send startCursor from a response to get the previous page. Learn more about [pagination](https://fragment.dev/markdown/guides/query-data.md#basics-pagination).

  - **filter** ([LedgerLinesFilterSet](https://fragment.dev/markdown/api-reference/ledger-types.md#filter-types-ledgerlinesfilterset))

    Filter the Ledger Lines returned. Learn more about [querying Ledger Lines](https://fragment.dev/markdown/guides/query-data.md#ledger-lines).

  - **first** ([Int](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-int))

    The number of Ledger Lines to return per page, when paginating forwards. Defaults to 20, maximum is 200.

  - **last** ([Int](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-int))

    The number of Ledger Lines to return per page, when paginating backwards. Defaults to 20, maximum is 200.

- **link** ([Link](https://fragment.dev/markdown/api-reference/ledger-types.md#core-types-link))

  The Link for the External Account that is linked to this ledger account

- **linkedAccount** ([ExternalAccount](https://fragment.dev/markdown/api-reference/ledger-types.md#core-types-externalaccount))

  External Account that is linked to this ledger account

- **name** ([String](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-string))

  The name of your Ledger Account

- **ownBalance** ([Int96!](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-int96))

  Total of all lines in this ledger account, excluding all child ledger accounts

  Arguments:

  - **at** ([LastMoment](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-lastmoment))

    Provide a timestamp to get this balance at a specific logical time. If not specified, the latest value will be returned e.g. 1969 or 1969-07 or 1969-07-21 or 1969-07-21T02

  - **consistencyMode** ([ReadBalanceConsistencyMode](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-readbalanceconsistencymode))

  - **currency** ([CurrencyMatchInput](https://fragment.dev/markdown/api-reference/ledger-types.md#matchinput-types-currencymatchinput))

    The currency of the balance to query. Required if the account is a multi-currency Ledger Account.

- **ownBalanceChange** ([Int96!](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-int96))

  How much did the this ledger account's ownBalance change during the specified period. This query will exclude all child accounts.

  Arguments:

  - **currency** ([CurrencyMatchInput](https://fragment.dev/markdown/api-reference/ledger-types.md#matchinput-types-currencymatchinput))

    The currency of the balance change to query. Required if the account is a multi-currency Ledger Account.

  - **period** ([Period!](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-period))

    Specifies the period of time over which this query will calculate the balance difference e.g. 1969 or 1969-Q3 or 1969-07 or 1969-07-21 or 1969-07-21T02

- **ownBalanceChanges** ([CurrencyAmountConnection!](https://fragment.dev/markdown/api-reference/ledger-types.md#connection-types-currencyamountconnection))

  How much did the this ledger account's ownBalance change during the specified period. This is the total of all lines in this ledger account, excluding all child ledger accounts

  Arguments:

  - **period** ([Period!](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-period))

    Specifies the period of time over which this query will calculate the balance difference e.g. 1969 or 1969-Q3 or 1969-07 or 1969-07-21 or 1969-07-21T02

- **ownBalanceChangesDuring** ([BalanceChangeDuringConnection!](https://fragment.dev/markdown/api-reference/ledger-types.md#connection-types-balancechangeduringconnection))

  How much did the ledger account's ownBalances change over a time period with a specified granularity. For example, if the period is 1969-07 and the granularity is daily, the query will return the balance changes for each day in the month.

  Arguments:

  - **currency** ([CurrencyMatchInput](https://fragment.dev/markdown/api-reference/ledger-types.md#matchinput-types-currencymatchinput))

    The currency of the balance changes to query. Required if the account is a multi-currency Ledger Account.

  - **duration** ([Int!](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-int))

    The duration of the period to query in units of the granularity. The duration can be positive or negative. Negative durations will return the balance changes for the period before the startTime.

  - **granularity** ([Granularity!](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-granularity))

    The granularity of the balance changes to query. For yearly or quarterly periods, the granularity should be "monthly", "daily", or "hourly". For monthly periods, the granularity should be "daily" or "hourly". For daily periods, the granularity should be "hourly".

  - **startTime** ([FirstMoment!](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-firstmoment))

    Specifies the start time from which to calculate the balance differences for the given duration e.g. 1969 or 1969-Q3 or 1969-07 or 1969-07-21 or 1969-07-21T02

- **ownBalances** ([CurrencyAmountConnection!](https://fragment.dev/markdown/api-reference/ledger-types.md#connection-types-currencyamountconnection))

  Total of all lines across all currencies in this ledger account, excluding all child ledger accounts

  Arguments:

  - **after** ([String](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-string))

    Where to start paginating from, when paginating forwards. Send endCursor from a response to get its next page. Learn more about [pagination](https://fragment.dev/markdown/guides/query-data.md#basics-pagination).

  - **at** ([LastMoment](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-lastmoment))

    Provide a timestamp to get this balance at a specific logical time. If not specified, the latest value will be returned e.g. 1969 or 1969-07 or 1969-07-21 or 1969-07-21T02

  - **before** ([String](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-string))

    Where to start paginating from, when paginating backwards. Send startCursor from a response to get the previous page. Learn more about [pagination](https://fragment.dev/markdown/guides/query-data.md#basics-pagination).

  - **consistencyMode** ([ReadBalanceConsistencyMode](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-readbalanceconsistencymode))

  - **first** ([Int](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-int))

    The number of currency amounts to return per page, when paginating forwards. Defaults to 20, maximum is 200.

  - **last** ([Int](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-int))

    The number of currency amounts to return per page, when paginating backwards. Defaults to 20, maximum is 200.

- **ownBalancesDuring** ([HistoricalBalanceConnection!](https://fragment.dev/markdown/api-reference/ledger-types.md#connection-types-historicalbalanceconnection))

  The ledger account's ownBalances over a time period with a specified granularity. For example, if the period is 1969-07 and the granularity is daily, the query will return the balance for each day in the month.

  Arguments:

  - **currency** ([CurrencyMatchInput](https://fragment.dev/markdown/api-reference/ledger-types.md#matchinput-types-currencymatchinput))

    The currency of the balance changes to query. Required if the account is a multi-currency Ledger Account.

  - **duration** ([Int!](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-int))

    The duration of the period to query in units of the granularity. The duration can be positive or negative. Negative durations will return the balance changes for the period before the startTime.

  - **granularity** ([Granularity!](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-granularity))

    The granularity of the balance changes to query. For yearly or quarterly periods, the granularity should be "monthly", "daily", or "hourly". For monthly periods, the granularity should be "daily" or "hourly". For daily periods, the granularity should be "hourly".

  - **startTime** ([FirstMoment!](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-firstmoment))

    Specifies the start time from which to calculate the balance differences for the given duration e.g. 1969 or 1969-Q3 or 1969-07 or 1969-07-21 or 1969-07-21T02

- **parentLedgerAccount** ([LedgerAccount](https://fragment.dev/markdown/api-reference/ledger-types.md#core-types-ledgeraccount))

  The parent ledger account of this ledger account

- **parentLedgerAccountId** ([ID](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-id))

  ID of the parent ledger account of this ledger account

- **path** ([String!](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-string))

  The unique Path of the ledger account. This is a slash-delimited string containing the location of an account in its chart of accounts. For accounts created with a schema, this will be composed of account keys. Else, for accounts created with the createLedgerAccounts API, this will be composed of the IKs of an account and its ancestors.

- **payment** ([LedgerAccountPayment](https://fragment.dev/markdown/api-reference/ledger-types.md#utility-types-ledgeraccountpayment))

  Payment configuration of this Ledger Account, if it is a payment account.

- **postedWindow** ([PostedWindow](https://fragment.dev/markdown/api-reference/ledger-types.md#utility-types-postedwindow))

  The posted timestamp window for this clearing account, representing the earliest and latest posted timestamps across all currencies. This field is null when the Ledger Account is not configured to be a Clearing account or when no entries have been posted to this account.

- **type** ([LedgerAccountTypes!](https://fragment.dev/markdown/api-reference/ledger-types.md#utility-types-ledgeraccounttypes))

- **unreconciledTxs** ([TxsConnection!](https://fragment.dev/markdown/api-reference/ledger-types.md#connection-types-txsconnection))

  A list of external account transactions that haven't been reconciled to this ledger account yet. Only populated for linked ledger accounts. Transactions are sorted in reverse chronological order by posted date.

  Arguments:

  - **after** ([String](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-string))

    Where to start paginating from, when paginating forwards. Send endCursor from a response to get its next page. Learn more about [pagination](https://fragment.dev/markdown/guides/query-data.md#basics-pagination).

  - **before** ([String](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-string))

    Where to start paginating from, when paginating backwards. Send startCursor from a response to get the previous page. Learn more about [pagination](https://fragment.dev/markdown/guides/query-data.md#basics-pagination).

  - **filter** ([LedgerAccountUnreconciledTxsFilterSet](https://fragment.dev/markdown/api-reference/ledger-types.md#filter-types-ledgeraccountunreconciledtxsfilterset))

    Filters for unreconciled transactions.

  - **first** ([Int](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-int))

    The number of unreconciled transactions to return per page, when paginating forwards. Defaults to 20, maximum is 200.

  - **last** ([Int](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-int))

    The number of unreconciled transactions to return per page, when paginating backwards. Defaults to 20, maximum is 200.

- **workspaceId** ([ID!](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-id))

  Callers should not need to query or store this value.

<a id="core-types-ledgerdatamigration"></a>

### LedgerDataMigration

Represents a data migration for a Ledger.

```json
{
  "currentMigration": LedgerDataMigrationHistoryEntry,
  "history": LedgerDataMigrationHistoryConnection,
  "ledgerEntries": LedgerEntriesConnection,
  "status": "active"
}
```

- **currentMigration** ([LedgerDataMigrationHistoryEntry](https://fragment.dev/markdown/api-reference/ledger-types.md#utility-types-ledgerdatamigrationhistoryentry))

  Current active migration info (null if migration is inactive).

- **history** ([LedgerDataMigrationHistoryConnection!](https://fragment.dev/markdown/api-reference/ledger-types.md#connection-types-ledgerdatamigrationhistoryconnection))

  The historical transitions of this migration.

  Arguments:

  - **after** ([String](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-string))

    Where to start paginating from, when paginating forwards. Send endCursor from a response to get its next page. Learn more about [pagination](https://fragment.dev/markdown/guides/query-data.md#basics-pagination).

  - **before** ([String](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-string))

    Where to start paginating from, when paginating backwards. Send startCursor from a response to get the previous page. Learn more about [pagination](https://fragment.dev/markdown/guides/query-data.md#basics-pagination).

  - **first** ([Int](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-int))

    The number of Migration History to return per page, when paginating forwards. Defaults to 20, maximum is 200.

  - **last** ([Int](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-int))

    The number of Migration History to return per page, when paginating backwards. Defaults to 20, maximum is 200.

- **ledgerEntries** ([LedgerEntriesConnection!](https://fragment.dev/markdown/api-reference/ledger-types.md#connection-types-ledgerentriesconnection))

  The ledger entries to be migrated.

  Arguments:

  - **after** ([String](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-string))

    Where to start paginating from, when paginating forwards. Send endCursor from a response to get its next page. Learn more about [pagination](https://fragment.dev/markdown/guides/query-data.md#basics-pagination).

  - **before** ([String](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-string))

    Where to start paginating from, when paginating backwards. Send startCursor from a response to get the previous page. Learn more about [pagination](https://fragment.dev/markdown/guides/query-data.md#basics-pagination).

  - **first** ([Int](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-int))

    The number of Ledger Entries to return per page, when paginating forwards. Defaults to 20, maximum is 200.

  - **last** ([Int](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-int))

    The number of Ledger Entries to return per page, when paginating backwards. Defaults to 20, maximum is 200.

- **status** ([LedgerDataMigrationStatus!](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-ledgerdatamigrationstatus))

  The status of the data migration.

<a id="core-types-ledgerentry"></a>

### LedgerEntry

```json
{
  "conditions": [LedgerEntryCondition],
  "created": "2007-12-03T10:15:30Z",
  "dashboardUrl": "abc123",
  "date": "2022-03-28",
  "description": "abc123",
  "groups": [LedgerEntryGroup],
  "hidden": true,
  "id": "3116551f-5efc-4c9e-84ac-5a36a51b09c1",
  "ik": "abc123",
  "isReversal": true,
  "isReversed": true,
  "ledger": Ledger,
  "ledgerId": "3116551f-5efc-4c9e-84ac-5a36a51b09c1",
  "lines": LedgerLinesConnection,
  "parameters": {"bank_name": "bank-name", "deposit_amount": "10000"},
  "posted": "2007-12-03T10:15:30Z",
  "reversalHistory": LedgerEntriesConnection,
  "reversalPosition": 2277,
  "reversedAt": "2007-12-03T10:15:30Z",
  "reversedBy": LedgerEntry,
  "reverses": LedgerEntry,
  "tags": [LedgerEntryTag],
  "type": "some-safe-string-ik",
  "typeVersion": 2277,
  "workspaceId": "3116551f-5efc-4c9e-84ac-5a36a51b09c1"
}
```

- **conditions** ([[LedgerEntryCondition!]!](https://fragment.dev/markdown/api-reference/ledger-types.md#utility-types-ledgerentrycondition))

  The conditions that were satisfied by this Ledger Entry when it was posted.

- **created** ([DateTime!](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-datetime))

  ISO-8601 timestamp this LedgerEntry was created in Fragment .

- **dashboardUrl** ([String!](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-string))

  URL to the Fragment  Dashboard for this Ledger Entry.

- **date** ([Date!](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-date))

  Date this LedgerEntry posted to its Ledger e.g. "2021-01-01".

- **description** ([String](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-string))

  Description posted for this Ledger Entry.

- **groups** ([[LedgerEntryGroup!]!](https://fragment.dev/markdown/api-reference/ledger-types.md#utility-types-ledgerentrygroup))

  The Ledger Entry Groups this Ledger Entry is in.

- **hidden** ([Boolean!](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-boolean))

  Indicates whether this Ledger Entry is hidden when listing Ledger Entries. Reversed and Reversal Ledger Entries are hidden by default because taken together they have no impact on a Ledger's balances.

- **id** ([ID!](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-id))

  The ID of this LedgerEntry.

- **ik** ([String!](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-string))

  The idempotency key used to post this ledger entry

- **isReversal** ([Boolean!](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-boolean))

  Indicates whether this Ledger Entry is a reversal of another Ledger Entry. If so, reverses will point to that Ledger Entry.

- **isReversed** ([Boolean!](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-boolean))

  Indicates whether this Ledger Entry has been reversed by another Ledger Entry. If so, reversedBy will point to that Ledger Entry.

- **ledger** ([Ledger!](https://fragment.dev/markdown/api-reference/ledger-types.md#core-types-ledger))

  The Ledger that this Ledger Entry is posted to.

- **ledgerId** ([ID!](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-id))

  The ID of the Ledger this Ledger Entry is posted to.

- **lines** ([LedgerLinesConnection!](https://fragment.dev/markdown/api-reference/ledger-types.md#connection-types-ledgerlinesconnection))

  Lines posted in this Ledger Entry.

- **parameters** ([Parameters](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-parameters))

  The parameters used to post this Ledger Entry.

- **posted** ([DateTime!](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-datetime))

  ISO-8601 timestamp this LedgerEntry posted to its Ledger.

- **reversalHistory** ([LedgerEntriesConnection!](https://fragment.dev/markdown/api-reference/ledger-types.md#connection-types-ledgerentriesconnection))

  The reversal history of this Ledger Entry. Each entry in this connection shares the same IK.

- **reversalPosition** ([Int!](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-int))

  The position of this Ledger Entry in its reversalHistory. This is a one-indexed value, so the initial entry will have reversalPosition 1.

- **reversedAt** ([DateTime](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-datetime))

  ISO-8601 timestamp of when this Ledger Entry was reversed.

- **reversedBy** ([LedgerEntry](https://fragment.dev/markdown/api-reference/ledger-types.md#core-types-ledgerentry))

  The Ledger Entry that reversed this Ledger Entry.

- **reverses** ([LedgerEntry](https://fragment.dev/markdown/api-reference/ledger-types.md#core-types-ledgerentry))

  The Ledger Entry that was reversed by this Ledger Entry.

- **tags** ([[LedgerEntryTag!]!](https://fragment.dev/markdown/api-reference/ledger-types.md#utility-types-ledgerentrytag))

  The set of tags attached to this Ledger Entry.

- **type** ([SafeString](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-safestring))

  The type of the Ledger Entry.

- **typeVersion** ([Int](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-int))

  The version of the Ledger Entry type used when it was posted.

- **workspaceId** ([ID!](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-id))

  Callers should not need to query or store this value.

<a id="core-types-ledgerline"></a>

### LedgerLine

```json
{
  "account": LedgerAccount,
  "accountId": "3116551f-5efc-4c9e-84ac-5a36a51b09c1",
  "amount": "999999999999",
  "created": "2007-12-03T10:15:30Z",
  "currency": Currency,
  "date": "2022-03-28",
  "description": "abc123",
  "externalTransferId": "abc123",
  "externalTransferType": "ach",
  "externalTxId": "abc123",
  "hidden": true,
  "id": "3116551f-5efc-4c9e-84ac-5a36a51b09c1",
  "isReversal": true,
  "isReversed": true,
  "key": "abc123",
  "ledger": Ledger,
  "ledgerEntry": LedgerEntry,
  "ledgerEntryId": "3116551f-5efc-4c9e-84ac-5a36a51b09c1",
  "ledgerId": "3116551f-5efc-4c9e-84ac-5a36a51b09c1",
  "otherTxExternalAccountExternalId": "abc123",
  "otherTxExternalAccountId": "abc123",
  "otherTxExternalId": "abc123",
  "otherTxId": "abc123",
  "posted": "2007-12-03T10:15:30Z",
  "reversedAt": "2007-12-03T10:15:30Z",
  "reversedBy": LedgerLine,
  "reverses": LedgerLine,
  "tags": [LedgerLineTag],
  "tx": Tx,
  "txId": "abc123",
  "type": "credit",
  "workspaceId": "3116551f-5efc-4c9e-84ac-5a36a51b09c1"
}
```

- **account** ([LedgerAccount!](https://fragment.dev/markdown/api-reference/ledger-types.md#core-types-ledgeraccount))

  LedgerAccount that contains this line

- **accountId** ([ID!](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-id))

- **amount** ([Int96!](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-int96))

  How much this line's LedgerAccount's balance changed in integer cents (i.e. in USD 100 is 1 dollar, 100 cents)

  Arguments:

  - **absolute** ([Boolean](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-boolean))

    If the absolute flag is passed, amount will always a positive integer in cents. Refer to type to see if this LedgerLine increased or decreased it's LedgerAccount's balance

- **created** ([DateTime](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-datetime))

  ISO-8601 timestamp this LedgerLine was created in Fragment

- **currency** ([Currency](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-currency))

  Currency of this LedgerLine

- **date** ([Date](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-date))

  Date this LedgerLine posted to its LedgerAccount e.g. "2021-01-01"

- **description** ([String](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-string))

  Description of this LedgerLine

- **externalTransferId** ([String](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-string))

  ID in the external system of the payment or transfer that created the transaction linked to this LedgerLine

- **externalTransferType** ([ExternalTransferType](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-externaltransfertype))

  Whether the transaction linked to this LedgerLine was a payment or transfer

- **externalTxId** ([String](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-string))

  ID in the external system of the transaction linked to this LedgerLine

- **hidden** ([Boolean!](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-boolean))

  Indicates whether this Ledger Line is hidden when listing Ledger Lines. Reversed and Reversal Ledger Lines are hidden by default because taken together they have no impact on a Ledger Account's balance

- **id** ([ID!](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-id))

- **isReversal** ([Boolean!](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-boolean))

  Indicates whether this Ledger Line is a reversal of another Ledger Line. If so, reverses will point to that Ledger Line.

- **isReversed** ([Boolean!](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-boolean))

  Indicates whether this Ledger Line has been reversed by another Ledger Line. If so, reversedBy will point to that Ledger Line.

- **key** ([String](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-string))

- **ledger** ([Ledger!](https://fragment.dev/markdown/api-reference/ledger-types.md#core-types-ledger))

- **ledgerEntry** ([LedgerEntry!](https://fragment.dev/markdown/api-reference/ledger-types.md#core-types-ledgerentry))

  LedgerEntry that contains this line

- **ledgerEntryId** ([ID!](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-id))

  ID of the LedgerEntry that contains this line

- **ledgerId** ([ID!](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-id))

  Ledger that contains this line

- **otherTxExternalAccountExternalId** ([String](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-string))

  ID in the external system of destination or source bank account for an internal bank transfer. Only for internal bank transfers - see otherTxId

- **otherTxExternalAccountId** ([String](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-string))

  Fragment ID of destination or source bank account. Only for internal bank transfers - see otherTxId

- **otherTxExternalId** ([String](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-string))

  ID in the external system of transaction in the destination or source bank account. Only for internal bank transfers - see otherTxId

- **otherTxId** ([String](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-string))

  Fragment ID of the transaction in the destination account (if sending money from this account) or source account (if pulling money into this account). Only applicable if this line is linked to a transaction created through an internal transfer

- **posted** ([DateTime](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-datetime))

  ISO-8601 timestamp this LedgerLine posted to its LedgerAccount

- **reversedAt** ([DateTime](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-datetime))

  ISO-8601 timestamp of when this Ledger Line was reversed.

- **reversedBy** ([LedgerLine](https://fragment.dev/markdown/api-reference/ledger-types.md#core-types-ledgerline))

  The Ledger Line that reverses the balance changes of this Ledger Line.

- **reverses** ([LedgerLine](https://fragment.dev/markdown/api-reference/ledger-types.md#core-types-ledgerline))

  The Ledger Line whose balance changes are reversed by this Ledger Line.

- **tags** ([[LedgerLineTag!]!](https://fragment.dev/markdown/api-reference/ledger-types.md#utility-types-ledgerlinetag))

  Tags attached to this Ledger Line.

- **tx** ([Tx](https://fragment.dev/markdown/api-reference/ledger-types.md#core-types-tx))

  The transaction linked to this LedgerLine

- **txId** ([String](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-string))

  Fragment ID of the transaction linked to this LedgerLine

- **type** ([TxType!](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-txtype))

  credit or debit

- **workspaceId** ([ID!](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-id))

  Callers should not need to query or store this value.

<a id="core-types-ledgermigration"></a>

### LedgerMigration

Represents a Schema being applied to a Ledger. It contains metadata about the Ledger, the Schema, and the status of the migration.

```json
{
  "ledger": Ledger,
  "schemaVersion": SchemaVersion,
  "status": "completed"
}
```

- **ledger** ([Ledger!](https://fragment.dev/markdown/api-reference/ledger-types.md#core-types-ledger))

  The Ledger that the migration is run on.

- **schemaVersion** ([SchemaVersion!](https://fragment.dev/markdown/api-reference/ledger-types.md#utility-types-schemaversion))

- **status** ([LedgerMigrationStatus!](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-ledgermigrationstatus))

  The status of the Ledger Migration.

<a id="core-types-link"></a>

### Link

```json
{
  "created": "abc123",
  "dashboardUrl": "abc123",
  "externalAccounts": ExternalAccountsConnection,
  "id": "3116551f-5efc-4c9e-84ac-5a36a51b09c1",
  "name": "abc123"
}
```

- **created** ([String!](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-string))

  ISO-8601 timestamp when the Link was created.

- **dashboardUrl** ([String!](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-string))

  URL to the Fragment  Dashboard for this Link.

- **externalAccounts** ([ExternalAccountsConnection!](https://fragment.dev/markdown/api-reference/ledger-types.md#connection-types-externalaccountsconnection))

  A list of External Accounts associated with this Link.

- **id** ([ID!](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-id))

  Fragment ID of the Link.

- **name** ([String!](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-string))

  Name of the Link as it appears in the Dashboard.

<a id="core-types-payment"></a>

### Payment

A Payment posted to a Ledger.

```json
{
  "amount": "999999999999",
  "attempts": PaymentAttemptsConnection,
  "clientSecret": "abc123",
  "created": "2007-12-03T10:15:30Z",
  "currency": PaymentCurrency,
  "events": PaymentEventsConnection,
  "id": "3116551f-5efc-4c9e-84ac-5a36a51b09c1",
  "ik": "some-safe-string-ik",
  "ledger": Ledger,
  "mode": "production",
  "parameters": "{\"key\":\"value\"}",
  "status": "accepted",
  "type": "some-safe-string-ik",
  "typeVersion": 2277
}
```

- **amount** ([Int96!](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-int96))

  The amount of this Payment, in whole cents.

- **attempts** ([PaymentAttemptsConnection!](https://fragment.dev/markdown/api-reference/ledger-types.md#connection-types-paymentattemptsconnection))

  The Payment's attempts, newest first.

- **clientSecret** ([String!](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-string))

  The credential the payments SDK presents to `confirmPayment`.

- **created** ([DateTime!](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-datetime))

- **currency** ([PaymentCurrency!](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-paymentcurrency))

  The currency this Payment is denominated in.

- **events** ([PaymentEventsConnection!](https://fragment.dev/markdown/api-reference/ledger-types.md#connection-types-paymenteventsconnection))

  The log of events that have occurred on this Payment, most recent first.

- **id** ([ID!](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-id))

  The ID of this Payment.

- **ik** ([SafeString!](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-safestring))

  The [Idempotency Key](https://fragment.dev/markdown/api-reference/ledger-overview.md#idempotency) the Payment was created with.

- **ledger** ([Ledger!](https://fragment.dev/markdown/api-reference/ledger-types.md#core-types-ledger))

  The Ledger that this Payment belongs to.

- **mode** ([PaymentMode!](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-paymentmode))

  The mode of this Payment. Can be `sandbox` or `production`.

- **parameters** ([JSON!](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-json))

  Parameters the Payment was created with.

- **status** ([PaymentStatus!](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-paymentstatus))

  The status of this Payment.

- **type** ([SafeString!](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-safestring))

  The Payment Type in the Schema this Payment was created from.

- **typeVersion** ([Int!](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-int))

  The version of the Payment Type.

<a id="core-types-paymentmethodsetup"></a>

### PaymentMethodSetup

An attempt to save the Payment Method for a User.

```json
{
  "clientSecret": "abc123",
  "created": "2007-12-03T10:15:30Z",
  "currency": PaymentCurrency,
  "id": "3116551f-5efc-4c9e-84ac-5a36a51b09c1",
  "ik": "some-safe-string-ik",
  "mode": "production",
  "paymentMethod": PaymentMethod,
  "status": "canceled"
}
```

- **clientSecret** ([String!](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-string))

  The credential to provide to the `<PaymentMethodSetupSession>` component in the Fragment  Elements SDK.

- **created** ([DateTime!](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-datetime))

  When the Payment Method Setup was created.

- **currency** ([PaymentCurrency!](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-paymentcurrency))

  The currency the saved payment method will be charged in.

- **id** ([ID!](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-id))

  The Fragment  ID of this Payment Method Setup.

- **ik** ([SafeString!](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-safestring))

  The [Idempotency Key](https://fragment.dev/markdown/api-reference/ledger-overview.md#idempotency) the Payment Method Setup was created with.

- **mode** ([PaymentMode!](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-paymentmode))

  Whether this Payment Method Setup was created in sandbox or production.

- **paymentMethod** ([PaymentMethod](https://fragment.dev/markdown/api-reference/ledger-types.md#utility-types-paymentmethod))

  The Payment Method this setup saved, once its status is `saved`.

- **status** ([PaymentMethodSetupStatus!](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-paymentmethodsetupstatus))

  The status of this Payment Method Setup.

<a id="core-types-paymentrefund"></a>

### PaymentRefund

A refund issued against a Payment.

```json
{
  "amount": "999999999999",
  "created": "2007-12-03T10:15:30Z",
  "id": "3116551f-5efc-4c9e-84ac-5a36a51b09c1",
  "ik": "some-safe-string-ik",
  "status": "failed"
}
```

- **amount** ([Int96!](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-int96))

  The amount of this Payment Refund, in whole cents.

- **created** ([DateTime!](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-datetime))

  When this Payment Refund was created.

- **id** ([ID!](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-id))

  The ID of this Payment Refund.

- **ik** ([SafeString!](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-safestring))

  The [Idempotency Key](https://fragment.dev/markdown/api-reference/ledger-overview.md#idempotency) the Payment Refund was created with.

- **status** ([PaymentRefundStatus!](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-paymentrefundstatus))

  The status of this Payment Refund.

<a id="core-types-schema"></a>

### Schema

```json
{
  "key": "some-safe-string-ik",
  "ledgers": LedgersConnection,
  "name": "abc123",
  "version": SchemaVersion,
  "versions": SchemaVersionConnection
}
```

- **key** ([SafeString!](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-safestring))

  The identifier for a Schema. `key` is unique to a Workspace.

- **ledgers** ([LedgersConnection!](https://fragment.dev/markdown/api-reference/ledger-types.md#connection-types-ledgersconnection))

  The paginated list of ledgers the Schema has been applied to.

  Arguments:

  - **after** ([String](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-string))

    Where to start paginating from, when paginating forwards. Send endCursor from a response to get its next page. Learn more about [pagination](https://fragment.dev/markdown/guides/query-data.md#basics-pagination).

  - **before** ([String](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-string))

    Where to start paginating from, when paginating backwards. Send startCursor from a response to get the previous page. Learn more about [pagination](https://fragment.dev/markdown/guides/query-data.md#basics-pagination).

  - **first** ([Int](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-int))

    The number of Ledgers to return per page, when paginating forwards. Defaults to 20, maximum is 200.

  - **last** ([Int](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-int))

    The number of Ledgers to return per page, when paginating backwards. Defaults to 20, maximum is 200.

- **name** ([String!](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-string))

  The name of a Schema. It defaults to the `key` if not provided in your SchemaInput.

- **version** ([SchemaVersion!](https://fragment.dev/markdown/api-reference/ledger-types.md#utility-types-schemaversion))

  The metadata for a specific SchemaVersion.

  Arguments:

  - **version** ([Int](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-int))

    The version of the schema to retrieve. If this is not provided, the latest version will be returned.

- **versions** ([SchemaVersionConnection!](https://fragment.dev/markdown/api-reference/ledger-types.md#connection-types-schemaversionconnection))

  A paginated list of SchemaVersions.

  Arguments:

  - **after** ([String](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-string))

    Where to start paginating from, when paginating forwards. Send endCursor from a response to get its next page. Learn more about [pagination](https://fragment.dev/markdown/guides/query-data.md#basics-pagination).

  - **before** ([String](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-string))

    Where to start paginating from, when paginating backwards. Send startCursor from a response to get the previous page. Learn more about [pagination](https://fragment.dev/markdown/guides/query-data.md#basics-pagination).

  - **first** ([Int](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-int))

    The number of schema versions to return per page, when paginating forwards. Defaults to 20, maximum is 200.

  - **last** ([Int](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-int))

    The number of schema versions to return per page, when paginating backwards. Defaults to 20, maximum is 200.

<a id="core-types-tx"></a>

### Tx

```json
{
  "accountId": "3116551f-5efc-4c9e-84ac-5a36a51b09c1",
  "amount": "999999999999",
  "currency": Currency,
  "date": "2022-03-28",
  "deletedAt": "2007-12-03T10:15:30Z",
  "description": "abc123",
  "externalAccount": ExternalAccount,
  "externalAccountId": "3116551f-5efc-4c9e-84ac-5a36a51b09c1",
  "externalId": "3116551f-5efc-4c9e-84ac-5a36a51b09c1",
  "id": "3116551f-5efc-4c9e-84ac-5a36a51b09c1",
  "isDeleted": true,
  "ledgerEntries": LedgerEntriesConnection,
  "ledgerEntryIds": ["3116551f-5efc-4c9e-84ac-5a36a51b09c1"],
  "ledgerLineIds": ["3116551f-5efc-4c9e-84ac-5a36a51b09c1"],
  "ledgerLines": LedgerLinesConnection,
  "link": Link,
  "linkId": "3116551f-5efc-4c9e-84ac-5a36a51b09c1",
  "posted": "2007-12-03T10:15:30Z",
  "sequence": 2277,
  "workspaceId": "3116551f-5efc-4c9e-84ac-5a36a51b09c1"
}
```

- **accountId** ([ID!](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-id))

  Fragment ID of this transaction's external account

- **amount** ([Int96!](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-int96))

  Integer amount in cents. Positive indicates money entering the external account, negative indicates money leaving

- **currency** ([Currency](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-currency))

  Currency of this Tx

- **date** ([Date!](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-date))

  Date this Tx posted to the external account

- **deletedAt** ([DateTime](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-datetime))

  ISO-8601 timestamp when this Tx was deleted

- **description** ([String!](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-string))

  Description at the external account

- **externalAccount** ([ExternalAccount!](https://fragment.dev/markdown/api-reference/ledger-types.md#core-types-externalaccount))

  The External Account that this transaction belongs to.

- **externalAccountId** ([ID!](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-id))

  ID in the external system of this transaction's external account

- **externalId** ([ID!](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-id))

  ID of this transaction in the external system

- **id** ([ID!](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-id))

  Fragment ID of this Tx. If you delete a Tx via deleteCustomTxs, it will not show up in listing queries, but can be resolved by if you lookup by its Fragment  ID. If you resync a Tx with the same externalId, its Fragment  ID will be different than the previous Tx.

- **isDeleted** ([Boolean!](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-boolean))

  Whether this Tx has been deleted via deleteCustomTxs

- **ledgerEntries** ([LedgerEntriesConnection!](https://fragment.dev/markdown/api-reference/ledger-types.md#connection-types-ledgerentriesconnection))

  Returns ledger entries that are linked to this transaction. You can link the same external account to multiple ledgers, so there could be multiple entries associated with one transaction - one for each linked ledger account this transaction has been reconciled with

- **ledgerEntryIds** ([[ID!]](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-id))

  Same as ledgerEntries, but returns an array of IDs instead

- **ledgerLineIds** ([[ID!]](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-id))

  Same as ledgerLines, but returns an array of IDs instead

- **ledgerLines** ([LedgerLinesConnection!](https://fragment.dev/markdown/api-reference/ledger-types.md#connection-types-ledgerlinesconnection))

  Returns ledger lines that are linked to this transaction. You can link the same external account to multiple ledgers, so there could be multipe lines associated with one transaction - one for each linked ledger account this transaction has been reconciled with

- **link** ([Link!](https://fragment.dev/markdown/api-reference/ledger-types.md#core-types-link))

  This transaction's Link.

- **linkId** ([ID!](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-id))

  Fragment ID of this transaction's Link

- **posted** ([DateTime!](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-datetime))

  ISO-8601 timestamp when this Tx posted to the external account

- **sequence** ([Int!](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-int))

  When a Tx is deleted and a new Tx is synced with the same externalId, its sequence will be higher than the previous Tx. You can use this to distinguish different instances of Txs that have the same externalId.

- **workspaceId** ([ID!](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-id))

  Callers should not need to query or store this value.

<a id="core-types-user"></a>

### User

A User who pays through a Ledger.

```json
{"email": "abc123"}
```

- **email** ([String!](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-string))

  The User's email address.

<a id="core-types-workspace"></a>

### Workspace

```json
{"id": "abc123", "name": "abc123"}
```

- **id** ([String!](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-string))

  The ID of the Workspace

- **name** ([String!](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-string))

  The name of the Workspace

<a id="scalars-and-enums"></a>

## Scalars and Enums

<a id="scalars-and-enums-balancechangeduring"></a>

### BalanceChangeDuring

A single amount and the timestamp requested

```json
{"amount": CurrencyAmount, "period": "2022-Q3"}
```

- **amount** ([CurrencyAmount!](https://fragment.dev/markdown/api-reference/ledger-types.md#utility-types-currencyamount))

  The balance or balance change

- **period** ([Period!](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-period))

  The period of the requested balance change

<a id="scalars-and-enums-balanceupdateconsistencymode"></a>

### BalanceUpdateConsistencyMode

Used to configure the write-consistency of a Ledger Account's balance. See [Configure consistency](https://fragment.dev/markdown/guides/configure-consistency.md).

```json
"eventual"
```

- **eventual** ()

- **strong** ()

<a id="scalars-and-enums-boolean"></a>

### Boolean

The Boolean scalar type represents true or false.

```json
true
```

<a id="scalars-and-enums-currency"></a>

### Currency

```json
{
  "code": "AAVE",
  "customCode": "abc123",
  "customCurrencyId": "some-safe-string-ik",
  "name": "abc123",
  "precision": 2277
}
```

- **code** ([CurrencyCode!](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-currencycode))

  The currency code. This is an [enum type](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-currencycode).

- **customCode** ([String](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-string))

  The currency code for custom currencies. This is only set if 'currency' is set to CUSTOM. It can be up to 36 characters long.

- **customCurrencyId** ([SafeString](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-safestring))

  The ID for a custom currency. This is specified when creating the custom currency using the [createCustomCurrency](https://fragment.dev/markdown/api-reference/ledger-mutations.md#createcustomcurrency) mutation.

- **name** ([String!](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-string))

  A human readable name for the currency (e.g. United States Dollar). This is used for display purposes.

- **precision** ([Int!](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-int))

  The number of decimal places this currency goes to. For example, United States Dollars have a precision of 2 (i.e. 100 cents in a dollar), whereas the Jordanian Dinar has a precision of 3. This is used for display purposes.

<a id="scalars-and-enums-currencycode"></a>

### CurrencyCode

```json
"AAVE"
```

- **AAVE** ()

- **ADA** ()

- **AED** ()

- **AFN** ()

- **ALL** ()

- **AMD** ()

- **ANG** ()

- **AOA** ()

- **ARS** ()

- **AUD** ()

- **AWG** ()

- **AZN** ()

- **BAM** ()

- **BBD** ()

- **BCH** ()

- **BDT** ()

- **BGN** ()

- **BHD** ()

- **BIF** ()

- **BMD** ()

- **BND** ()

- **BOB** ()

- **BRL** ()

- **BSD** ()

- **BTC** ()

- **BTN** ()

- **BWP** ()

- **BYR** ()

- **BZD** ()

- **CAD** ()

- **CADC** ()

- **CADT** ()

- **CDF** ()

- **CHF** ()

- **CLP** ()

- **CNY** ()

- **COP** ()

- **CRC** ()

- **CUC** ()

- **CUP** ()

- **CUSTOM** ()

- **CVE** ()

- **CZK** ()

- **DAI** ()

- **DJF** ()

- **DKK** ()

- **DOP** ()

- **DZD** ()

- **EGP** ()

- **ERN** ()

- **ETB** ()

- **ETH** ()

- **EUR** ()

- **EURC** ()

- **FJD** ()

- **FKP** ()

- **GBP** ()

- **GEL** ()

- **GGP** ()

- **GHS** ()

- **GIP** ()

- **GMD** ()

- **GNF** ()

- **GTQ** ()

- **GYD** ()

- **HKD** ()

- **HNL** ()

- **HRK** ()

- **HTG** ()

- **HUF** ()

- **IDR** ()

- **ILS** ()

- **IMP** ()

- **INR** ()

- **IQD** ()

- **IRR** ()

- **ISK** ()

- **JMD** ()

- **JOD** ()

- **JPY** ()

- **KES** ()

- **KGS** ()

- **KHR** ()

- **KMF** ()

- **KPW** ()

- **KRW** ()

- **KWD** ()

- **KYD** ()

- **KZT** ()

- **LAK** ()

- **LBP** ()

- **LINK** ()

- **LKR** ()

- **LOGICAL** ()

- **LRD** ()

- **LSL** ()

- **LTC** ()

- **LYD** ()

- **MAD** ()

- **MATIC** ()

- **MDL** ()

- **MGA** ()

- **MKD** ()

- **MMK** ()

- **MNT** ()

- **MOP** ()

- **MUR** ()

- **MVR** ()

- **MWK** ()

- **MXN** ()

- **MYR** ()

- **MZN** ()

- **NAD** ()

- **NGN** ()

- **NIO** ()

- **NOK** ()

- **NPR** ()

- **NZD** ()

- **OMR** ()

- **PAB** ()

- **PEN** ()

- **PGK** ()

- **PHP** ()

- **PKR** ()

- **PLN** ()

- **PTS** ()

- **PYG** ()

- **QAR** ()

- **RON** ()

- **RSD** ()

- **RUB** ()

- **RWF** ()

- **SAR** ()

- **SBD** ()

- **SCR** ()

- **SDG** ()

- **SEK** ()

- **SGD** ()

- **SHP** ()

- **SLE** ()

- **SLL** ()

- **SOL** ()

- **SOS** ()

- **SPL** ()

- **SRD** ()

- **STN** ()

- **SVC** ()

- **SYP** ()

- **SZL** ()

- **THB** ()

- **TJS** ()

- **TMT** ()

- **TND** ()

- **TOP** ()

- **TRY** ()

- **TTD** ()

- **TVD** ()

- **TWD** ()

- **TZS** ()

- **UAH** ()

- **UGX** ()

- **UNI** ()

- **USD** ()

- **USDC** ()

- **USDG** ()

- **USDT** ()

- **UYU** ()

- **UZS** ()

- **VEF** ()

- **VND** ()

- **VUV** ()

- **WST** ()

- **XAF** ()

- **XCD** ()

- **XLM** ()

- **XOF** ()

- **XPF** ()

- **YER** ()

- **ZAR** ()

- **ZMW** ()

<a id="scalars-and-enums-currencymode"></a>

### CurrencyMode

Defines the currency handling of a LedgerAccount, which can either be restricted to a single currency or allow multiple currencies.

```json
"multi"
```

- **multi** ()

- **single** ()

<a id="scalars-and-enums-date"></a>

### Date

ISO 8601 Date e.g. 1969-07-21

```json
"2022-03-28"
```

<a id="scalars-and-enums-datetime"></a>

### DateTime

ISO 8601 DateTime e.g. 1969-07-16T13:32:00.000Z. You can also provide a date e.g. 1969-01-01 and it will be converted to 1969-01-01T00:00:00.000Z

```json
"2007-12-03T10:15:30Z"
```

<a id="scalars-and-enums-externaltransfertype"></a>

### ExternalTransferType

```json
"ach"
```

- **ach** ()

- **card** ()

- **check** ()

- **internal** ()

- **wire** ()

<a id="scalars-and-enums-firstmoment"></a>

### FirstMoment

The first moment of a specific year, month or day or hour e.g. 1969 or 1969-1 or 1969-1-1 or 1969-1-1T00. All of the previous examples are equivalent to 1969-1-1T00:00:00.000.

```json
"2021-05"
```

<a id="scalars-and-enums-granularity"></a>

### Granularity

```json
"daily"
```

- **daily** ()

- **hourly** ()

- **monthly** ()

<a id="scalars-and-enums-historicalbalance"></a>

### HistoricalBalance

A single amount and the timestamp requested

```json
{"amount": CurrencyAmount, "at": "2021-07"}
```

- **amount** ([CurrencyAmount!](https://fragment.dev/markdown/api-reference/ledger-types.md#utility-types-currencyamount))

  The balance or balance change

- **at** ([LastMoment!](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-lastmoment))

  The timestamp of the requested balance

<a id="scalars-and-enums-id"></a>

### ID

The ID scalar type represents a unique identifier, often used to refetch an object or as key for a cache. The ID type appears in a JSON response as a String; however, it is not intended to be human-readable. When expected as an input type, any string (such as "4") or integer (such as 4) input value will be accepted as an ID.

```json
"3116551f-5efc-4c9e-84ac-5a36a51b09c1"
```

<a id="scalars-and-enums-ikreplay"></a>

### IkReplay

```json
{"ik": "some-safe-string-ik", "isIkReplay": true}
```

- **ik** ([SafeString!](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-safestring))

- **isIkReplay** ([Boolean!](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-boolean))

<a id="scalars-and-enums-int"></a>

### Int

The Int scalar type represents non-fractional signed whole numeric values. Int can represent values between -(2^31) and 2^31 - 1.

```json
2277
```

<a id="scalars-and-enums-int96"></a>

### Int96

A string representing integers as big as 2^120-1. The number is signed so the range is from -1,329,227,995,784,915,872,903,807,060,280,344,575 to 1,329,227,995,784,915,872,903,807,060,280,344,575.

```json
"999999999999"
```

<a id="scalars-and-enums-json"></a>

### JSON

The JSON scalar type represents JSON values as specified by [ECMA-404](http://www.ecma-international.org/publications/files/ECMA-ST/ECMA-404.pdf).

```json
"{"key":"value"}"
```

<a id="scalars-and-enums-lastmoment"></a>

### LastMoment

The last moment of a specific year, month or day or hour e.g. 1969 or 1969-12 or 1969-12-31 or 1969-12-31T23. All of the previous examples are equivalent to 1969-12-31T23:59:59.999.

```json
"2021-07"
```

<a id="scalars-and-enums-ledgeraccountclearingstatus"></a>

### LedgerAccountClearingStatus

The clearing status of a Ledger Account.

```json
"cleared"
```

- **cleared** ()

  The account has no outstanding balances.

- **pending** ()

  The account has outstanding balances that have not been cleared.

<a id="scalars-and-enums-ledgerdatamigrationstatus"></a>

### LedgerDataMigrationStatus

The status of a ledger data migration.

```json
"active"
```

- **active** ()

  The migration is active.

- **inactive** ()

  The migration is inactive.

<a id="scalars-and-enums-ledgerlinesconsistencymode"></a>

### LedgerLinesConsistencyMode

```json
"eventual"
```

- **eventual** ()

- **strong** ()

<a id="scalars-and-enums-ledgermigrationstatus"></a>

### LedgerMigrationStatus

The status of a ledger migration.

```json
"completed"
```

- **completed** ()

  The Ledger Migration has been successfully completed. This is a terminal state.

- **failed** ()

  The Ledger Migration has failed. This can happen either due to an invalid schema or an internal error. This is a terminal state.

- **queued** ()

  The Ledger Migration has been queued.

- **skipped** ()

  The Ledger Migration has been skipped because a newer version is available. This is a terminal state.

- **started** ()

  The Ledger Migration has been started.

<a id="scalars-and-enums-ledgertypes"></a>

### LedgerTypes

```json
"double"
```

- **double** ()

<a id="scalars-and-enums-linktype"></a>

### LinkType

The type of Link an external account belongs to.

```json
"CustomLink"
```

- **CustomLink** ()

  A Custom Link

- **IncreaseLink** ()

  An Increase Link

- **StripeLink** ()

  A Stripe Link

- **UnitLink** ()

  A Unit Link

<a id="scalars-and-enums-parameterizedstring"></a>

### ParameterizedString

A string of non-zero length that can contain parameterized values via handlebars syntax. ex: "Hello from \{\{country\}\}".

```json
"assets/bank:\{\{bank_name\}\}"
```

<a id="scalars-and-enums-parameters"></a>

### Parameters

A mapping of parameter keys to values.

```json
{"bank_name": "bank-name", "deposit_amount": "10000"}
```

<a id="scalars-and-enums-paymentattemptstatus"></a>

### PaymentAttemptStatus

Status of a Payment attempt.

```json
"failed"
```

- **failed** ()

- **processing** ()

- **succeeded** ()

<a id="scalars-and-enums-paymentcurrency"></a>

### PaymentCurrency

The currency a Payment is denominated in.

```json
{"code": "USD", "name": "abc123", "precision": 2277}
```

- **code** ([PaymentCurrencyCode!](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-paymentcurrencycode))

  The currency code.

- **name** ([String!](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-string))

  A human readable name for the currency (e.g. United States Dollar). This is used for display purposes.

- **precision** ([Int!](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-int))

  The number of decimal places this currency goes to. For example, United States Dollars have a precision of 2 (i.e. 100 cents in a dollar), whereas the Jordanian Dinar has a precision of 3. This is used for display purposes.

<a id="scalars-and-enums-paymentcurrencycode"></a>

### PaymentCurrencyCode

The currencies a Payment can be denominated in.

```json
"USD"
```

- **USD** ()

<a id="scalars-and-enums-paymentmethodsetupstatus"></a>

### PaymentMethodSetupStatus

Status of a Payment Method Setup.

```json
"canceled"
```

- **canceled** ()

- **needs_action** ()

- **needs_payment_method** ()

- **processing** ()

- **saved** ()

<a id="scalars-and-enums-paymentmode"></a>

### PaymentMode

Mode of a Payment.

```json
"production"
```

- **production** ()

- **sandbox** ()

<a id="scalars-and-enums-paymentrefundstatus"></a>

### PaymentRefundStatus

Status of a Payment refund.

```json
"failed"
```

- **failed** ()

- **processing** ()

- **settled** ()

<a id="scalars-and-enums-paymentstatus"></a>

### PaymentStatus

Status of a Payment.

```json
"accepted"
```

- **accepted** ()

- **needs_payment_method** ()

- **processing** ()

- **settled** ()

<a id="scalars-and-enums-period"></a>

### Period

A specific year ("2021"), quarter ("2021-Q1"), month ("2021-02"), day ("2021-02-03") or hour ("2021-02-03T04")

```json
"2022-Q3"
```

<a id="scalars-and-enums-postlinesas"></a>

### PostLinesAs

Controls how lines are posted for a Ledger Entry. New entries created via the dashboard default to net_amounts. Existing entries without this field set are treated as raw_lines.

```json
"net_amounts"
```

- **net_amounts** ()

  Lines targeting the same account, currency, and tx are aggregated into a single line with the net amount. Lines that sum to zero are skipped. If all lines sum to zero, no lines are skipped.

- **raw_lines** ()

  Lines are posted as-is without aggregation.

- **skip_zero_lines** ()

  Lines with a zero amount are skipped, but lines are not aggregated. If all lines have a zero amount, no lines are skipped.

<a id="scalars-and-enums-readbalanceconsistencymode"></a>

### ReadBalanceConsistencyMode

The consistency configuration of a Ledger Account's balance queries. If not provided as an argument to a balance query, the default behavior is to read eventually consistent balances. See [Configure consistency](https://fragment.dev/markdown/guides/configure-consistency.md).

```json
"eventual"
```

- **eventual** ()

  Balance queries will read eventually consistent balances. This is the default behavior if `ReadBalanceConsistencyMode` is not provided as an argument to the balance field. Both Ledger Accounts configured with strongly and eventually consistent balance updates support this enum.

- **strong** ()

  Balance queries will read strongly consistent balances. This is only allowed if the Ledger Account's `ownBalanceUpdates` in its `consistencyConfig` is `strong`.

- **use_account** ()

  Balance queries will use the value from the Ledger Account's `ownBalanceUpdates` in its `consistencyConfig`.

<a id="scalars-and-enums-safestring"></a>

### SafeString

A string with delimiter characters /, #, and : disallowed, as well as parameters in \{\{handlebar\}\} syntax.

```json
"some-safe-string-ik"
```

<a id="scalars-and-enums-sceneeventtype"></a>

### SceneEventType

The kind of thing a Scene Event simulates.

```json
"entry"
```

- **entry** ()

  A simulated Ledger Entry.

- **payment** ()

  One lifecycle transition of a simulated Payment.

<a id="scalars-and-enums-schemaconsistencymode"></a>

### SchemaConsistencyMode

The consistency modes available for entities created within this Schema.

```json
"eventual"
```

- **eventual** ()

  Eventually consistent entity updates

- **strong** ()

  Strongly consistent entity updates

<a id="scalars-and-enums-schemaledgeraccountstatus"></a>

### SchemaLedgerAccountStatus

The status of a Ledger Account.

```json
"active"
```

- **active** ()

  The Ledger Account is active.

- **archived** ()

  The Ledger Account is archived.

- **disabled** ()

  The Ledger Account is disabled.

<a id="scalars-and-enums-schemaledgerentrystatus"></a>

### SchemaLedgerEntryStatus

The status of a Ledger Entry.

```json
"active"
```

- **active** ()

  The Ledger Entry is active.

- **archived** ()

  The Ledger Entry is archived.

- **disabled** ()

  The Ledger Entry is disabled.

<a id="scalars-and-enums-schemapaymentaccountingeventkey"></a>

### SchemaPaymentAccountingEventKey

A lifecycle transition of a Payment.

```json
"initiated"
```

- **initiated** ()

  The payment was captured and is guaranteed to settle.

- **refund_failed** ()

  EXPERIMENTAL: An initiated refund failed.

- **refund_initiated** ()

  EXPERIMENTAL: A refund of the settled payment is initiated.

- **settled** ()

  The payment settled.

<a id="scalars-and-enums-schemapaymenttypedirection"></a>

### SchemaPaymentTypeDirection

The direction a Payment Type moves money.

```json
"payin"
```

- **payin** ()

  Money moves into the Payment Account.

- **payout** ()

  Money moves out of the Payment Account.

<a id="scalars-and-enums-schemapaymenttypestatus"></a>

### SchemaPaymentTypeStatus

The status of a Payment Type.

```json
"active"
```

- **active** ()

  The Payment Type is active.

<a id="scalars-and-enums-schemasystemlinekind"></a>

### SchemaSystemLineKind

Identifies a system-owned line in a payment entry. The amounts of system lines are filled by Fragment  when the payment entry is posted.

```json
"payment_fee_line"
```

- **payment_fee_line** ()

  The line carrying the Fragment  fee amount, posted to the Payment Account.

- **payment_refund_line** ()

  The line removing the refund amount from the Payment Account when a Refund is initiated.

- **payment_refund_reversal_line** ()

  The line restoring the refund amount to the Payment Account when a Refund fails.

- **payment_settlement_line** ()

  The line carrying the settled payment amount, posted to the Payment Account.

<a id="scalars-and-enums-string"></a>

### String

The String scalar type represents textual data, represented as UTF-8 character sequences. The String type is most often used by GraphQL to represent free-form human-readable text.

```json
"abc123"
```

<a id="scalars-and-enums-txtype"></a>

### TxType

```json
"credit"
```

- **credit** ()

- **debit** ()

<a id="scalars-and-enums-utcoffset"></a>

### UTCOffset

All hour-aligned offsets from -11:00 to +12:00 are supported, e.g. "-08:00" (PT), "-05:00" (ET), "+00:00" (UTC)

```json
"-08:00"
```

<a id="input-types"></a>

## Input Types

<a id="input-types-addledgerentryinput"></a>

### AddLedgerEntryInput

```json
{"entry": LedgerEntryInput, "ik": "some-safe-string-ik"}
```

- **entry** ([LedgerEntryInput!](https://fragment.dev/markdown/api-reference/ledger-types.md#input-types-ledgerentryinput))

  The [Ledger Entry](https://fragment.dev/markdown/api-reference/ledger-types.md#input-types-ledgerentryinput) to add

- **ik** ([SafeString!](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-safestring))

  The [Idempotency Key](https://fragment.dev/markdown/api-reference/ledger-overview.md#idempotency) for this Ledger Entry

<a id="input-types-agingclearingaccountsinput"></a>

### AgingClearingAccountsInput

Selection of pending clearing accounts to count.

```json
{"filter": AgingClearingAccountsFilterSet}
```

- **filter** ([AgingClearingAccountsFilterSet](https://fragment.dev/markdown/api-reference/ledger-types.md#filter-types-agingclearingaccountsfilterset))

  Additional account filters.

<a id="input-types-agingunreconciledtxsinput"></a>

### AgingUnreconciledTxsInput

Selection of unreconciled transactions to count.

```json
{
  "filter": LedgerUnreconciledTxsFilterSet,
  "links": [LinkMatchInput]
}
```

- **filter** ([LedgerUnreconciledTxsFilterSet](https://fragment.dev/markdown/api-reference/ledger-types.md#filter-types-ledgerunreconciledtxsfilterset))

  Additional posted-time bounds intersected with each interval.

- **links** ([[LinkMatchInput!]!](https://fragment.dev/markdown/api-reference/ledger-types.md#matchinput-types-linkmatchinput))

  Links identified by Fragment  ID or Custom Link creation IK. Provide between 1 and 100 selectors; duplicates are searched once.

<a id="input-types-chartofaccountsinput"></a>

### ChartOfAccountsInput

The input for your Chart of Accounts in a Schema.

```json
{
  "accounts": [SchemaLedgerAccountInput],
  "defaultConsistencyConfig": LedgerAccountConsistencyConfigInput,
  "defaultCurrency": CurrencyMatchInput,
  "defaultCurrencyMode": "multi"
}
```

- **accounts** ([[SchemaLedgerAccountInput!]!](https://fragment.dev/markdown/api-reference/ledger-types.md#input-types-schemaledgeraccountinput))

  The Ledger Accounts modeled by your Schema. Ledger Accounts may be nested up to a maximum depth of 10.

- **defaultConsistencyConfig** ([LedgerAccountConsistencyConfigInput](https://fragment.dev/markdown/api-reference/ledger-types.md#input-types-ledgeraccountconsistencyconfiginput))

  The default consistency configuration for all Ledger Accounts in this Schema. If a Ledger Account does not specify its own consistency configuration, it will use the default values provided here. See [Configure consistency](https://fragment.dev/markdown/guides/configure-consistency.md).

- **defaultCurrency** ([CurrencyMatchInput](https://fragment.dev/markdown/api-reference/ledger-types.md#matchinput-types-currencymatchinput))

  The default currency of each Ledger Account in the Chart Of Accounts. It must be provided if `defaultCurrencyMode` is set to `single`. Additionally, `defaultCurrency` must be omitted if `defaultCurrencyMode` is set to `multi`.

- **defaultCurrencyMode** ([CurrencyMode](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-currencymode))

  The default currency mode of each Ledger Account in the Chart Of Accounts.

<a id="input-types-createcustomcurrencyinput"></a>

### CreateCustomCurrencyInput

```json
{
  "customCode": "abc123",
  "customCurrencyId": "some-safe-string-ik",
  "name": "abc123",
  "precision": 2277
}
```

- **customCode** ([String!](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-string))

  The currency code for custom currencies. It can be up to 36 characters long. This is used for display purposes.

- **customCurrencyId** ([SafeString!](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-safestring))

  The ID for a custom currency. This is specified when creating the custom currency using the [createCustomCurrency](https://fragment.dev/markdown/api-reference/ledger-mutations.md#createcustomcurrency) mutation. It can be up to 36 characters long.

- **name** ([String!](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-string))

  A human readable name for the currency (e.g. United States Dollar). This is used for display purposes.

- **precision** ([Int!](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-int))

  The number of decimal places this currency goes to. For example, United States Dollars have a precision of 2 (i.e. 100 cents in a dollar), whereas the Jordanian Dinar has a precision of 3. This is used for display purposes.

<a id="input-types-createledgeraccountinput"></a>

### CreateLedgerAccountInput

```json
{
  "consistencyConfig": LedgerAccountConsistencyConfigInput,
  "currency": CurrencyMatchInput,
  "currencyMode": "multi",
  "linkedAccount": ExternalAccountMatchInput,
  "name": "abc123",
  "parent": LedgerAccountMatchInput,
  "type": "asset"
}
```

- **consistencyConfig** ([LedgerAccountConsistencyConfigInput](https://fragment.dev/markdown/api-reference/ledger-types.md#input-types-ledgeraccountconsistencyconfiginput))

  The consistency configuration for this Ledger Account. This defines how updates to this Ledger Account's balance are handled.

- **currency** ([CurrencyMatchInput](https://fragment.dev/markdown/api-reference/ledger-types.md#matchinput-types-currencymatchinput))

  The currency of this Ledger Account. If this is not set, and `currencyMode` is not set to `multi`, the workspace-level default is used.

- **currencyMode** ([CurrencyMode](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-currencymode))

  If set to `multi`, creates a multi-currency Ledger Account. If set to `single`, creates a single-currency Ledger Account.

- **linkedAccount** ([ExternalAccountMatchInput](https://fragment.dev/markdown/api-reference/ledger-types.md#matchinput-types-externalaccountmatchinput))

  The External Account to link to this Ledger Account.

- **name** ([String!](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-string))

  The human-readable name of this Ledger Account.

- **parent** ([LedgerAccountMatchInput](https://fragment.dev/markdown/api-reference/ledger-types.md#matchinput-types-ledgeraccountmatchinput))

  The parent of this Ledger Account.

- **type** ([LedgerAccountTypes](https://fragment.dev/markdown/api-reference/ledger-types.md#utility-types-ledgeraccounttypes))

  The type of ledger account to create. Required if this is a top-level Ledger Account. If not provided, the type will be inferred from the parent.

<a id="input-types-createledgeraccountsinput"></a>

### CreateLedgerAccountsInput

```json
{
  "childLedgerAccounts": [CreateLedgerAccountsInput],
  "consistencyConfig": LedgerAccountConsistencyConfigInput,
  "currency": CurrencyMatchInput,
  "currencyMode": "multi",
  "ik": "some-safe-string-ik",
  "linkedAccount": ExternalAccountMatchInput,
  "name": "abc123",
  "parent": LedgerAccountMatchInput,
  "type": "asset"
}
```

- **childLedgerAccounts** ([[CreateLedgerAccountsInput!]](https://fragment.dev/markdown/api-reference/ledger-types.md#input-types-createledgeraccountsinput))

  Ledger Accounts to create as children of this Ledger Account.

- **consistencyConfig** ([LedgerAccountConsistencyConfigInput](https://fragment.dev/markdown/api-reference/ledger-types.md#input-types-ledgeraccountconsistencyconfiginput))

  The consistency configuration for this ledger account. See [Configure consistency](https://fragment.dev/markdown/guides/configure-consistency.md).

- **currency** ([CurrencyMatchInput](https://fragment.dev/markdown/api-reference/ledger-types.md#matchinput-types-currencymatchinput))

  The currency of this Ledger Account. If this is not set, the workspace level default is used.

- **currencyMode** ([CurrencyMode](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-currencymode))

  The currency mode of this Ledger Account. If this is not set, the workspace level default is used.

- **ik** ([SafeString!](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-safestring))

  The idempotency key for creating this Ledger Account.

- **linkedAccount** ([ExternalAccountMatchInput](https://fragment.dev/markdown/api-reference/ledger-types.md#matchinput-types-externalaccountmatchinput))

  The External Account to link to this Ledger Account. This can only be specified on leaf Ledger Accounts. See [Reconcile payments](https://fragment.dev/markdown/guides/reconcile-payments.md).

- **name** ([String!](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-string))

  The name of the Ledger Account.

- **parent** ([LedgerAccountMatchInput](https://fragment.dev/markdown/api-reference/ledger-types.md#matchinput-types-ledgeraccountmatchinput))

  The parent of this Ledger Account. This is only valid on the top level Ledger Account in the payload.

- **type** ([LedgerAccountTypes](https://fragment.dev/markdown/api-reference/ledger-types.md#utility-types-ledgeraccounttypes))

  The type of this Ledger Account. This field is only required if this is a root Ledger Account. Otherwise, the type will get inherited from its parent.

<a id="input-types-createledgerinput"></a>

### CreateLedgerInput

```json
{"balanceUTCOffset": "-08:00", "name": "abc123", "type": "double"}
```

- **balanceUTCOffset** ([UTCOffset](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-utcoffset))

  Use this field to specify a timezone for queries to your Ledger. When aggregating balances, all transactions within a 24 hour period starting at midnight UTC are included in each day. You can specify a different starting hour for balances. For example, use "-08:00" to align balances with Pacific Standard Time. Balance queries would then consider the start of each local day to be at 8am UTC the next day in UTC. The default timezone is UTC.

- **name** ([String!](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-string))

- **type** ([LedgerTypes](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-ledgertypes))

<a id="input-types-createpaymentinput"></a>

### CreatePaymentInput

The Payment to create.

```json
{
  "parameters": "{\"key\":\"value\"}",
  "paymentMethod": PaymentMethodMatchInput,
  "type": "some-safe-string-ik",
  "typeVersion": 2277
}
```

- **parameters** ([JSON](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-json))

  Parameters for the specific Payment Type. Must be a key-value pair of strings. Must be a flat object: nested objects and arrays are rejected.

- **paymentMethod** ([PaymentMethodMatchInput](https://fragment.dev/markdown/api-reference/ledger-types.md#matchinput-types-paymentmethodmatchinput))

  The saved Payment Method to charge for this Payment. When set, the Payment is charged immediately.

- **type** ([SafeString!](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-safestring))

  The type of the Payment. Must be defined in the Schema linked to the Ledger.

- **typeVersion** ([Int!](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-int))

  The version of the Payment Type.

<a id="input-types-customaccountinput"></a>

### CustomAccountInput

```json
{
  "currency": CurrencyMatchInput,
  "currencyMode": "multi",
  "externalId": "some-safe-string-ik",
  "name": "abc123"
}
```

- **currency** ([CurrencyMatchInput](https://fragment.dev/markdown/api-reference/ledger-types.md#matchinput-types-currencymatchinput))

  The currency of this external account. If this is not set, the workspace level default is used. 'currency' cannot be set if 'currencyMode' is 'multi'.

- **currencyMode** ([CurrencyMode](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-currencymode))

  The currency mode of this external account. If set to multi, creates a multi-currency account.

- **externalId** ([SafeString!](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-safestring))

  The ID of this account at the external system. This is used as the idempotency key, within the scope of its Custom Link.

- **name** ([String!](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-string))

  The name of the account at the external system.

<a id="input-types-customtxinput"></a>

### CustomTxInput

```json
{
  "account": ExternalAccountMatchInput,
  "amount": "999999999999",
  "currency": CurrencyMatchInput,
  "description": "abc123",
  "externalId": "some-safe-string-ik",
  "posted": "2007-12-03T10:15:30Z"
}
```

- **account** ([ExternalAccountMatchInput!](https://fragment.dev/markdown/api-reference/ledger-types.md#matchinput-types-externalaccountmatchinput))

- **amount** ([Int96!](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-int96))

- **currency** ([CurrencyMatchInput](https://fragment.dev/markdown/api-reference/ledger-types.md#matchinput-types-currencymatchinput))

  The currency of this tx. Should be set for multi-currency accounts.

- **description** ([String!](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-string))

- **externalId** ([SafeString!](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-safestring))

  The ID of this tx at the external system. This is used as the idempotency key, within the scope of its Custom Account.

- **posted** ([DateTime!](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-datetime))

<a id="input-types-groupinput"></a>

### GroupInput

A Group in a Schema. Group define sequences of Ledger Entries and can help with reconciliation tasks.

```json
{
  "description": "assets/bank:\{\{bank_name\}\}",
  "key": "some-safe-string-ik",
  "reconciliation": GroupReconciliationParametersInput
}
```

- **description** ([ParameterizedString](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-parameterizedstring))

  Human-readable description of the Group.

- **key** ([SafeString!](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-safestring))

  The key of this Group. This combined with its value is a stable, unique identifier for this group.

- **reconciliation** ([GroupReconciliationParametersInput](https://fragment.dev/markdown/api-reference/ledger-types.md#input-types-groupreconciliationparametersinput))

  The parameters that are used to enable reconciliation abilities in a group.

<a id="input-types-groupreconciliationparametersinput"></a>

### GroupReconciliationParametersInput

A set of parameters that are used to enable reconciliation abilities in a group

```json
{"clearingAccountPath": SchemaLedgerAccountMatchInput}
```

- **clearingAccountPath** ([SchemaLedgerAccountMatchInput!](https://fragment.dev/markdown/api-reference/ledger-types.md#matchinput-types-schemaledgeraccountmatchinput))

  The path to the clearing account for this group. A clearing account is an account that is used to indicate funds that are in transit. Also called a suspense account, pending account, or zero balance account.

<a id="input-types-int96conditioninput"></a>

### Int96ConditionInput

A condition that must be met on an Int96 field.

```json
{"eq": "999999999999", "gte": "999999999999", "lte": "999999999999"}
```

- **eq** ([Int96](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-int96))

  Amount must exactly match this value. You may not specify this alongside `gte` or `lte`.

- **gte** ([Int96](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-int96))

  Amount must be greater than or equal to this value.

- **lte** ([Int96](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-int96))

  Amount must be less than or equal to this value.

<a id="input-types-ledgeraccountconditioninput"></a>

### LedgerAccountConditionInput

A set of conditions that a Ledger Account must meet for an operation to succeed.

```json
{
  "ownBalance": Int96ConditionInput,
  "totalBalance": Int96ConditionInput
}
```

- **ownBalance** ([Int96ConditionInput](https://fragment.dev/markdown/api-reference/ledger-types.md#input-types-int96conditioninput))

  A condition that the ownBalance field must satisfy. Note that this condition always applies to the latest balance, not to balances at a specific date or time. See [Read balances](https://fragment.dev/markdown/guides/read-balances.md) for more on the different types of Ledger Account balances.

- **totalBalance** ([Int96ConditionInput](https://fragment.dev/markdown/api-reference/ledger-types.md#input-types-int96conditioninput))

  A condition that the totalBalance field must satisfy. Note that this condition always applies to the latest balance, not to balances at a specific date or time. See [Read balances](https://fragment.dev/markdown/guides/read-balances.md) for more on the different types of Ledger Account balances.

<a id="input-types-ledgeraccountconsistencyconfiginput"></a>

### LedgerAccountConsistencyConfigInput

The payload configuring the consistency for this Ledger Account. See [Configure consistency](https://fragment.dev/markdown/guides/configure-consistency.md).

```json
{
  "groups": [LedgerAccountGroupConsistencyConfigInput],
  "lines": "eventual",
  "ownBalanceUpdates": "eventual",
  "totalBalanceUpdates": "eventual"
}
```

- **groups** ([[LedgerAccountGroupConsistencyConfigInput!]](https://fragment.dev/markdown/api-reference/ledger-types.md#input-types-ledgeraccountgroupconsistencyconfiginput))

  The consistency configuration for Ledger Entry Groups affecting this account. See [Configure consistency](https://fragment.dev/markdown/guides/configure-consistency.md).

- **lines** ([LedgerLinesConsistencyMode](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-ledgerlinesconsistencymode))

  If set to `strong`, then a Ledger Account's `lines` updates will be strongly consistent with the API response. This Ledger Account's balance will be updated and available for strongly consistent reads before you receive an API response. Otherwise if unset or set to `eventual`, `lines` updates are applied asynchronously and may not be immediately reflected in queries. See [Configure consistency](https://fragment.dev/markdown/guides/configure-consistency.md).

- **ownBalanceUpdates** ([BalanceUpdateConsistencyMode](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-balanceupdateconsistencymode))

  If set to `strong`, then a Ledger Account's `ownBalance` updates will be strongly consistent with the API response. This Ledger Account's balance will be updated and available for strongly consistent reads before you receive an API response. Otherwise if unset or set to `eventual`, `ownBalance` updates are applied asynchronously and may not be immediately reflected in queries. See [Configure consistency](https://fragment.dev/markdown/guides/configure-consistency.md).

- **totalBalanceUpdates** ([BalanceUpdateConsistencyMode](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-balanceupdateconsistencymode))

  EXPERIMENTAL: If set to `strong`, then a Ledger Account's `totalBalance` updates will be strongly consistent with the API response. This Ledger Account's balance will be updated and available for strongly consistent reads before you receive an API response. Otherwise if unset or set to `eventual`, `totalBalance` updates are applied asynchronously and may not be immediately reflected in queries. See [Configure consistency](https://fragment.dev/markdown/guides/configure-consistency.md).

<a id="input-types-ledgeraccountgroupconsistencyconfiginput"></a>

### LedgerAccountGroupConsistencyConfigInput

The consistency configuration for a specific Ledger Entry Group in this account.

```json
{"key": "some-safe-string-ik", "ownBalanceUpdates": "eventual"}
```

- **key** ([SafeString!](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-safestring))

  The group key for this configuration.

- **ownBalanceUpdates** ([BalanceUpdateConsistencyMode!](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-balanceupdateconsistencymode))

  If set to `strong`, then Ledger Entry Group `ownBalance`s updates for this account will be strongly consistent with the API response. This Ledger Account's Ledger Entry Group balances will be updated and available for strongly consistent reads before you receive an API response. Otherwise if unset or set to `eventual`, Ledger Entry Group `ownBalance` updates are applied asynchronously and may not be immediately reflected in queries. See [Configure consistency](https://fragment.dev/markdown/guides/configure-consistency.md).

<a id="input-types-ledgerentryconditioninput"></a>

### LedgerEntryConditionInput

A set of pre-conditions and post-conditions that a Ledger Account balance must meet for an operation to succeed. You must specify at least one of precondition or postcondition for each condition.

```json
{
  "account": LedgerAccountMatchInput,
  "currency": CurrencyMatchInput,
  "postcondition": LedgerAccountConditionInput,
  "precondition": LedgerAccountConditionInput
}
```

- **account** ([LedgerAccountMatchInput!](https://fragment.dev/markdown/api-reference/ledger-types.md#matchinput-types-ledgeraccountmatchinput))

  The Ledger Account that must satisfy the provided conditions.

- **currency** ([CurrencyMatchInput](https://fragment.dev/markdown/api-reference/ledger-types.md#matchinput-types-currencymatchinput))

  For Ledger Accounts in the `multi` currency mode, you must specify the currency of the balance affected by the condition. You only need to specify this field for multi-currency accounts.

- **postcondition** ([LedgerAccountConditionInput](https://fragment.dev/markdown/api-reference/ledger-types.md#input-types-ledgeraccountconditioninput))

  The conditions that must hold after the operation.

- **precondition** ([LedgerAccountConditionInput](https://fragment.dev/markdown/api-reference/ledger-types.md#input-types-ledgeraccountconditioninput))

  The conditions that must hold prior to the operation.

<a id="input-types-ledgerentrygroupinput"></a>

### LedgerEntryGroupInput

```json
{"key": "some-safe-string-ik", "value": "some-safe-string-ik"}
```

- **key** ([SafeString!](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-safestring))

  The key of this group. Can be up to 128 characters long.

- **value** ([SafeString!](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-safestring))

  The value associated with this group's key. Can be up to 128 characters long.

<a id="input-types-ledgerentryinput"></a>

### LedgerEntryInput

Ledger Entries are limited to 30 Ledger Lines.

```json
{
  "conditions": [LedgerEntryConditionInput],
  "description": "abc123",
  "groups": [LedgerEntryGroupInput],
  "ledger": LedgerMatchInput,
  "lines": [LedgerLineInput],
  "parameters": "{\"key\":\"value\"}",
  "posted": "2007-12-03T10:15:30Z",
  "tags": [LedgerEntryTagInput],
  "type": "abc123",
  "typeVersion": 2277
}
```

- **conditions** ([[LedgerEntryConditionInput!]](https://fragment.dev/markdown/api-reference/ledger-types.md#input-types-ledgerentryconditioninput))

  Conditions that must be satisfied to post this Ledger Entry. The Ledger Entry will reject with a BadRequestError if any condition is not met. You can only add a condition on a Ledger Account containing a Line in this Ledger Entry.

- **description** ([String](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-string))

  If specified, will also be used as the description for LedgerLines unless they specify their own description.

- **groups** ([[LedgerEntryGroupInput!]](https://fragment.dev/markdown/api-reference/ledger-types.md#input-types-ledgerentrygroupinput))

  Adds this Ledger Entry to this set of Ledger Entry Groups

- **ledger** ([LedgerMatchInput](https://fragment.dev/markdown/api-reference/ledger-types.md#matchinput-types-ledgermatchinput))

  The Ledger to which to post this Ledger Entry. Must be linked to a Schema that defines the provided Ledger Entry type.

- **lines** ([[LedgerLineInput!]](https://fragment.dev/markdown/api-reference/ledger-types.md#input-types-ledgerlineinput))

  The Ledger Lines to create as part of this Ledger Entry. This cannot be used with Ledger Entries that have a 'type' i.e. Ledger Entries defined in the Schema. This can be useful during non-routine operations such as an incident. It is not recommended to use 'lines' during routine operations.

- **parameters** ([JSON](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-json))

  Parameters to be included in a templated Ledger Entry. All provided parameters must be present in the typed Ledger Entry within the Schema linked to the provided Ledger.

- **posted** ([DateTime](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-datetime))

  ISO 8601 timestamp to post this Ledger Entry e.g. "2021-01-01" or "2021-01-01T16:45:00Z". Will error out if supplied to reconcileTx or createOrder since the transaction timestamp will be used instead

- **tags** ([[LedgerEntryTagInput!]](https://fragment.dev/markdown/api-reference/ledger-types.md#input-types-ledgerentrytaginput))

  A set of tags attached to this Ledger Entry.

- **type** ([String](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-string))

  The type of the Ledger Entry. Must be defined in the Schema linked to the Ledger specified below.

- **typeVersion** ([Int](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-int))

  The version of the Ledger Entry type to post. Defaults to 1.

<a id="input-types-ledgerentrytaginput"></a>

### LedgerEntryTagInput

```json
{"key": "some-safe-string-ik", "value": "some-safe-string-ik"}
```

- **key** ([SafeString!](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-safestring))

  The key of this tag. Can be up to 128 characters long.

- **value** ([SafeString!](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-safestring))

  The value associated with this tag's key. Can be up to 256 characters long.

<a id="input-types-ledgerlineinput"></a>

### LedgerLineInput

```json
{
  "account": LedgerAccountMatchInput,
  "amount": "999999999999",
  "currency": CurrencyMatchInput,
  "description": "abc123",
  "key": "abc123",
  "tags": [LedgerEntryTagInput],
  "tx": TxMatchInput
}
```

- **account** ([LedgerAccountMatchInput!](https://fragment.dev/markdown/api-reference/ledger-types.md#matchinput-types-ledgeraccountmatchinput))

  The LedgerAccount this line is being added to

- **amount** ([Int96](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-int96))

  A positive amount increases the balance of its LedgerAccount, a negative amount reduces the balance of its LedgerAccount

- **currency** ([CurrencyMatchInput](https://fragment.dev/markdown/api-reference/ledger-types.md#matchinput-types-currencymatchinput))

  The currency the ledger line is in

- **description** ([String](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-string))

  If not specified the description from the parent LedgerEntryInput will be used

- **key** ([String](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-string))

  Optional identifier for Ledger Line. You can filter lines by key using [LedgerLinesFilterSet](https://fragment.dev/markdown/api-reference/ledger-types.md#filter-types-ledgerlinesfilterset).

- **tags** ([[LedgerEntryTagInput!]](https://fragment.dev/markdown/api-reference/ledger-types.md#input-types-ledgerentrytaginput))

  A set of tags attached to this Ledger Line.

- **tx** ([TxMatchInput](https://fragment.dev/markdown/api-reference/ledger-types.md#matchinput-types-txmatchinput))

  Required for reconcileTx to specify the transaction being reconciled, you can specify either the Fragment  ID or external ID of the transaction

<a id="input-types-ledgerlinetaginput"></a>

### LedgerLineTagInput

```json
{"key": "some-safe-string-ik", "value": "some-safe-string-ik"}
```

- **key** ([SafeString!](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-safestring))

  The key of this tag. Can be up to 128 characters long.

- **value** ([SafeString!](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-safestring))

  The value associated with this tag's key. Can be up to 256 characters long.

<a id="input-types-migrateledgerentryinput"></a>

### MigrateLedgerEntryInput

An object defining the input for migrating a Ledger Entry.

```json
{
  "id": "3116551f-5efc-4c9e-84ac-5a36a51b09c1",
  "newLedgerEntry": LedgerEntryInput
}
```

- **id** ([ID!](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-id))

  The Ledger Entry to migrate

- **newLedgerEntry** ([LedgerEntryInput!](https://fragment.dev/markdown/api-reference/ledger-types.md#input-types-ledgerentryinput))

  The Ledger Entry you want to migrate it to

<a id="input-types-refundpaymentinput"></a>

### RefundPaymentInput

The Payment Refund to create.

```json
{"amount": "999999999999"}
```

- **amount** ([Int96!](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-int96))

  The amount to refund, in whole cents.

<a id="input-types-sceneentryinput"></a>

### SceneEntryInput

A simulated Ledger Entry posted as a part of a Scene.

```json
{
  "parameters": "{\"key\":\"value\"}",
  "type": "some-safe-string-ik",
  "typeVersion": 2277
}
```

- **parameters** ([JSON](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-json))

  Any parameters to be used as inputs to this simulated Ledger Entry.

- **type** ([SafeString!](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-safestring))

  The type of the simulated Ledger Entry. Must match one of the types provided in schema.ledgerEntries.types.

- **typeVersion** ([Int](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-int))

  The version of the Ledger Entry type.

<a id="input-types-sceneeventinput"></a>

### SceneEventInput

```json
{
  "entry": SceneEntryInput,
  "eventType": "entry",
  "payment": ScenePaymentEventInput
}
```

- **entry** ([SceneEntryInput](https://fragment.dev/markdown/api-reference/ledger-types.md#input-types-sceneentryinput))

  The simulated Ledger Entry. Required when eventType is `entry`.

- **eventType** ([SceneEventType!](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-sceneeventtype))

  The type of the Scene Event.

- **payment** ([ScenePaymentEventInput](https://fragment.dev/markdown/api-reference/ledger-types.md#input-types-scenepaymenteventinput))

  The simulated Payment lifecycle transition. Required when eventType is `payment`.

<a id="input-types-sceneinput"></a>

### SceneInput

```json
{
  "events": [SceneEventInput],
  "name": "abc123",
  "payments": [ScenePaymentInput]
}
```

- **events** ([[SceneEventInput!]!](https://fragment.dev/markdown/api-reference/ledger-types.md#input-types-sceneeventinput))

  The ordered simulated events that make up the Scene.

- **name** ([String!](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-string))

  The human-readable name of the Scene.

- **payments** ([[ScenePaymentInput!]](https://fragment.dev/markdown/api-reference/ledger-types.md#input-types-scenepaymentinput))

  The simulated Payments the Scene's payment events reference.

<a id="input-types-scenepaymenteventinput"></a>

### ScenePaymentEventInput

One lifecycle transition of a simulated Payment, posted as a part of a Scene.

```json
{"event": "initiated", "ik": "some-safe-string-ik"}
```

- **event** ([SchemaPaymentAccountingEventKey!](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-schemapaymentaccountingeventkey))

  The lifecycle transition this Scene Event posts.

- **ik** ([SafeString!](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-safestring))

  The Idempotency Key of the simulated Payment, as declared in scene.payments.

<a id="input-types-scenepaymentinput"></a>

### ScenePaymentInput

A simulated Payment declared by a Scene. Its lifecycle events reference it by ik, so one simulated Payment has exactly one set of parameters.

```json
{
  "ik": "some-safe-string-ik",
  "parameters": "{\"key\":\"value\"}",
  "type": "some-safe-string-ik",
  "typeVersion": 2277
}
```

- **ik** ([SafeString!](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-safestring))

  The Idempotency Key of the simulated Payment. Unique within the Scene.

- **parameters** ([JSON](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-json))

  Any parameters to be used as inputs to this simulated Payment.

- **type** ([SafeString!](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-safestring))

  The type of the simulated Payment. Must match one of the types provided in schema.payments.types.

- **typeVersion** ([Int](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-int))

  The version of the Payment Type.

<a id="input-types-schemaconditioninput"></a>

### SchemaConditionInput

A condition that must be met on a Ledger Account balance. The condition can be either a precondition or postcondition.

```json
{
  "ownBalance": SchemaInt96ConditionInput,
  "totalBalance": SchemaInt96ConditionInput
}
```

- **ownBalance** ([SchemaInt96ConditionInput](https://fragment.dev/markdown/api-reference/ledger-types.md#input-types-schemaint96conditioninput))

  A condition on the `ownBalance` of the Ledger Account.

- **totalBalance** ([SchemaInt96ConditionInput](https://fragment.dev/markdown/api-reference/ledger-types.md#input-types-schemaint96conditioninput))

  A condition on the `totalBalance` of the Ledger Account.

<a id="input-types-schemaconsistencyconfiginput"></a>

### SchemaConsistencyConfigInput

The consistency configuration for entities created within Ledgers created by this Schema.

```json
{"entries": "eventual"}
```

- **entries** ([SchemaConsistencyMode](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-schemaconsistencymode))

  The consistency mode for the Ledger Entries list query within Ledgers created by this Schema. See [Configure consistency](https://fragment.dev/markdown/guides/configure-consistency.md).

<a id="input-types-schemainput"></a>

### SchemaInput

Input to the API for creating a Schema.

```json
{
  "chartOfAccounts": ChartOfAccountsInput,
  "consistencyConfig": SchemaConsistencyConfigInput,
  "groups": [GroupInput],
  "key": "some-safe-string-ik",
  "ledgerEntries": SchemaLedgerEntriesInput,
  "name": "assets/bank:\{\{bank_name\}\}",
  "payments": SchemaPaymentsInput,
  "scenes": [SceneInput]
}
```

- **chartOfAccounts** ([ChartOfAccountsInput!](https://fragment.dev/markdown/api-reference/ledger-types.md#input-types-chartofaccountsinput))

  The Chart of Accounts for the Schema.

- **consistencyConfig** ([SchemaConsistencyConfigInput](https://fragment.dev/markdown/api-reference/ledger-types.md#input-types-schemaconsistencyconfiginput))

  The consistency configuration for this Schema.

- **groups** ([[GroupInput!]](https://fragment.dev/markdown/api-reference/ledger-types.md#input-types-groupinput))

  Any groups associated with this Schema.

- **key** ([SafeString!](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-safestring))

  The key of the Schema. This is a stable, unique identifier for the Schema. Uniqueness is enforced at the Workspace level.

- **ledgerEntries** ([SchemaLedgerEntriesInput](https://fragment.dev/markdown/api-reference/ledger-types.md#input-types-schemaledgerentriesinput))

  The Ledger Entries to add to the Schema.

- **name** ([ParameterizedString](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-parameterizedstring))

  The human-readable name of the Schema.

- **payments** ([SchemaPaymentsInput](https://fragment.dev/markdown/api-reference/ledger-types.md#input-types-schemapaymentsinput))

  The Payment Types to add to the Schema.

- **scenes** ([[SceneInput!]](https://fragment.dev/markdown/api-reference/ledger-types.md#input-types-sceneinput))

  Any scenes associated with this Schema.

<a id="input-types-schemaint96conditioninput"></a>

### SchemaInt96ConditionInput

A condition that must be met on a field.

```json
{
  "eq": "assets/bank:\{\{bank_name\}\}",
  "gte": "assets/bank:\{\{bank_name\}\}",
  "lte": "assets/bank:\{\{bank_name\}\}"
}
```

- **eq** ([ParameterizedString](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-parameterizedstring))

  Amount must be exactly equal to this value. You may not specify this alongside `gte` or `lte`.

- **gte** ([ParameterizedString](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-parameterizedstring))

  Amount must be greater than or equal to this value.

- **lte** ([ParameterizedString](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-parameterizedstring))

  Amount must be less than or equal to this value.

<a id="input-types-schemaledgeraccountinput"></a>

### SchemaLedgerAccountInput

Models a Ledger Account in a Schema. Upon successfully storing a [Schema](https://fragment.dev/markdown/api-reference/ledger-types.md#core-types-schema), a [LedgerAccount](https://fragment.dev/markdown/api-reference/ledger-types.md#core-types-ledgeraccount) will be created for each corresponding non-templated SchemaLedgerAccountInput in your Chart of Accounts.

```json
{
  "children": [SchemaLedgerAccountInput],
  "clearing": true,
  "consistencyConfig": LedgerAccountConsistencyConfigInput,
  "currency": SchemaCurrencyMatchInput,
  "currencyMode": "multi",
  "key": "some-safe-string-ik",
  "linkedAccount": SchemaExternalAccountMatchInput,
  "name": "assets/bank:\{\{bank_name\}\}",
  "payment": SchemaPaymentInput,
  "status": "active",
  "template": true,
  "type": "asset"
}
```

- **children** ([[SchemaLedgerAccountInput!]](https://fragment.dev/markdown/api-reference/ledger-types.md#input-types-schemaledgeraccountinput))

  Ledger Accounts to create as children of this Ledger Account. Ledger Accounts may be nested up to a maximum depth of 10.

- **clearing** ([Boolean](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-boolean))

  EXPERIMENTAL: Whether or not this Ledger Account is a Clearing Account. Clearing Accounts have balances that should tend to zero. They are used to track in-progress workflows and payments.

- **consistencyConfig** ([LedgerAccountConsistencyConfigInput](https://fragment.dev/markdown/api-reference/ledger-types.md#input-types-ledgeraccountconsistencyconfiginput))

  The consistency configuration for this ledger account. See [Configure consistency](https://fragment.dev/markdown/guides/configure-consistency.md).

- **currency** ([SchemaCurrencyMatchInput](https://fragment.dev/markdown/api-reference/ledger-types.md#matchinput-types-schemacurrencymatchinput))

  The currency of this Ledger Account. If this is not set, and `currencyMode` is not set to `multi`, it is derived from the Chart of Accounts' default.

- **currencyMode** ([CurrencyMode](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-currencymode))

  If set to `multi`, creates a multi-currency Ledger Account. If set to `single`, creates a single-currency Ledger Account.

- **key** ([SafeString!](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-safestring))

  The key of this Ledger Account. Keys are used to formulate the unique path of the Ledger Account in your Chart of Accounts. Siblings must have unique keys.

- **linkedAccount** ([SchemaExternalAccountMatchInput](https://fragment.dev/markdown/api-reference/ledger-types.md#matchinput-types-schemaexternalaccountmatchinput))

  The External Account to link to this Ledger Account. It must be provided of `linked` is true.

- **name** ([ParameterizedString](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-parameterizedstring))

  The human-readable name of this Ledger Account.

- **payment** ([SchemaPaymentInput](https://fragment.dev/markdown/api-reference/ledger-types.md#input-types-schemapaymentinput))

  Marks this as a Payment Account.

- **status** ([SchemaLedgerAccountStatus](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-schemaledgeraccountstatus))

  The status of this Ledger Account. Defaults to active.

- **template** ([Boolean](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-boolean))

  Whether or not this Ledger Account should be templated.

- **type** ([LedgerAccountTypes](https://fragment.dev/markdown/api-reference/ledger-types.md#utility-types-ledgeraccounttypes))

  The type of ledger account to create. Required if this is a top-level Ledger Account. If not provided, the type will be inferred from the parent.

<a id="input-types-schemaledgerentriesinput"></a>

### SchemaLedgerEntriesInput

The Ledger Entries in your Schema.

```json
{"types": [SchemaLedgerEntryInput]}
```

- **types** ([[SchemaLedgerEntryInput!]!](https://fragment.dev/markdown/api-reference/ledger-types.md#input-types-schemaledgerentryinput))

  A list of Ledger Entry definitions.

<a id="input-types-schemaledgerentryconditioninput"></a>

### SchemaLedgerEntryConditionInput

A condition that must be met on a Ledger Account when a Ledger Entry is posted.

```json
{
  "account": SchemaLedgerAccountMatchInput,
  "currency": SchemaCurrencyMatchInput,
  "postcondition": SchemaConditionInput,
  "precondition": SchemaConditionInput,
  "repeated": SchemaRepeatedConfigInput
}
```

- **account** ([SchemaLedgerAccountMatchInput!](https://fragment.dev/markdown/api-reference/ledger-types.md#matchinput-types-schemaledgeraccountmatchinput))

  The Ledger Account to apply the condition to.

- **currency** ([SchemaCurrencyMatchInput](https://fragment.dev/markdown/api-reference/ledger-types.md#matchinput-types-schemacurrencymatchinput))

  The currency of the balance to apply the condition to. Required if the Ledger Account matched is a multi-currency Ledger Account. Otherwise, this field is defaults to the Ledger Account's currency.

- **postcondition** ([SchemaConditionInput](https://fragment.dev/markdown/api-reference/ledger-types.md#input-types-schemaconditioninput))

  A `postcondition` must be met after the Ledger Entry updates are applied.

- **precondition** ([SchemaConditionInput](https://fragment.dev/markdown/api-reference/ledger-types.md#input-types-schemaconditioninput))

  A `precondition` must be met before any Ledger Entry updates are applied.

- **repeated** ([SchemaRepeatedConfigInput](https://fragment.dev/markdown/api-reference/ledger-types.md#input-types-schemarepeatedconfiginput))

  Repeated expansion configuration. When set, this condition is expanded at runtime for each element in the array parameter named by the key.

<a id="input-types-schemaledgerentrygroupinput"></a>

### SchemaLedgerEntryGroupInput

A Ledger Entry Group associated with a Ledger Entry type.

```json
{"key": "some-safe-string-ik", "value": "assets/bank:\{\{bank_name\}\}"}
```

- **key** ([SafeString!](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-safestring))

  The key for this Ledger Entry Group.

- **value** ([ParameterizedString!](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-parameterizedstring))

  The value associated with this Ledger Entry Group.

<a id="input-types-schemaledgerentryinput"></a>

### SchemaLedgerEntryInput

A Ledger Entry in a Schema. All Ledger Entries defined in a Schema must have a unique type.

```json
{
  "conditions": [SchemaLedgerEntryConditionInput],
  "description": "assets/bank:\{\{bank_name\}\}",
  "groups": [SchemaLedgerEntryGroupInput],
  "lines": [SchemaLedgerLineInput],
  "parameters": "{\"key\":\"value\"}",
  "postLinesAs": "net_amounts",
  "status": "active",
  "tags": [SchemaLedgerEntryTagInput],
  "type": "some-safe-string-ik",
  "typeVersion": 2277
}
```

- **conditions** ([[SchemaLedgerEntryConditionInput!]](https://fragment.dev/markdown/api-reference/ledger-types.md#input-types-schemaledgerentryconditioninput))

  Conditions that must be satisfied to post this Ledger Entry. The Ledger Entry will reject with a BadRequestError if any condition is not met. You can only add a condition on a Ledger Account containing a Line in this Ledger Entry.

- **description** ([ParameterizedString](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-parameterizedstring))

  Human-readable description of the Ledger Entry.

- **groups** ([[SchemaLedgerEntryGroupInput!]](https://fragment.dev/markdown/api-reference/ledger-types.md#input-types-schemaledgerentrygroupinput))

  Ledger Entries posted with this type will be in these Ledger Entry Groups.

- **lines** ([[SchemaLedgerLineInput!]](https://fragment.dev/markdown/api-reference/ledger-types.md#input-types-schemaledgerlineinput))

  The Ledger Lines in the Ledger Entry. If provided, when posting a Typed Entry, a [LedgerEntry](https://fragment.dev/markdown/api-reference/ledger-types.md#core-types-ledgerline) will be posted containing [LedgerLines](https://fragment.dev/markdown/api-reference/ledger-types.md#core-types-ledgerline) corresponding to the values you provide here. If your lines contain parameters, you must supply values for those parameters that balance out the Ledger Entry. If not provided, lines will be required when posting a Typed Entry.

- **parameters** ([JSON](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-json))

  Fixed partial set of parameters to be included in a templated Ledger Entry.

- **postLinesAs** ([PostLinesAs](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-postlinesas))

  Controls how lines are posted. When set to `net_amounts`, all lines targeting the same account, currency, and tx are aggregated into a single line with the net amount, and lines that sum to zero are skipped. When set to `skip_zero_lines`, lines with a zero amount are skipped but not aggregated. In both modes, if all lines are zero, no lines are skipped. When set to `raw_lines`, lines are posted as-is without aggregation. New entries created via the dashboard default to `net_amounts`. Existing entries without this field set are treated as `raw_lines`.

- **status** ([SchemaLedgerEntryStatus](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-schemaledgerentrystatus))

  The status of this Ledger Entry. Defaults to active.

- **tags** ([[SchemaLedgerEntryTagInput!]](https://fragment.dev/markdown/api-reference/ledger-types.md#input-types-schemaledgerentrytaginput))

  Ledger Entries posted with this type will be associated with these tags.

- **type** ([SafeString!](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-safestring))

  The type of this Ledger Entry. This is a stable, unique identifier for this entry. Uniqueness is enforced at the Schema level. You can filter on this field when querying for Ledger Entries. See the docs on [LedgerEntryFilterSet](https://fragment.dev/markdown/api-reference/ledger-types.md#filter-types-ledgerentriesfilterset)

- **typeVersion** ([Int](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-int))

  The version of the Ledger Entry type.

<a id="input-types-schemaledgerentrytaginput"></a>

### SchemaLedgerEntryTagInput

A tag associated with a Ledger Entry type.

```json
{"key": "some-safe-string-ik", "value": "assets/bank:\{\{bank_name\}\}"}
```

- **key** ([SafeString!](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-safestring))

  The key for this tag.

- **value** ([ParameterizedString!](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-parameterizedstring))

  The value associated with the given key for this tag.

<a id="input-types-schemaledgerlineinput"></a>

### SchemaLedgerLineInput

A Ledger Line in a Ledger Entry.

```json
{
  "account": SchemaLedgerAccountMatchInput,
  "amount": "assets/bank:\{\{bank_name\}\}",
  "currency": SchemaCurrencyMatchInput,
  "description": "assets/bank:\{\{bank_name\}\}",
  "key": "some-safe-string-ik",
  "repeated": SchemaRepeatedConfigInput,
  "tags": [SchemaLedgerEntryTagInput],
  "tx": SchemaTxMatchInput
}
```

- **account** ([SchemaLedgerAccountMatchInput!](https://fragment.dev/markdown/api-reference/ledger-types.md#matchinput-types-schemaledgeraccountmatchinput))

  The Ledger Account this Ledger Line will be posted to. It supports parameters in its attributes via handlebars syntax.

- **amount** ([ParameterizedString](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-parameterizedstring))

  The amount of the Ledger Line. It supports parameters via the handlebars syntax and addition (+) and subtraction (-).

- **currency** ([SchemaCurrencyMatchInput](https://fragment.dev/markdown/api-reference/ledger-types.md#matchinput-types-schemacurrencymatchinput))

  The currency of the Ledger Line. This is required if the Ledger Account has currencyMode multi. It supports parameters in its attributes via handlebars syntax.

- **description** ([ParameterizedString](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-parameterizedstring))

  Human-readable description of the line.

- **key** ([SafeString!](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-safestring))

  The key for the Ledger Line. Ledger Line keys must be unique within a Ledger Entry. Key can be filtered on as part of the LedgerLinesFilterSet.

- **repeated** ([SchemaRepeatedConfigInput](https://fragment.dev/markdown/api-reference/ledger-types.md#input-types-schemarepeatedconfiginput))

  Repeated expansion configuration. When set, this line is expanded at runtime for each element in the array parameter named by the key.

- **tags** ([[SchemaLedgerEntryTagInput!]](https://fragment.dev/markdown/api-reference/ledger-types.md#input-types-schemaledgerentrytaginput))

  Tags to attach to this Ledger Line. Supports parameterized values via handlebars syntax.

- **tx** ([SchemaTxMatchInput](https://fragment.dev/markdown/api-reference/ledger-types.md#matchinput-types-schematxmatchinput))

  The external transaction to reconcile. This field is required if the Ledger Account being posted to is a Linked Ledger Account. Otherwise, this field is disallowed. It supports parameters in its attributes via handlebars syntax. See the docs on [reconciling payments](https://fragment.dev/markdown/guides/reconcile-payments.md).

<a id="input-types-schemapaymentaccountinginput"></a>

### SchemaPaymentAccountingInput

The Ledger Entries a Payment Type posts as a payment moves through its lifecycle, keyed by lifecycle transition.

```json
{
  "initiated": SchemaPaymentEntryInput,
  "refund_failed": SchemaPaymentEntryInput,
  "refund_initiated": SchemaPaymentEntryInput,
  "settled": SchemaPaymentEntryInput
}
```

- **initiated** ([SchemaPaymentEntryInput](https://fragment.dev/markdown/api-reference/ledger-types.md#input-types-schemapaymententryinput))

  Posted when the payment is captured. Optional.

- **refund_failed** ([SchemaPaymentEntryInput](https://fragment.dev/markdown/api-reference/ledger-types.md#input-types-schemapaymententryinput))

  EXPERIMENTAL: Posted when an initiated refund fails. Optional.

- **refund_initiated** ([SchemaPaymentEntryInput](https://fragment.dev/markdown/api-reference/ledger-types.md#input-types-schemapaymententryinput))

  EXPERIMENTAL: Posted when a refund of the settled payment is initiated. Optional.

- **settled** ([SchemaPaymentEntryInput!](https://fragment.dev/markdown/api-reference/ledger-types.md#input-types-schemapaymententryinput))

  Posted when the payment settles. Every Payment Type must define it.

<a id="input-types-schemapaymententryinput"></a>

### SchemaPaymentEntryInput

The Ledger Entry a Payment Type posts on a payment lifecycle event.

```json
{
  "description": "assets/bank:\{\{bank_name\}\}",
  "lines": [SchemaPaymentLineInput]
}
```

- **description** ([ParameterizedString](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-parameterizedstring))

  Human-readable description of the payment entry.

- **lines** ([[SchemaPaymentLineInput!]!](https://fragment.dev/markdown/api-reference/ledger-types.md#input-types-schemapaymentlineinput))

  The Ledger Lines in the payment entry.

<a id="input-types-schemapaymentinput"></a>

### SchemaPaymentInput

Marks a Ledger Account as a Payment Account.

```json
{"enabled": true}
```

- **enabled** ([Boolean!](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-boolean))

<a id="input-types-schemapaymentlineinput"></a>

### SchemaPaymentLineInput

A Ledger Line in a payment entry.

```json
{
  "account": SchemaLedgerAccountMatchInput,
  "amount": "assets/bank:\{\{bank_name\}\}",
  "currency": SchemaCurrencyMatchInput,
  "description": "assets/bank:\{\{bank_name\}\}",
  "key": "some-safe-string-ik",
  "system": "payment_fee_line"
}
```

- **account** ([SchemaLedgerAccountMatchInput!](https://fragment.dev/markdown/api-reference/ledger-types.md#matchinput-types-schemaledgeraccountmatchinput))

  The Ledger Account this line will be posted to. It supports parameters in its attributes via handlebars syntax.

- **amount** ([ParameterizedString!](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-parameterizedstring))

  The amount of the line. It supports parameters via the handlebars syntax and addition (+) and subtraction (-).

- **currency** ([SchemaCurrencyMatchInput](https://fragment.dev/markdown/api-reference/ledger-types.md#matchinput-types-schemacurrencymatchinput))

  The currency of the line. This is required if the Ledger Account has currencyMode multi. It supports parameters in its attributes via handlebars syntax.

- **description** ([ParameterizedString](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-parameterizedstring))

  Human-readable description of the line.

- **key** ([SafeString!](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-safestring))

  The key for the line. Keys must be unique within a payment entry.

- **system** ([SchemaSystemLineKind](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-schemasystemlinekind))

  Marks this as a system-owned line. Fragment  fills the amounts of system lines when the payment entry is posted.

<a id="input-types-schemapaymenttypedetailsinput"></a>

### SchemaPaymentTypeDetailsInput

The payment a Payment Type creates.

```json
{"amount": "assets/bank:\{\{bank_name\}\}", "direction": "payin"}
```

- **amount** ([ParameterizedString!](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-parameterizedstring))

  The amount requested for the payment, as a parameterized expression filled from createPayment parameters.

- **direction** ([SchemaPaymentTypeDirection!](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-schemapaymenttypedirection))

  The direction the payment moves money.

<a id="input-types-schemapaymenttypeinput"></a>

### SchemaPaymentTypeInput

A Payment Type in a Schema. All Payment Types defined in a Schema must have a unique type and typeVersion pair.

```json
{
  "accounting": SchemaPaymentAccountingInput,
  "payment": SchemaPaymentTypeDetailsInput,
  "status": "active",
  "type": "some-safe-string-ik",
  "typeVersion": 2277
}
```

- **accounting** ([SchemaPaymentAccountingInput!](https://fragment.dev/markdown/api-reference/ledger-types.md#input-types-schemapaymentaccountinginput))

  The Ledger Entries posted as the payment moves through its lifecycle.

- **payment** ([SchemaPaymentTypeDetailsInput!](https://fragment.dev/markdown/api-reference/ledger-types.md#input-types-schemapaymenttypedetailsinput))

  The payment this Payment Type creates.

- **status** ([SchemaPaymentTypeStatus!](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-schemapaymenttypestatus))

  The status of this Payment Type.

- **type** ([SafeString!](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-safestring))

  The type of this Payment Type. This is a stable, unique identifier for it. Uniqueness is enforced at the Schema level.

- **typeVersion** ([Int!](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-int))

  The version of the Payment Type.

<a id="input-types-schemapaymentsinput"></a>

### SchemaPaymentsInput

The Payment Types in your Schema.

```json
{"types": [SchemaPaymentTypeInput]}
```

- **types** ([[SchemaPaymentTypeInput!]!](https://fragment.dev/markdown/api-reference/ledger-types.md#input-types-schemapaymenttypeinput))

  A list of Payment Type definitions.

<a id="input-types-schemarepeatedconfiginput"></a>

### SchemaRepeatedConfigInput

Configuration for repeated expansion of a line or condition. The key names a client-supplied array parameter whose elements each generate one copy of the line or condition at runtime.

```json
{"key": "some-safe-string-ik"}
```

- **key** ([SafeString!](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-safestring))

  The key of the array parameter whose elements expand this line or condition.

<a id="input-types-updateledgeraccountinput"></a>

### UpdateLedgerAccountInput

```json
{
  "consistencyConfig": LedgerAccountConsistencyConfigInput,
  "name": "abc123"
}
```

- **consistencyConfig** ([LedgerAccountConsistencyConfigInput](https://fragment.dev/markdown/api-reference/ledger-types.md#input-types-ledgeraccountconsistencyconfiginput))

  The consistency configuration for this ledger account. This defines how updates to this ledger account's balance are handled.

- **name** ([String](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-string))

  The name to update the ledger account to

<a id="input-types-updateledgerentryinput"></a>

### UpdateLedgerEntryInput

```json
{
  "groups": [LedgerEntryGroupInput],
  "ledgerLines": [UpdateLedgerLineInput],
  "tags": [LedgerEntryTagInput],
  "tagsToRemove": [LedgerEntryTagInput]
}
```

- **groups** ([[LedgerEntryGroupInput!]](https://fragment.dev/markdown/api-reference/ledger-types.md#input-types-ledgerentrygroupinput))

  The list of Groups to add to this Ledger Entry.

- **ledgerLines** ([[UpdateLedgerLineInput!]](https://fragment.dev/markdown/api-reference/ledger-types.md#input-types-updateledgerlineinput))

  The list of Ledger Line updates to apply to Ledger Lines on this Ledger Entry.

- **tags** ([[LedgerEntryTagInput!]](https://fragment.dev/markdown/api-reference/ledger-types.md#input-types-ledgerentrytaginput))

  The list of Tags to add and/or update on this Ledger Entry.

- **tagsToRemove** ([[LedgerEntryTagInput!]](https://fragment.dev/markdown/api-reference/ledger-types.md#input-types-ledgerentrytaginput))

  The list of Tags to remove from this Ledger Entry.

<a id="input-types-updateledgerinput"></a>

### UpdateLedgerInput

```json
{"name": "abc123"}
```

- **name** ([String](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-string))

  The new Ledger name.

<a id="input-types-updateledgerlineinput"></a>

### UpdateLedgerLineInput

```json
{
  "ledgerLine": LedgerLineMatchInput,
  "tags": [LedgerLineTagInput],
  "tagsToRemove": [LedgerLineTagInput]
}
```

- **ledgerLine** ([LedgerLineMatchInput!](https://fragment.dev/markdown/api-reference/ledger-types.md#matchinput-types-ledgerlinematchinput))

  The Ledger Line that is being updated. It must belong to the Ledger Entry being updated.

- **tags** ([[LedgerLineTagInput!]](https://fragment.dev/markdown/api-reference/ledger-types.md#input-types-ledgerlinetaginput))

  The list of Tags to add and/or update on this Ledger Line.

- **tagsToRemove** ([[LedgerLineTagInput!]](https://fragment.dev/markdown/api-reference/ledger-types.md#input-types-ledgerlinetaginput))

  The list of Tags to remove from this Ledger Line.

<a id="matchinput-types"></a>

## MatchInput Types

<a id="matchinput-types-currencymatchinput"></a>

### CurrencyMatchInput

```json
{"code": "AAVE", "customCurrencyId": "some-safe-string-ik"}
```

- **code** ([CurrencyCode!](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-currencycode))

  The currency code. This is an [enum type](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-currencycode).

- **customCurrencyId** ([SafeString](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-safestring))

  The ID for a custom currency. This is specified when creating the custom currency using the [createCustomCurrency](https://fragment.dev/markdown/api-reference/ledger-mutations.md#createcustomcurrency) mutation.

<a id="matchinput-types-entrygroupmatchinput"></a>

### EntryGroupMatchInput

```json
{"key": "some-safe-string-ik", "value": "some-safe-string-ik"}
```

- **key** ([SafeString!](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-safestring))

- **value** ([SafeString!](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-safestring))

<a id="matchinput-types-externalaccountmatchinput"></a>

### ExternalAccountMatchInput

Specify an External Account by using id, or linkId and externalId.

```json
{
  "externalId": "3116551f-5efc-4c9e-84ac-5a36a51b09c1",
  "id": "3116551f-5efc-4c9e-84ac-5a36a51b09c1",
  "linkId": "3116551f-5efc-4c9e-84ac-5a36a51b09c1"
}
```

- **externalId** ([ID](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-id))

  The external system's ID of the External Account. If this is specified, `linkId` is required. `id` is optional, but will be validated if provided.

- **id** ([ID](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-id))

  The Fragment  ID of the External Account. If this is specified, both `linkId` and `externalId` are optional, but will be validated if provided.

- **linkId** ([ID](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-id))

  The Fragment  ID of the Link the External Account is in. If this is specified, `externalId` is required. `id` is optional, but will be validated if provided.

<a id="matchinput-types-groupmatchinput"></a>

### GroupMatchInput

Input type for matching a specific group by key and value

```json
{"key": "some-safe-string-ik", "value": "some-safe-string-ik"}
```

- **key** ([SafeString!](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-safestring))

  The key of the group to match

- **value** ([SafeString!](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-safestring))

  The value of the group to match

<a id="matchinput-types-ledgeraccountmatchinput"></a>

### LedgerAccountMatchInput

Specify a Ledger Account by using id or path.

```json
{
  "id": "3116551f-5efc-4c9e-84ac-5a36a51b09c1",
  "ledger": LedgerMatchInput,
  "path": "abc123"
}
```

- **id** ([ID](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-id))

  The Fragment  ID of the Ledger Account

- **ledger** ([LedgerMatchInput](https://fragment.dev/markdown/api-reference/ledger-types.md#matchinput-types-ledgermatchinput))

  The Ledger to which this Ledger Account belongs. This is required if you are specifying the Ledger Account by `path`.

- **path** ([String](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-string))

  The unique path of the Ledger Account. This is a slash-delimited string containing the keys of an account and all its direct ancestors.

<a id="matchinput-types-ledgerentrygroupmatchinput"></a>

### LedgerEntryGroupMatchInput

```json
{
  "key": "some-safe-string-ik",
  "ledger": LedgerMatchInput,
  "value": "some-safe-string-ik"
}
```

- **key** ([SafeString!](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-safestring))

- **ledger** ([LedgerMatchInput!](https://fragment.dev/markdown/api-reference/ledger-types.md#matchinput-types-ledgermatchinput))

- **value** ([SafeString!](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-safestring))

<a id="matchinput-types-ledgerentrymatchinput"></a>

### LedgerEntryMatchInput

Specify a Ledger Entry by using id.

```json
{
  "id": "3116551f-5efc-4c9e-84ac-5a36a51b09c1",
  "ik": "some-safe-string-ik",
  "ledger": LedgerMatchInput
}
```

- **id** ([ID](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-id))

  The Fragment  ID of the Ledger Entry

- **ik** ([SafeString](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-safestring))

  The IK provided to the `addLedgerEntry` mutation or the `ik` field returned from a `reconcileTx` mutation. This is required if you have not provided `id`.

- **ledger** ([LedgerMatchInput](https://fragment.dev/markdown/api-reference/ledger-types.md#matchinput-types-ledgermatchinput))

  The Fragment  ID of the Ledger to which this Ledger Entry belongs. This is required if you have not provided `id`.

<a id="matchinput-types-ledgerlinematchinput"></a>

### LedgerLineMatchInput

Specify a Ledger Line by using id.

```json
{"id": "3116551f-5efc-4c9e-84ac-5a36a51b09c1"}
```

- **id** ([ID!](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-id))

  The Fragment  ID of the ledger line

<a id="matchinput-types-ledgermatchinput"></a>

### LedgerMatchInput

Specify a Ledger by using id or ik.

```json
{"id": "3116551f-5efc-4c9e-84ac-5a36a51b09c1", "ik": "some-safe-string-ik"}
```

- **id** ([ID](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-id))

  The Fragment  ID of the Ledger

- **ik** ([SafeString](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-safestring))

  The IK passed into the [createLedger](https://fragment.dev/markdown/api-reference/ledger-mutations.md#createledger) mutation. This is treated as a second unique identifier for this Ledger.

<a id="matchinput-types-linkmatchinput"></a>

### LinkMatchInput

Specify a Link by ID, or a Custom Link by its creation IK.

```json
{"id": "3116551f-5efc-4c9e-84ac-5a36a51b09c1", "ik": "some-safe-string-ik"}
```

- **id** ([ID](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-id))

- **ik** ([SafeString](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-safestring))

  The IK passed to createCustomLink. If id is also provided, both must identify the same Link.

<a id="matchinput-types-paymentmatchinput"></a>

### PaymentMatchInput

Specify a Payment by id, or by ledger and ik.

```json
{
  "id": "3116551f-5efc-4c9e-84ac-5a36a51b09c1",
  "ik": "some-safe-string-ik",
  "ledger": LedgerMatchInput
}
```

- **id** ([ID](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-id))

  The Fragment  ID of the Payment.

- **ik** ([SafeString](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-safestring))

  The Idempotency Key the Payment was created with.

- **ledger** ([LedgerMatchInput](https://fragment.dev/markdown/api-reference/ledger-types.md#matchinput-types-ledgermatchinput))

  The Ledger the Payment belongs to.

<a id="matchinput-types-paymentmethodmatchinput"></a>

### PaymentMethodMatchInput

Specify a saved Payment Method by its ID.

```json
{"id": "3116551f-5efc-4c9e-84ac-5a36a51b09c1"}
```

- **id** ([ID!](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-id))

  Fragment ID of the Payment Method.

<a id="matchinput-types-paymentmethodsetupmatchinput"></a>

### PaymentMethodSetupMatchInput

Specify a Payment Method Setup by using id, or ik and ledger, or all three when they name the same Payment Method Setup.

```json
{
  "id": "3116551f-5efc-4c9e-84ac-5a36a51b09c1",
  "ik": "some-safe-string-ik",
  "ledger": LedgerMatchInput
}
```

- **id** ([ID](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-id))

  The Fragment  ID of the Payment Method Setup.

- **ik** ([SafeString](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-safestring))

  The IK passed to `createPaymentMethodSetup`. Required if you have not provided `id`.

- **ledger** ([LedgerMatchInput](https://fragment.dev/markdown/api-reference/ledger-types.md#matchinput-types-ledgermatchinput))

  The Ledger the Payment Method Setup belongs to. Required if you have not provided `id`.

<a id="matchinput-types-schemacurrencymatchinput"></a>

### SchemaCurrencyMatchInput

Matches a Currency. Can be a built-in [CurrencyCode](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-currencycode), custom Currency, or a parameterized string. If you supply a parameterized string, you must pass in a valid CurrencyCode as a parameter when posting a Ledger Entry.

```json
{
  "code": "assets/bank:\{\{bank_name\}\}",
  "customCurrencyId": "assets/bank:\{\{bank_name\}\}"
}
```

- **code** ([ParameterizedString!](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-parameterizedstring))

  The currency code. This must either be a [CurrencyCode](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-currencycode) or a parameterized string that resolves to a CurrencyCode.

- **customCurrencyId** ([ParameterizedString](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-parameterizedstring))

  The ID for a custom currency. This is specified when creating the custom currency using the [createCustomCurrency](https://fragment.dev/markdown/api-reference/ledger-mutations.md#createcustomcurrency) mutation.

<a id="matchinput-types-schemaexternalaccountmatchinput"></a>

### SchemaExternalAccountMatchInput

```json
{
  "externalId": "assets/bank:\{\{bank_name\}\}",
  "id": "assets/bank:\{\{bank_name\}\}",
  "linkId": "assets/bank:\{\{bank_name\}\}",
  "linkIk": "assets/bank:\{\{bank_name\}\}",
  "linkType": "CustomLink"
}
```

- **externalId** ([ParameterizedString](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-parameterizedstring))

  The External systems's ID of the account

- **id** ([ParameterizedString](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-parameterizedstring))

  The Fragment  ID of the external account

- **linkId** ([ParameterizedString](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-parameterizedstring))

  The Fragment  ID of the link

- **linkIk** ([ParameterizedString](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-parameterizedstring))

  The idempotency key of a CustomLink, expressed with a schema parameter. Requires linkType: CustomLink. If linkId is also supplied, both must identify the same Link.

- **linkType** ([LinkType](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-linktype))

  The type of Link this external account belongs to. Must be one of: IncreaseLink, UnitLink, CustomLink, or StripeLink.

<a id="matchinput-types-schemaledgeraccountmatchinput"></a>

### SchemaLedgerAccountMatchInput

Matches a Ledger Account in a Schema.

```json
{"path": "assets/bank:\{\{bank_name\}\}"}
```

- **path** ([ParameterizedString!](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-parameterizedstring))

  The unique path of the Ledger Account in the Schema. This is a slash-delimited string containing the keys of a Ledger Account and all its direct ancestors. ex: expense-root/subscriptions/netflix For Templated Ledger Accounts, you must supply a parameter in the path that will be used to name an instance of the template. ex: `"expense-root/subscriptions/vendor:\{\{vendor_name\}\}"`

<a id="matchinput-types-schemamatchinput"></a>

### SchemaMatchInput

An object used to retrieve a Schema.

```json
{"key": "some-safe-string-ik", "version": 2277}
```

- **key** ([SafeString!](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-safestring))

  The key to retrieve a Schema by. `key` is unique to a Workspace.

- **version** ([Int](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-int))

  Optional parameter to specify version of requested Schema. If not provided, it defaults to 0, representing the latest available version for the provided Schema key.

<a id="matchinput-types-schematxmatchinput"></a>

### SchemaTxMatchInput

Matches a transaction at an external system. This is used to specify the transaction being reconciled into a Linked Ledger Account

```json
{"externalId": "assets/bank:\{\{bank_name\}\}", "id": "assets/bank:\{\{bank_name\}\}"}
```

- **externalId** ([ParameterizedString](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-parameterizedstring))

  The external system's ID for the transaction.

- **id** ([ParameterizedString](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-parameterizedstring))

  The Fragment  ID for the transaction.

<a id="matchinput-types-tagmatchinput"></a>

### TagMatchInput

Specifies a single tag that an entity is expected to have. You must specify both the key and the value.

```json
{"key": "some-safe-string-ik", "value": "some-safe-string-ik"}
```

- **key** ([SafeString!](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-safestring))

  The key of this tag.

- **value** ([SafeString!](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-safestring))

  The value associated with this tag's key.

<a id="matchinput-types-txmatchinput"></a>

### TxMatchInput

Specify a Tx by using id or externalId, the Link it belongs to by linkId, and the External Account it is a part of by accountId or externalAccountId.

```json
{
  "accountId": "3116551f-5efc-4c9e-84ac-5a36a51b09c1",
  "externalAccountId": "3116551f-5efc-4c9e-84ac-5a36a51b09c1",
  "externalId": "3116551f-5efc-4c9e-84ac-5a36a51b09c1",
  "id": "3116551f-5efc-4c9e-84ac-5a36a51b09c1",
  "linkId": "3116551f-5efc-4c9e-84ac-5a36a51b09c1"
}
```

- **accountId** ([ID](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-id))

  The Fragment  ID of the external account

- **externalAccountId** ([ID](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-id))

  The external system's ID for the account

- **externalId** ([ID](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-id))

  The external system's ID for the transaction

- **id** ([ID](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-id))

  The Fragment  ID of the transaction

- **linkId** ([ID](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-id))

  The Fragment  ID of the link

<a id="matchinput-types-usermatchinput"></a>

### UserMatchInput

Specify a User by their email.

```json
{"email": "abc123"}
```

- **email** ([String!](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-string))

  The User's email.

<a id="response-types"></a>

## Response Types

<a id="response-types-addledgerentriesresponse"></a>

### AddLedgerEntriesResponse

```json
AddLedgerEntriesError
```

[Visual: GqlTypeList. View on the HTML page.](https://fragment.dev/api-reference/ledger-types)

<a id="response-types-addledgerentryresponse"></a>

### AddLedgerEntryResponse

```json
AddLedgerEntryResult
```

[Visual: GqlTypeList. View on the HTML page.](https://fragment.dev/api-reference/ledger-types)

<a id="response-types-createcustomcurrencyresponse"></a>

### CreateCustomCurrencyResponse

```json
BadRequestError
```

[Visual: GqlTypeList. View on the HTML page.](https://fragment.dev/api-reference/ledger-types)

<a id="response-types-createcustomlinkresponse"></a>

### CreateCustomLinkResponse

```json
BadRequestError
```

[Visual: GqlTypeList. View on the HTML page.](https://fragment.dev/api-reference/ledger-types)

<a id="response-types-createledgeraccountresponse"></a>

### CreateLedgerAccountResponse

```json
BadRequestError
```

[Visual: GqlTypeList. View on the HTML page.](https://fragment.dev/api-reference/ledger-types)

<a id="response-types-createledgeraccountsresponse"></a>

### CreateLedgerAccountsResponse

```json
BadRequestError
```

[Visual: GqlTypeList. View on the HTML page.](https://fragment.dev/api-reference/ledger-types)

<a id="response-types-createledgerresponse"></a>

### CreateLedgerResponse

```json
BadRequestError
```

[Visual: GqlTypeList. View on the HTML page.](https://fragment.dev/api-reference/ledger-types)

<a id="response-types-createpaymentmethodsetupresponse"></a>

### CreatePaymentMethodSetupResponse

```json
BadRequestError
```

[Visual: GqlTypeList. View on the HTML page.](https://fragment.dev/api-reference/ledger-types)

<a id="response-types-createpaymentresponse"></a>

### CreatePaymentResponse

```json
BadRequestError
```

[Visual: GqlTypeList. View on the HTML page.](https://fragment.dev/api-reference/ledger-types)

<a id="response-types-deletecustomtxsresponse"></a>

### DeleteCustomTxsResponse

```json
BadRequestError
```

[Visual: GqlTypeList. View on the HTML page.](https://fragment.dev/api-reference/ledger-types)

<a id="response-types-deleteledgerresponse"></a>

### DeleteLedgerResponse

```json
BadRequestError
```

[Visual: GqlTypeList. View on the HTML page.](https://fragment.dev/api-reference/ledger-types)

<a id="response-types-deletepaymentmethodresponse"></a>

### DeletePaymentMethodResponse

```json
BadRequestError
```

[Visual: GqlTypeList. View on the HTML page.](https://fragment.dev/api-reference/ledger-types)

<a id="response-types-deleteschemaresponse"></a>

### DeleteSchemaResponse

```json
BadRequestError
```

[Visual: GqlTypeList. View on the HTML page.](https://fragment.dev/api-reference/ledger-types)

<a id="response-types-instantiateledgeraccountresponse"></a>

### InstantiateLedgerAccountResponse

```json
BadRequestError
```

[Visual: GqlTypeList. View on the HTML page.](https://fragment.dev/api-reference/ledger-types)

<a id="response-types-migrateledgerentryresponse"></a>

### MigrateLedgerEntryResponse

```json
BadRequestError
```

[Visual: GqlTypeList. View on the HTML page.](https://fragment.dev/api-reference/ledger-types)

<a id="response-types-reconciletxresponse"></a>

### ReconcileTxResponse

```json
BadRequestError
```

[Visual: GqlTypeList. View on the HTML page.](https://fragment.dev/api-reference/ledger-types)

<a id="response-types-refundpaymentresponse"></a>

### RefundPaymentResponse

```json
BadRequestError
```

[Visual: GqlTypeList. View on the HTML page.](https://fragment.dev/api-reference/ledger-types)

<a id="response-types-reverseledgerentryresponse"></a>

### ReverseLedgerEntryResponse

```json
BadRequestError
```

[Visual: GqlTypeList. View on the HTML page.](https://fragment.dev/api-reference/ledger-types)

<a id="response-types-storeschemaresponse"></a>

### StoreSchemaResponse

Returned by the [storeSchema](https://fragment.dev/markdown/api-reference/ledger-mutations.md#storeschema) mutation.

```json
BadRequestError
```

[Visual: GqlTypeList. View on the HTML page.](https://fragment.dev/api-reference/ledger-types)

<a id="response-types-synccustomaccountsresponse"></a>

### SyncCustomAccountsResponse

```json
BadRequestError
```

[Visual: GqlTypeList. View on the HTML page.](https://fragment.dev/api-reference/ledger-types)

<a id="response-types-synccustomtxsresponse"></a>

### SyncCustomTxsResponse

```json
BadRequestError
```

[Visual: GqlTypeList. View on the HTML page.](https://fragment.dev/api-reference/ledger-types)

<a id="response-types-updateledgeraccountresponse"></a>

### UpdateLedgerAccountResponse

```json
BadRequestError
```

[Visual: GqlTypeList. View on the HTML page.](https://fragment.dev/api-reference/ledger-types)

<a id="response-types-updateledgerentryresponse"></a>

### UpdateLedgerEntryResponse

```json
BadRequestError
```

[Visual: GqlTypeList. View on the HTML page.](https://fragment.dev/api-reference/ledger-types)

<a id="response-types-updateledgerresponse"></a>

### UpdateLedgerResponse

```json
BadRequestError
```

[Visual: GqlTypeList. View on the HTML page.](https://fragment.dev/api-reference/ledger-types)

<a id="result-types"></a>

## Result Types

<a id="result-types-addledgerentriesresult"></a>

### AddLedgerEntriesResult

```json
{"results": [AddLedgerEntryResult]}
```

- **results** ([[AddLedgerEntryResult!]!](https://fragment.dev/markdown/api-reference/ledger-types.md#result-types-addledgerentryresult))

  The added Ledger Entries, in the same order as the input

<a id="result-types-addledgerentryresult"></a>

### AddLedgerEntryResult

```json
{
  "entry": LedgerEntry,
  "isIkReplay": true,
  "lines": [LedgerLine]
}
```

- **entry** ([LedgerEntry!](https://fragment.dev/markdown/api-reference/ledger-types.md#core-types-ledgerentry))

  The ledger entry that was posted

- **isIkReplay** ([Boolean!](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-boolean))

  True if this request successfully completed before and the previous response is being returned

- **lines** ([[LedgerLine!]!](https://fragment.dev/markdown/api-reference/ledger-types.md#core-types-ledgerline))

  The ledger lines that were created in that entry

<a id="result-types-createcustomcurrencyresult"></a>

### CreateCustomCurrencyResult

```json
{"customCurrency": Currency}
```

- **customCurrency** ([Currency!](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-currency))

  The Currency that was created.

<a id="result-types-createcustomlinkresult"></a>

### CreateCustomLinkResult

```json
{"isIkReplay": true, "link": CustomLink}
```

- **isIkReplay** ([Boolean!](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-boolean))

- **link** ([CustomLink!](https://fragment.dev/markdown/api-reference/ledger-types.md#utility-types-customlink))

  The custom link that was created. Represents an instance of an external system.

<a id="result-types-createledgeraccountresult"></a>

### CreateLedgerAccountResult

```json
{"isIkReplay": true, "ledgerAccount": LedgerAccount}
```

- **isIkReplay** ([Boolean!](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-boolean))

  true if a previous request successfully created this ledger account

- **ledgerAccount** ([LedgerAccount!](https://fragment.dev/markdown/api-reference/ledger-types.md#core-types-ledgeraccount))

  The ledger account that was created

<a id="result-types-createledgeraccountsresult"></a>

### CreateLedgerAccountsResult

```json
{
  "ikReplays": [IkReplay],
  "ledgerAccounts": [LedgerAccount]
}
```

- **ikReplays** ([[IkReplay!]!](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-ikreplay))

  Whether the ledger accounts were successfully created by a previous request

- **ledgerAccounts** ([[LedgerAccount!]!](https://fragment.dev/markdown/api-reference/ledger-types.md#core-types-ledgeraccount))

  The ledger accounts that were created

<a id="result-types-createledgerresult"></a>

### CreateLedgerResult

```json
{"isIkReplay": true, "ledger": Ledger}
```

- **isIkReplay** ([Boolean!](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-boolean))

  true if this request successfully completed before and the previous response is being returned

- **ledger** ([Ledger!](https://fragment.dev/markdown/api-reference/ledger-types.md#core-types-ledger))

  The Ledger that was created

<a id="result-types-createpaymentmethodsetupresult"></a>

### CreatePaymentMethodSetupResult

The created Payment Method Setup.

```json
{
  "isIkReplay": true,
  "paymentMethodSetup": PaymentMethodSetup
}
```

- **isIkReplay** ([Boolean!](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-boolean))

  Whether an earlier call with the same `ik` created this Payment Method Setup.

- **paymentMethodSetup** ([PaymentMethodSetup!](https://fragment.dev/markdown/api-reference/ledger-types.md#core-types-paymentmethodsetup))

  The Payment Method Setup that was created.

<a id="result-types-createpaymentresult"></a>

### CreatePaymentResult

The created Payment.

```json
{"isIkReplay": true, "payment": Payment}
```

- **isIkReplay** ([Boolean!](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-boolean))

  Whether an earlier call with the same `ik` created this Payment.

- **payment** ([Payment!](https://fragment.dev/markdown/api-reference/ledger-types.md#core-types-payment))

  The Payment that was created.

<a id="result-types-deletecustomtxsresult"></a>

### DeleteCustomTxsResult

```json
{"txs": [DeletedCustomTx]}
```

- **txs** ([[DeletedCustomTx!]!](https://fragment.dev/markdown/api-reference/ledger-types.md#result-types-deletedcustomtx))

  List of Txs deleted in this operation

<a id="result-types-deleteledgerresult"></a>

### DeleteLedgerResult

```json
{"success": true}
```

- **success** ([Boolean!](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-boolean))

<a id="result-types-deletepaymentmethodresult"></a>

### DeletePaymentMethodResult

The result of deleting a Payment Method.

```json
{"success": true}
```

- **success** ([Boolean!](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-boolean))

  Whether the Payment Method was deleted.

<a id="result-types-deleteschemaresult"></a>

### DeleteSchemaResult

```json
{"success": true}
```

- **success** ([Boolean!](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-boolean))

<a id="result-types-deletedcustomtx"></a>

### DeletedCustomTx

```json
{"tx": Tx}
```

- **tx** ([Tx!](https://fragment.dev/markdown/api-reference/ledger-types.md#core-types-tx))

  A deleted Tx

<a id="result-types-instantiateledgeraccountresult"></a>

### InstantiateLedgerAccountResult

```json
{"ledgerAccount": LedgerAccount}
```

- **ledgerAccount** ([LedgerAccount!](https://fragment.dev/markdown/api-reference/ledger-types.md#core-types-ledgeraccount))

  The instantiated Ledger Account.

<a id="result-types-migrateledgerentryresult"></a>

### MigrateLedgerEntryResult

```json
{
  "isIkReplay": true,
  "newLedgerEntry": LedgerEntry,
  "reversedLedgerEntry": LedgerEntry,
  "reversingLedgerEntry": LedgerEntry
}
```

- **isIkReplay** ([Boolean!](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-boolean))

  Whether this migration was an IK replay or not

- **newLedgerEntry** ([LedgerEntry!](https://fragment.dev/markdown/api-reference/ledger-types.md#core-types-ledgerentry))

  The new Ledger Entry posted as a result of the migration

- **reversedLedgerEntry** ([LedgerEntry!](https://fragment.dev/markdown/api-reference/ledger-types.md#core-types-ledgerentry))

  The Ledger Entry that was migrated

- **reversingLedgerEntry** ([LedgerEntry!](https://fragment.dev/markdown/api-reference/ledger-types.md#core-types-ledgerentry))

  The reversal Ledger Entry that was posted to reverse the Ledger Entry being migrated

<a id="result-types-reconciletxresult"></a>

### ReconcileTxResult

```json
{
  "entry": LedgerEntry,
  "isIkReplay": true,
  "lines": [LedgerLine]
}
```

- **entry** ([LedgerEntry!](https://fragment.dev/markdown/api-reference/ledger-types.md#core-types-ledgerentry))

  The ledger entry that was posted

- **isIkReplay** ([Boolean!](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-boolean))

  True if this request successfully completed before and the previous response is being returned

- **lines** ([[LedgerLine!]!](https://fragment.dev/markdown/api-reference/ledger-types.md#core-types-ledgerline))

  The ledger lines that were created in that entry

<a id="result-types-refundpaymentresult"></a>

### RefundPaymentResult

The created Payment Refund.

```json
{
  "isIkReplay": true,
  "payment": Payment,
  "refund": PaymentRefund
}
```

- **isIkReplay** ([Boolean!](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-boolean))

  Whether an earlier call with the same `ik` created this Payment Refund.

- **payment** ([Payment!](https://fragment.dev/markdown/api-reference/ledger-types.md#core-types-payment))

  The Payment after reserving the refund amount.

- **refund** ([PaymentRefund!](https://fragment.dev/markdown/api-reference/ledger-types.md#core-types-paymentrefund))

  The created Payment Refund.

<a id="result-types-reverseledgerentryresult"></a>

### ReverseLedgerEntryResult

```json
{
  "isIkReplay": true,
  "reversedLedgerEntry": LedgerEntry,
  "reversingLedgerEntry": LedgerEntry
}
```

- **isIkReplay** ([Boolean!](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-boolean))

  Whether the reversal was an IK replay

- **reversedLedgerEntry** ([LedgerEntry!](https://fragment.dev/markdown/api-reference/ledger-types.md#core-types-ledgerentry))

  The Ledger Entry that was reversed

- **reversingLedgerEntry** ([LedgerEntry!](https://fragment.dev/markdown/api-reference/ledger-types.md#core-types-ledgerentry))

  The reversal Ledger Entry that was created

<a id="result-types-storeschemaresult"></a>

### StoreSchemaResult

StoreSchemaResult represents a successful execution of storeSchema.

```json
{"schema": Schema}
```

- **schema** ([Schema!](https://fragment.dev/markdown/api-reference/ledger-types.md#core-types-schema))

  The Schema that was stored as a result of calling `storeSchema`.

<a id="result-types-synccustomaccountsresult"></a>

### SyncCustomAccountsResult

```json
{"accounts": [ExternalAccount]}
```

- **accounts** ([[ExternalAccount!]!](https://fragment.dev/markdown/api-reference/ledger-types.md#core-types-externalaccount))

  The external accounts that were synced.

<a id="result-types-synccustomtxsresult"></a>

### SyncCustomTxsResult

```json
{"txs": [Tx]}
```

- **txs** ([[Tx!]!](https://fragment.dev/markdown/api-reference/ledger-types.md#core-types-tx))

<a id="result-types-updateledgeraccountresult"></a>

### UpdateLedgerAccountResult

```json
{"ledgerAccount": LedgerAccount}
```

- **ledgerAccount** ([LedgerAccount!](https://fragment.dev/markdown/api-reference/ledger-types.md#core-types-ledgeraccount))

  The ledger account that was updated

<a id="result-types-updateledgerentryresult"></a>

### UpdateLedgerEntryResult

```json
{"entry": LedgerEntry}
```

- **entry** ([LedgerEntry!](https://fragment.dev/markdown/api-reference/ledger-types.md#core-types-ledgerentry))

  The Ledger Entry that was updated.

<a id="result-types-updateledgerresult"></a>

### UpdateLedgerResult

```json
{"ledger": Ledger}
```

- **ledger** ([Ledger!](https://fragment.dev/markdown/api-reference/ledger-types.md#core-types-ledger))

  The updated Ledger.

<a id="error-types"></a>

## Error Types

<a id="error-types-addledgerentrieserror"></a>

### AddLedgerEntriesError

Error returned when one or more Ledger Entries in the batch could not be added.

```json
{
  "code": "abc123",
  "errors": [AddLedgerEntryError],
  "message": "abc123",
  "retryable": true
}
```

- **code** ([String!](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-string))

  The status code of error. For example, 'ledger_entry_batch_operation_failed'.

- **errors** ([[AddLedgerEntryError!]!](https://fragment.dev/markdown/api-reference/ledger-types.md#error-types-addledgerentryerror))

  The list of errors for each Ledger Entry that was responsible for the batch's failure.

- **message** ([String!](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-string))

  The error message

- **retryable** ([Boolean!](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-boolean))

  Whether or not the operation is retryable

<a id="error-types-addledgerentryerror"></a>

### AddLedgerEntryError

Error details for a single Ledger Entry that was responsible for the batch's failure.

```json
{
  "code": "abc123",
  "ik": "some-safe-string-ik",
  "message": "abc123",
  "retryable": true
}
```

- **code** ([String!](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-string))

  The status code of error. For example, 'ledger_entry_too_many_lines'.

- **ik** ([SafeString!](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-safestring))

  The [Idempotency Key](https://fragment.dev/markdown/api-reference/ledger-overview.md#idempotency) of the Ledger Entry

- **message** ([String!](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-string))

  The error message

- **retryable** ([Boolean!](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-boolean))

  Whether or not the operation is retryable

<a id="error-types-badrequesterror"></a>

### BadRequestError

Equivalent to an HTTP 400 - request either has missing or incorrect data

```json
{"code": "abc123", "message": "abc123", "retryable": true}
```

- **code** ([String!](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-string))

  The status code of error. For example, 'ledger_not_found'.

- **message** ([String!](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-string))

  The error message

- **retryable** ([Boolean!](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-boolean))

  Whether or not the operation is retryable

<a id="error-types-error"></a>

### Error

Base error interface

```json
{"code": "abc123", "message": "abc123", "retryable": true}
```

- **code** ([String!](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-string))

  The status code of error. For example, 'ledger_not_found'.

- **message** ([String!](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-string))

  The error message

- **retryable** ([Boolean!](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-boolean))

  Whether or not the operation is retryable

<a id="error-types-internalerror"></a>

### InternalError

Equivalent to an HTTP 5XX - something went wrong with our API.

```json
{"code": "abc123", "message": "abc123", "retryable": true}
```

- **code** ([String!](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-string))

  The status code of error. For example, 'ledger_not_found'.

- **message** ([String!](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-string))

  The error message

- **retryable** ([Boolean!](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-boolean))

  Whether or not the operation is retryable

<a id="connection-types"></a>

## Connection Types

<a id="connection-types-balancechangeduringconnection"></a>

### BalanceChangeDuringConnection

A paginated list of amounts and their periods

```json
{
  "endTime": "2021-07",
  "granularity": "daily",
  "nodes": [BalanceChangeDuring],
  "pageInfo": PageInfo,
  "startTime": "2021-05"
}
```

- **endTime** ([LastMoment!](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-lastmoment))

  The end time of the period across which the balance changes are requested

- **granularity** ([Granularity!](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-granularity))

  The granularity of the return data

- **nodes** ([[BalanceChangeDuring!]!](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-balancechangeduring))

  The current page of results

- **pageInfo** ([PageInfo!](https://fragment.dev/markdown/api-reference/ledger-types.md#connection-types-pageinfo))

  The [pagination info](https://fragment.dev/markdown/api-reference/ledger-types.md#connection-types-pageinfo) for this list

- **startTime** ([FirstMoment!](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-firstmoment))

  The start time of the period across which the balance changes are requested

<a id="connection-types-currencyamountconnection"></a>

### CurrencyAmountConnection

A paginated list of amounts with their currencies

```json
{
  "nodes": [CurrencyAmount],
  "pageInfo": PageInfo
}
```

- **nodes** ([[CurrencyAmount!]!](https://fragment.dev/markdown/api-reference/ledger-types.md#utility-types-currencyamount))

  The current page of results

- **pageInfo** ([PageInfo!](https://fragment.dev/markdown/api-reference/ledger-types.md#connection-types-pageinfo))

  The [pagination info](https://fragment.dev/markdown/api-reference/ledger-types.md#connection-types-pageinfo) for this list

<a id="connection-types-customcurrenciesconnection"></a>

### CustomCurrenciesConnection

A paginated list of Custom Currencies

```json
{
  "nodes": [Currency],
  "pageInfo": PageInfo
}
```

- **nodes** ([[Currency!]!](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-currency))

  The current page of results

- **pageInfo** ([PageInfo!](https://fragment.dev/markdown/api-reference/ledger-types.md#connection-types-pageinfo))

  The [pagination info](https://fragment.dev/markdown/api-reference/ledger-types.md#connection-types-pageinfo) for this list

<a id="connection-types-externalaccountsconnection"></a>

### ExternalAccountsConnection

A paginated list of External Accounts

```json
{
  "nodes": [ExternalAccount],
  "pageInfo": PageInfo
}
```

- **nodes** ([[ExternalAccount!]!](https://fragment.dev/markdown/api-reference/ledger-types.md#core-types-externalaccount))

  The current page of results

- **pageInfo** ([PageInfo!](https://fragment.dev/markdown/api-reference/ledger-types.md#connection-types-pageinfo))

  The [pagination info](https://fragment.dev/markdown/api-reference/ledger-types.md#connection-types-pageinfo) for this list

<a id="connection-types-historicalbalanceconnection"></a>

### HistoricalBalanceConnection

A paginated list of amounts and their periods

```json
{
  "endTime": "2021-07",
  "granularity": "daily",
  "nodes": [HistoricalBalance],
  "pageInfo": PageInfo,
  "startTime": "2021-05"
}
```

- **endTime** ([LastMoment!](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-lastmoment))

  The end time of the period across which the balance changes are requested

- **granularity** ([Granularity!](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-granularity))

  The granularity of the return data

- **nodes** ([[HistoricalBalance!]!](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-historicalbalance))

  The current page of results

- **pageInfo** ([PageInfo!](https://fragment.dev/markdown/api-reference/ledger-types.md#connection-types-pageinfo))

  The [pagination info](https://fragment.dev/markdown/api-reference/ledger-types.md#connection-types-pageinfo) for this list

- **startTime** ([FirstMoment!](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-firstmoment))

  The start time of the period across which the balance changes are requested

<a id="connection-types-ledgeraccountdatamigrationconnection"></a>

### LedgerAccountDataMigrationConnection

```json
{
  "nodes": [LedgerAccountDataMigration],
  "pageInfo": PageInfo
}
```

- **nodes** ([[LedgerAccountDataMigration!]!](https://fragment.dev/markdown/api-reference/ledger-types.md#utility-types-ledgeraccountdatamigration))

  The current page of results

- **pageInfo** ([PageInfo!](https://fragment.dev/markdown/api-reference/ledger-types.md#connection-types-pageinfo))

  Pagination info for this list.

<a id="connection-types-ledgeraccountsconnection"></a>

### LedgerAccountsConnection

A paginated list of Ledger Accounts

```json
{
  "nodes": [LedgerAccount],
  "pageInfo": PageInfo
}
```

- **nodes** ([[LedgerAccount!]!](https://fragment.dev/markdown/api-reference/ledger-types.md#core-types-ledgeraccount))

  The current page of results

- **pageInfo** ([PageInfo!](https://fragment.dev/markdown/api-reference/ledger-types.md#connection-types-pageinfo))

  The [pagination info](https://fragment.dev/markdown/api-reference/ledger-types.md#connection-types-pageinfo) for this list

<a id="connection-types-ledgerdatamigrationhistoryconnection"></a>

### LedgerDataMigrationHistoryConnection

A paginated list of migration history entries.

```json
{
  "nodes": [LedgerDataMigrationHistoryEntry],
  "pageInfo": PageInfo
}
```

- **nodes** ([[LedgerDataMigrationHistoryEntry!]!](https://fragment.dev/markdown/api-reference/ledger-types.md#utility-types-ledgerdatamigrationhistoryentry))

  The current page of results

- **pageInfo** ([PageInfo!](https://fragment.dev/markdown/api-reference/ledger-types.md#connection-types-pageinfo))

  Pagination info for this list.

<a id="connection-types-ledgerentriesconnection"></a>

### LedgerEntriesConnection

A paginated list of Ledger Entries

```json
{
  "nodes": [LedgerEntry],
  "pageInfo": PageInfo
}
```

- **nodes** ([[LedgerEntry!]!](https://fragment.dev/markdown/api-reference/ledger-types.md#core-types-ledgerentry))

  The current page of results

- **pageInfo** ([PageInfo!](https://fragment.dev/markdown/api-reference/ledger-types.md#connection-types-pageinfo))

  The [pagination info](https://fragment.dev/markdown/api-reference/ledger-types.md#connection-types-pageinfo) for this list

<a id="connection-types-ledgerentrydatamigrationconnection"></a>

### LedgerEntryDataMigrationConnection

```json
{
  "nodes": [LedgerEntryDataMigration],
  "pageInfo": PageInfo
}
```

- **nodes** ([[LedgerEntryDataMigration!]!](https://fragment.dev/markdown/api-reference/ledger-types.md#utility-types-ledgerentrydatamigration))

  The current page of results

- **pageInfo** ([PageInfo!](https://fragment.dev/markdown/api-reference/ledger-types.md#connection-types-pageinfo))

  Pagination info for this list.

<a id="connection-types-ledgerentrygroupbalanceconnection"></a>

### LedgerEntryGroupBalanceConnection

A set of balance changes for a specific Ledger Entry Group.

```json
{
  "nodes": [LedgerEntryGroupBalance],
  "pageInfo": PageInfo
}
```

- **nodes** ([[LedgerEntryGroupBalance!]!](https://fragment.dev/markdown/api-reference/ledger-types.md#utility-types-ledgerentrygroupbalance))

- **pageInfo** ([PageInfo!](https://fragment.dev/markdown/api-reference/ledger-types.md#connection-types-pageinfo))

<a id="connection-types-ledgerentrygroupsconnection"></a>

### LedgerEntryGroupsConnection

A paginated list of Ledger Entry Groups

```json
{
  "nodes": [LedgerEntryGroup],
  "pageInfo": PageInfo
}
```

- **nodes** ([[LedgerEntryGroup!]!](https://fragment.dev/markdown/api-reference/ledger-types.md#utility-types-ledgerentrygroup))

  The current page of results

- **pageInfo** ([PageInfo!](https://fragment.dev/markdown/api-reference/ledger-types.md#connection-types-pageinfo))

  Pagination info for this list.

<a id="connection-types-ledgerentrystatsconnection"></a>

### LedgerEntryStatsConnection

A paginated list of Ledger Entry Stats

```json
{
  "nodes": [LedgerEntryStats],
  "pageInfo": PageInfo
}
```

- **nodes** ([[LedgerEntryStats!]!](https://fragment.dev/markdown/api-reference/ledger-types.md#utility-types-ledgerentrystats))

  The current page of results

- **pageInfo** ([PageInfo!](https://fragment.dev/markdown/api-reference/ledger-types.md#connection-types-pageinfo))

  Pagination info for this list.

<a id="connection-types-ledgerlinesconnection"></a>

### LedgerLinesConnection

A paginated list of Ledger Lines

```json
{
  "nodes": [LedgerLine],
  "pageInfo": PageInfo
}
```

- **nodes** ([[LedgerLine!]!](https://fragment.dev/markdown/api-reference/ledger-types.md#core-types-ledgerline))

  The current page of results

- **pageInfo** ([PageInfo!](https://fragment.dev/markdown/api-reference/ledger-types.md#connection-types-pageinfo))

  The [pagination info](https://fragment.dev/markdown/api-reference/ledger-types.md#connection-types-pageinfo) for this list

<a id="connection-types-ledgermigrationconnection"></a>

### LedgerMigrationConnection

A paginated list of Ledger Migrations

```json
{
  "nodes": [LedgerMigration],
  "pageInfo": PageInfo
}
```

- **nodes** ([[LedgerMigration!]!](https://fragment.dev/markdown/api-reference/ledger-types.md#core-types-ledgermigration))

  The current page of results

- **pageInfo** ([PageInfo!](https://fragment.dev/markdown/api-reference/ledger-types.md#connection-types-pageinfo))

  Pagination info for this list.

<a id="connection-types-ledgersconnection"></a>

### LedgersConnection

A paginated list of Ledgers

```json
{
  "nodes": [Ledger],
  "pageInfo": PageInfo
}
```

- **nodes** ([[Ledger!]!](https://fragment.dev/markdown/api-reference/ledger-types.md#core-types-ledger))

  The current page of results

- **pageInfo** ([PageInfo!](https://fragment.dev/markdown/api-reference/ledger-types.md#connection-types-pageinfo))

  The [pagination info](https://fragment.dev/markdown/api-reference/ledger-types.md#connection-types-pageinfo) for this list

<a id="connection-types-linksconnection"></a>

### LinksConnection

A paginated list of Links

```json
{
  "nodes": [Link],
  "pageInfo": PageInfo
}
```

- **nodes** ([[Link!]!](https://fragment.dev/markdown/api-reference/ledger-types.md#core-types-link))

  The current page of results

- **pageInfo** ([PageInfo!](https://fragment.dev/markdown/api-reference/ledger-types.md#connection-types-pageinfo))

  The [pagination info](https://fragment.dev/markdown/api-reference/ledger-types.md#connection-types-pageinfo) for this list

<a id="connection-types-pageinfo"></a>

### PageInfo

An object containing [pagination](https://fragment.dev/markdown/guides/query-data.md#basics-pagination) details.

```json
{
  "endCursor": "abc123",
  "hasNextPage": true,
  "hasPreviousPage": true,
  "startCursor": "abc123"
}
```

- **endCursor** ([String](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-string))

- **hasNextPage** ([Boolean!](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-boolean))

- **hasPreviousPage** ([Boolean!](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-boolean))

- **startCursor** ([String](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-string))

<a id="connection-types-paymentattemptsconnection"></a>

### PaymentAttemptsConnection

A paginated list of Payment attempts.

```json
{
  "nodes": [PaymentAttempt],
  "pageInfo": PageInfo
}
```

- **nodes** ([[PaymentAttempt!]!](https://fragment.dev/markdown/api-reference/ledger-types.md#utility-types-paymentattempt))

  The current page of results.

- **pageInfo** ([PageInfo!](https://fragment.dev/markdown/api-reference/ledger-types.md#connection-types-pageinfo))

  The pagination info for this list.

<a id="connection-types-paymenteventsconnection"></a>

### PaymentEventsConnection

A paginated list of Payment events.

```json
{
  "nodes": [PaymentEvent],
  "pageInfo": PageInfo
}
```

- **nodes** ([[PaymentEvent!]!](https://fragment.dev/markdown/api-reference/ledger-types.md#utility-types-paymentevent))

  The current page of results.

- **pageInfo** ([PageInfo!](https://fragment.dev/markdown/api-reference/ledger-types.md#connection-types-pageinfo))

  The pagination info for this list.

<a id="connection-types-paymentmethodsconnection"></a>

### PaymentMethodsConnection

A list of Payment Methods, all in one page.

```json
{
  "nodes": [PaymentMethod],
  "pageInfo": PageInfo
}
```

- **nodes** ([[PaymentMethod!]!](https://fragment.dev/markdown/api-reference/ledger-types.md#utility-types-paymentmethod))

  Every Payment Method in the list.

- **pageInfo** ([PageInfo!](https://fragment.dev/markdown/api-reference/ledger-types.md#connection-types-pageinfo))

  The pagination info for this list. It never reports another page.

<a id="connection-types-paymentsconnection"></a>

### PaymentsConnection

A paginated list of Payments.

```json
{
  "nodes": [Payment],
  "pageInfo": PageInfo
}
```

- **nodes** ([[Payment!]!](https://fragment.dev/markdown/api-reference/ledger-types.md#core-types-payment))

  The current page of results.

- **pageInfo** ([PageInfo!](https://fragment.dev/markdown/api-reference/ledger-types.md#connection-types-pageinfo))

  The pagination info for this list.

<a id="connection-types-schemaconnection"></a>

### SchemaConnection

A paginated list of Schemas in a Workspace.

```json
{
  "nodes": [Schema],
  "pageInfo": PageInfo
}
```

- **nodes** ([[Schema!]!](https://fragment.dev/markdown/api-reference/ledger-types.md#core-types-schema))

  The current page of results

- **pageInfo** ([PageInfo!](https://fragment.dev/markdown/api-reference/ledger-types.md#connection-types-pageinfo))

  Pagination info for this list.

<a id="connection-types-schemaversionconnection"></a>

### SchemaVersionConnection

A paginated list of SchemaVersions for a given Schema.

```json
{
  "nodes": [SchemaVersion],
  "pageInfo": PageInfo
}
```

- **nodes** ([[SchemaVersion!]!](https://fragment.dev/markdown/api-reference/ledger-types.md#utility-types-schemaversion))

  The current page of results

- **pageInfo** ([PageInfo!](https://fragment.dev/markdown/api-reference/ledger-types.md#connection-types-pageinfo))

  Pagination info for this list.

<a id="connection-types-txsconnection"></a>

### TxsConnection

A paginated list of Txs

```json
{
  "nodes": [Tx],
  "pageInfo": PageInfo
}
```

- **nodes** ([[Tx!]!](https://fragment.dev/markdown/api-reference/ledger-types.md#core-types-tx))

  The current page of results

- **pageInfo** ([PageInfo!](https://fragment.dev/markdown/api-reference/ledger-types.md#connection-types-pageinfo))

  The [pagination info](https://fragment.dev/markdown/api-reference/ledger-types.md#connection-types-pageinfo) for this list

<a id="filter-types"></a>

## Filter Types

<a id="filter-types-agingclearingaccountsfilterset"></a>

### AgingClearingAccountsFilterSet

Filters for pending clearing accounts.

```json
{"path": StringMatchFilter}
```

- **path** ([StringMatchFilter](https://fragment.dev/markdown/api-reference/ledger-types.md#filter-types-stringmatchfilter))

  Account path filter, with the same wildcard rules as LedgerAccountsFilterSet.path.

<a id="filter-types-currencyfilter"></a>

### CurrencyFilter

```json
{
  "equalTo": CurrencyMatchInput,
  "in": [CurrencyMatchInput]
}
```

- **equalTo** ([CurrencyMatchInput](https://fragment.dev/markdown/api-reference/ledger-types.md#matchinput-types-currencymatchinput))

  Must match the value provided

- **in** ([[CurrencyMatchInput!]](https://fragment.dev/markdown/api-reference/ledger-types.md#matchinput-types-currencymatchinput))

  Must match one of the values provided. Limited to 100 items maximum.

<a id="filter-types-datefilter"></a>

### DateFilter

```json
{
  "equalTo": "2022-03-28",
  "in": ["2022-03-28"],
  "within": "2022-03",
  "withinBalanceUTCOffset": "2022-03"
}
```

- **equalTo** ([Date](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-date))

- **in** ([[Date!]](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-date))

  Must match one of the values provided. Limited to 100 items maximum.

- **within** ([PeriodFilter](https://fragment.dev/markdown/api-reference/ledger-types.md#filter-types-periodfilter))

  Must fall within the given period. Supports a year (e.g. "2026") or a month (e.g. "2026-05"). To match a specific day, use `equalTo`. Cannot be combined with `withinBalanceUTCOffset`.

- **withinBalanceUTCOffset** ([PeriodFilter](https://fragment.dev/markdown/api-reference/ledger-types.md#filter-types-periodfilter))

  Must fall within the given period, taking into account the Ledger's `balanceUTCOffset`. Supports a year (e.g. "2026") or a month (e.g. "2026-05"). Cannot be combined with `within`.

<a id="filter-types-datetimefilter"></a>

### DateTimeFilter

Filters a timestamp field between two moments in time

```json
{"after": "2007-12-03T10:15:30Z", "before": "2007-12-03T10:15:30Z"}
```

- **after** ([DateTime](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-datetime))

  The timestamp value must be after this moment. Specified in ISO 8601 format e.g "1968-01-01T16:45:00Z"

- **before** ([DateTime](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-datetime))

  The timestamp value must be before this moment. Specified in ISO 8601 format e.g "1968-01-01T16:45:00Z"

<a id="filter-types-emailfilter"></a>

### EmailFilter

```json
{"equalTo": "abc123"}
```

- **equalTo** ([String!](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-string))

<a id="filter-types-externalaccountfilter"></a>

### ExternalAccountFilter

```json
{
  "equalTo": ExternalAccountMatchInput,
  "in": [ExternalAccountMatchInput]
}
```

- **equalTo** ([ExternalAccountMatchInput](https://fragment.dev/markdown/api-reference/ledger-types.md#matchinput-types-externalaccountmatchinput))

  Ledger Account must linked to the the specified external account

- **in** ([[ExternalAccountMatchInput!]](https://fragment.dev/markdown/api-reference/ledger-types.md#matchinput-types-externalaccountmatchinput))

  Ledger Account can be linked to any of the specified external accounts. Limited to 100 items maximum.

<a id="filter-types-groupbalanceaccountfilter"></a>

### GroupBalanceAccountFilter

A filter to query balances of a specific subset of accounts

```json
{
  "id": StringFilter,
  "path": StringMatchFilter
}
```

- **id** ([StringFilter](https://fragment.dev/markdown/api-reference/ledger-types.md#filter-types-stringfilter))

  A filter that must match the account ID

- **path** ([StringMatchFilter](https://fragment.dev/markdown/api-reference/ledger-types.md#filter-types-stringmatchfilter))

  A filter that must match the account path. Wildcards ('*') may be used only for template variables, and will only match a single variable each.

<a id="filter-types-groupfilter"></a>

### GroupFilter

Filter for finding entries by group membership

```json
{
  "all": [GroupMatchInput],
  "equalTo": GroupMatchInput,
  "in": [GroupMatchInput],
  "keyEqualTo": "some-safe-string-ik",
  "keyIn": ["some-safe-string-ik"],
  "notEqualTo": GroupMatchInput,
  "notIn": [GroupMatchInput],
  "notKeyEqualTo": "some-safe-string-ik",
  "notKeyIn": ["some-safe-string-ik"]
}
```

- **all** ([[GroupMatchInput!]](https://fragment.dev/markdown/api-reference/ledger-types.md#matchinput-types-groupmatchinput))

  Find entries that have ALL of the specified groups. Limited to 10 items maximum.

- **equalTo** ([GroupMatchInput](https://fragment.dev/markdown/api-reference/ledger-types.md#matchinput-types-groupmatchinput))

  Find groups that exactly match this group

- **in** ([[GroupMatchInput!]](https://fragment.dev/markdown/api-reference/ledger-types.md#matchinput-types-groupmatchinput))

  Find groups that match any of these groups

- **keyEqualTo** ([SafeString](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-safestring))

  Find groups with a specific key

- **keyIn** ([[SafeString!]](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-safestring))

  Find groups with any of these keys

- **notEqualTo** ([GroupMatchInput](https://fragment.dev/markdown/api-reference/ledger-types.md#matchinput-types-groupmatchinput))

  Find groups that do not exactly match this group

- **notIn** ([[GroupMatchInput!]](https://fragment.dev/markdown/api-reference/ledger-types.md#matchinput-types-groupmatchinput))

  Find groups that do not match any of these groups

- **notKeyEqualTo** ([SafeString](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-safestring))

  Find groups that do not have a specific key

- **notKeyIn** ([[SafeString!]](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-safestring))

  Find groups that do not have any of these keys

<a id="filter-types-int96filter"></a>

### Int96Filter

```json
{
  "eq": "999999999999",
  "gte": "999999999999",
  "lte": "999999999999",
  "ne": "999999999999"
}
```

- **eq** ([Int96](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-int96))

  Must exactly equal this Int96 value

- **gte** ([Int96](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-int96))

  Must be greater than or equal to this Int96 value

- **lte** ([Int96](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-int96))

  Must be less than or equal to this Int96 value

- **ne** ([Int96](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-int96))

  Must not equal this Int96 value

<a id="filter-types-ledgeraccountclearingstatusfilter"></a>

### LedgerAccountClearingStatusFilter

```json
{"equalTo": "cleared"}
```

- **equalTo** ([LedgerAccountClearingStatus](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-ledgeraccountclearingstatus))

  Results must match the specified clearing account status

<a id="filter-types-ledgeraccountdatamigrationsfilterset"></a>

### LedgerAccountDataMigrationsFilterSet

```json
{"accountPath": StringFilter, "status": "active"}
```

- **accountPath** ([StringFilter](https://fragment.dev/markdown/api-reference/ledger-types.md#filter-types-stringfilter))

  Filter by Ledger Account path.

- **status** ([LedgerDataMigrationStatus](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-ledgerdatamigrationstatus))

  Filter by the status of the data migration.

<a id="filter-types-ledgeraccountfilter"></a>

### LedgerAccountFilter

```json
{
  "equalTo": LedgerAccountMatchInput,
  "in": [LedgerAccountMatchInput]
}
```

- **equalTo** ([LedgerAccountMatchInput](https://fragment.dev/markdown/api-reference/ledger-types.md#matchinput-types-ledgeraccountmatchinput))

  Result must match the specified Ledger Account

- **in** ([[LedgerAccountMatchInput!]](https://fragment.dev/markdown/api-reference/ledger-types.md#matchinput-types-ledgeraccountmatchinput))

  Results can match any of specified Ledger Accounts

<a id="filter-types-ledgeraccounttypefilter"></a>

### LedgerAccountTypeFilter

```json
{"equalTo": "asset", "in": ["asset"]}
```

- **equalTo** ([LedgerAccountTypes](https://fragment.dev/markdown/api-reference/ledger-types.md#utility-types-ledgeraccounttypes))

  Results must be of the specified Ledger Account type

- **in** ([[LedgerAccountTypes!]](https://fragment.dev/markdown/api-reference/ledger-types.md#utility-types-ledgeraccounttypes))

  Results can have any of the specified Ledger Account types

<a id="filter-types-ledgeraccountunreconciledtxsfilterset"></a>

### LedgerAccountUnreconciledTxsFilterSet

Filters for a ledger account's unreconciled transactions.

```json
{"posted": DateTimeFilter}
```

- **posted** ([DateTimeFilter](https://fragment.dev/markdown/api-reference/ledger-types.md#filter-types-datetimefilter))

  The transaction's posted timestamp. Bounds are inclusive; when both are supplied, before must be later than after.

<a id="filter-types-ledgeraccountsfilterset"></a>

### LedgerAccountsFilterSet

```json
{
  "clearingStatus": LedgerAccountClearingStatusFilter,
  "earliestPosted": DateTimeFilter,
  "hasParentLedgerAccount": true,
  "isLinkedAccount": true,
  "latestPosted": DateTimeFilter,
  "ledgerAccount": LedgerAccountFilter,
  "linkedAccount": ExternalAccountFilter,
  "parentLedgerAccount": LedgerAccountFilter,
  "path": StringMatchFilter,
  "type": LedgerAccountTypeFilter
}
```

- **clearingStatus** ([LedgerAccountClearingStatusFilter](https://fragment.dev/markdown/api-reference/ledger-types.md#filter-types-ledgeraccountclearingstatusfilter))

  Use this to filter Ledger Accounts by their clearing account status

- **earliestPosted** ([DateTimeFilter](https://fragment.dev/markdown/api-reference/ledger-types.md#filter-types-datetimefilter))

  Filter by the earliest posted timestamp across all currencies for clearing accounts. You must also provide clearingStatus in the same filter. Only clearing accounts where the minimum posted timestamp (across all currencies) matches this filter will be included.

- **hasParentLedgerAccount** ([Boolean](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-boolean))

  Use this to filter Ledger Accounts by their parent status

- **isLinkedAccount** ([Boolean](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-boolean))

  Use this to filter Ledger Accounts by their linked status

- **latestPosted** ([DateTimeFilter](https://fragment.dev/markdown/api-reference/ledger-types.md#filter-types-datetimefilter))

  Filter by the latest posted timestamp across all currencies for clearing accounts. You must also provide clearingStatus in the same filter. Only clearing accounts where the maximum posted timestamp (across all currencies) matches this filter will be included.

- **ledgerAccount** ([LedgerAccountFilter](https://fragment.dev/markdown/api-reference/ledger-types.md#filter-types-ledgeraccountfilter))

  Use this to filter Ledger Accounts by their ID or path

- **linkedAccount** ([ExternalAccountFilter](https://fragment.dev/markdown/api-reference/ledger-types.md#filter-types-externalaccountfilter))

  Use this to filter Ledger Accounts by their external linked account ID

- **parentLedgerAccount** ([LedgerAccountFilter](https://fragment.dev/markdown/api-reference/ledger-types.md#filter-types-ledgeraccountfilter))

  Use this to filter Ledger Accounts by their parent account IDs

- **path** ([StringMatchFilter](https://fragment.dev/markdown/api-reference/ledger-types.md#filter-types-stringmatchfilter))

  A filter that must match the account path. Wildcards (' *') may be used only for template variables, and will only match a single variable each. For example: 'assets-root/accounts-receivable/merchant:* ' would match: 'assets-root/accounts-receivable/merchant:1' and 'assets-root/accounts-receivable/merchant:1/child'. Wildcards may not be used outside of template variables. For example, passing in 'assets-root/*' as a filter is invalid and would raise a GraphQL error.

- **type** ([LedgerAccountTypeFilter](https://fragment.dev/markdown/api-reference/ledger-types.md#filter-types-ledgeraccounttypefilter))

  Use this to filter Ledger Accounts by their type

<a id="filter-types-ledgerentriesfilterset"></a>

### LedgerEntriesFilterSet

```json
{
  "date": DateFilter,
  "group": GroupFilter,
  "isReversal": true,
  "isReversed": true,
  "ledgerEntry": LedgerEntryFilter,
  "posted": DateTimeFilter,
  "showHidden": true,
  "tag": TagFilter,
  "type": StringFilter,
  "typeVersion": StringFilter
}
```

- **date** ([DateFilter](https://fragment.dev/markdown/api-reference/ledger-types.md#filter-types-datefilter))

  Use this filter to filter Ledger Entries by their `posted` date.

- **group** ([GroupFilter](https://fragment.dev/markdown/api-reference/ledger-types.md#filter-types-groupfilter))

  Use this to filter Ledger Entries by groups. The response will include entries that contain or do not contain specific groups.

- **isReversal** ([Boolean](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-boolean))

  Use this to filter Ledger Entries that were posted using `reverseLedgerEntry`.

- **isReversed** ([Boolean](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-boolean))

  Use this to filter Ledger Entries that have been reversed.

- **ledgerEntry** ([LedgerEntryFilter](https://fragment.dev/markdown/api-reference/ledger-types.md#filter-types-ledgerentryfilter))

  Use to filter Ledger Entries by their IDs or IKs.

- **posted** ([DateTimeFilter](https://fragment.dev/markdown/api-reference/ledger-types.md#filter-types-datetimefilter))

  Use this filter to filter Ledger Entries by their `posted` timestamp.

- **showHidden** ([Boolean](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-boolean))

  Use this filter to show hidden Ledger Entries.

- **tag** ([TagFilter](https://fragment.dev/markdown/api-reference/ledger-types.md#filter-types-tagfilter))

  Use this to filter Ledger Entries by tags. The response will include entries that contain tags matching the filter.

- **type** ([StringFilter](https://fragment.dev/markdown/api-reference/ledger-types.md#filter-types-stringfilter))

  Use this to filter Ledger Entries by type. Ledger Entry types are defined in Schemas.

- **typeVersion** ([StringFilter](https://fragment.dev/markdown/api-reference/ledger-types.md#filter-types-stringfilter))

  Use this to filter Ledger Entries by their type version.

<a id="filter-types-ledgerentrydatamigrationsfilterset"></a>

### LedgerEntryDataMigrationsFilterSet

```json
{
  "entryType": StringFilter,
  "status": "active",
  "typeVersion": StringFilter
}
```

- **entryType** ([StringFilter](https://fragment.dev/markdown/api-reference/ledger-types.md#filter-types-stringfilter))

  Filter by Ledger Entry type.

- **status** ([LedgerDataMigrationStatus](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-ledgerdatamigrationstatus))

  Filter by the status of the data migration.

- **typeVersion** ([StringFilter](https://fragment.dev/markdown/api-reference/ledger-types.md#filter-types-stringfilter))

  Filter by Ledger Entry type version.

<a id="filter-types-ledgerentryfilter"></a>

### LedgerEntryFilter

```json
{
  "equalTo": LedgerEntryMatchInput,
  "in": [LedgerEntryMatchInput]
}
```

- **equalTo** ([LedgerEntryMatchInput](https://fragment.dev/markdown/api-reference/ledger-types.md#matchinput-types-ledgerentrymatchinput))

  Result must be the specified Ledger Entry.

- **in** ([[LedgerEntryMatchInput!]](https://fragment.dev/markdown/api-reference/ledger-types.md#matchinput-types-ledgerentrymatchinput))

  Result can be any of the specified Ledger Entries. Limited to 100 items maximum.

<a id="filter-types-ledgerentrygroupbalancefilter"></a>

### LedgerEntryGroupBalanceFilter

Filter Ledger Entry Groups by their balance impact on a Ledger Account. If a group has a matching balance for the specified account, the group will be included in the results.

```json
{
  "account": GroupBalanceAccountFilter,
  "currency": CurrencyFilter,
  "ownBalance": Int96Filter
}
```

- **account** ([GroupBalanceAccountFilter!](https://fragment.dev/markdown/api-reference/ledger-types.md#filter-types-groupbalanceaccountfilter))

  A Ledger Entry Group will be included in the result if it has a balance for the specified account. If 'account' is the only filter specified, then any non-null balance in any currency will match.

- **currency** ([CurrencyFilter](https://fragment.dev/markdown/api-reference/ledger-types.md#filter-types-currencyfilter))

  A Ledger Entry Group will be included in the result if it has a balance for the specified account in the specified currency. If the 'ownBalance' filter is omitted then any non-null balance will match.

- **ownBalance** ([Int96Filter](https://fragment.dev/markdown/api-reference/ledger-types.md#filter-types-int96filter))

  A Ledger Entry Group will be included in the result if it has a balance for the specified account that passes the specified value predicate. If the 'currency' filter is omitted then any balance in any currency that passes the predicate will match. If the 'currency' filter is included, the value predicate will only be evaluated against the specified currency.

<a id="filter-types-ledgerentrygroupbalancefilterset"></a>

### LedgerEntryGroupBalanceFilterSet

Optional filters for querying balances on a Ledger Entry Group.

```json
{
  "account": GroupBalanceAccountFilter,
  "currency": CurrencyFilter,
  "ownBalance": Int96Filter
}
```

- **account** ([GroupBalanceAccountFilter](https://fragment.dev/markdown/api-reference/ledger-types.md#filter-types-groupbalanceaccountfilter))

  Filter to a subset of accounts

- **currency** ([CurrencyFilter](https://fragment.dev/markdown/api-reference/ledger-types.md#filter-types-currencyfilter))

  Filter to one or more currencies

- **ownBalance** ([Int96Filter](https://fragment.dev/markdown/api-reference/ledger-types.md#filter-types-int96filter))

  Filter to only balances in a certain range

<a id="filter-types-ledgerentrygroupsfilterset"></a>

### LedgerEntryGroupsFilterSet

```json
{
  "balance": LedgerEntryGroupBalanceFilter,
  "created": DateTimeFilter,
  "key": StringFilter,
  "value": StringFilter
}
```

- **balance** ([LedgerEntryGroupBalanceFilter](https://fragment.dev/markdown/api-reference/ledger-types.md#filter-types-ledgerentrygroupbalancefilter))

  Filter Ledger Entry Groups by their balance impact on a Ledger Account. If a group has a matching balance for the specified account, the group will be included in the results.

- **created** ([DateTimeFilter](https://fragment.dev/markdown/api-reference/ledger-types.md#filter-types-datetimefilter))

  Use to filter Ledger Entry Groups by their created timestamp

- **key** ([StringFilter](https://fragment.dev/markdown/api-reference/ledger-types.md#filter-types-stringfilter))

  Use to filter Ledger Entry Groups by their key

- **value** ([StringFilter](https://fragment.dev/markdown/api-reference/ledger-types.md#filter-types-stringfilter))

  Use to filter Ledger Entry Groups by their value

<a id="filter-types-ledgerlinesfilterset"></a>

### LedgerLinesFilterSet

```json
{
  "created": DateTimeFilter,
  "currency": CurrencyFilter,
  "date": DateFilter,
  "externalTxIds": ["abc123"],
  "isReversal": true,
  "isReversed": true,
  "key": StringFilter,
  "ledgerAccount": LedgerAccountFilter,
  "path": StringMatchFilter,
  "posted": DateTimeFilter,
  "showHidden": true,
  "tag": TagFilter,
  "type": TxTypeFilter
}
```

- **created** ([DateTimeFilter](https://fragment.dev/markdown/api-reference/ledger-types.md#filter-types-datetimefilter))

  Filter by the created timestamp of the Ledger Line. This is the wall-clock time when the Ledger Line was created.

- **currency** ([CurrencyFilter](https://fragment.dev/markdown/api-reference/ledger-types.md#filter-types-currencyfilter))

  Filter by the currency of the Ledger Line.

- **date** ([DateFilter](https://fragment.dev/markdown/api-reference/ledger-types.md#filter-types-datefilter))

  Use this filter to filter Ledger Lines by their `posted` date.

- **externalTxIds** ([[String!]](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-string))

  Filter Ledger Lines by the external IDs of their linked transactions. Only supported on `LedgerAccount.lines` for a linked Ledger Account.

- **isReversal** ([Boolean](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-boolean))

  Use this to filter Ledger Lines that were posted to this Ledger Account, using `reverseLedgerEntry`.

- **isReversed** ([Boolean](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-boolean))

  Use this to filter Ledger Lines that have been reversed.

- **key** ([StringFilter](https://fragment.dev/markdown/api-reference/ledger-types.md#filter-types-stringfilter))

  Use this to filter Ledger Lines by key. Ledger Line keys are defined in Schemas.

- **ledgerAccount** ([LedgerAccountFilter](https://fragment.dev/markdown/api-reference/ledger-types.md#filter-types-ledgeraccountfilter))

  Specify which Ledger Account to read lines from. Required when querying lines via `Ledger.lines` without a `path` filter. Not allowed when querying via `LedgerAccount.lines`.

- **path** ([StringMatchFilter](https://fragment.dev/markdown/api-reference/ledger-types.md#filter-types-stringmatchfilter))

  A filter that string matches the account path. Wildcards ('*') can be used to return lines across multiple accounts. To search for all instances of a a Ledger Account template, use the `matches` filter with an wildcard character in place of the template value e.g. `assets/user:*`. This returns lines from all instances of this template, interleaved by `posted` timestamp. To search for all descendant Ledger Accounts under a given path, use a trailing `/*` in the `matches` filter e.g. `assets/user:user-1>/*`. This returns lines from all descendants at any depth, but not lines from the parent account at `assets/user:user-1>`. To OR multiple `matches` patterns and get a single paginated list, use `matchesAny` — e.g. `matchesAny: ["assets/user:user-1/*", "assets/user:user-2/*"]` returns descendants of both prefixes interleaved by `posted` timestamp. Cannot be combined with `ledgerAccount` filter. Not allowed when querying via `LedgerAccount.lines`. You cannot use wildcards for both descendant and template instance matching in the same query.

- **posted** ([DateTimeFilter](https://fragment.dev/markdown/api-reference/ledger-types.md#filter-types-datetimefilter))

  Use this filter to filter Ledger Lines by their `posted` timestamp.

- **showHidden** ([Boolean](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-boolean))

  Use this filter to find hidden Ledger Lines.

- **tag** ([TagFilter](https://fragment.dev/markdown/api-reference/ledger-types.md#filter-types-tagfilter))

  Filter Ledger Lines by tag. Only matches lines that have the specified tags attached directly to them.

- **type** ([TxTypeFilter](https://fragment.dev/markdown/api-reference/ledger-types.md#filter-types-txtypefilter))

<a id="filter-types-ledgertypefilter"></a>

### LedgerTypeFilter

```json
{"equalTo": "double", "in": ["double"]}
```

- **equalTo** ([LedgerTypes](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-ledgertypes))

- **in** ([[LedgerTypes!]](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-ledgertypes))

  Must match one of the values provided. Limited to 100 items maximum.

<a id="filter-types-ledgerunreconciledtxsfilterset"></a>

### LedgerUnreconciledTxsFilterSet

Filters for transactions not reconciled to any account in a Ledger.

```json
{"posted": DateTimeFilter}
```

- **posted** ([DateTimeFilter](https://fragment.dev/markdown/api-reference/ledger-types.md#filter-types-datetimefilter))

  Filter by the external transaction's posted timestamp. Bounds are inclusive.

<a id="filter-types-ledgersfilterset"></a>

### LedgersFilterSet

```json
{"hasSchema": true, "type": LedgerTypeFilter}
```

- **hasSchema** ([Boolean](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-boolean))

- **type** ([LedgerTypeFilter](https://fragment.dev/markdown/api-reference/ledger-types.md#filter-types-ledgertypefilter))

<a id="filter-types-paymentmethodsfilterset"></a>

### PaymentMethodsFilterSet

Filter the list of saved Payment Methods returned.

```json
{"user": UserFilter}
```

- **user** ([UserFilter!](https://fragment.dev/markdown/api-reference/ledger-types.md#filter-types-userfilter))

  Filter by the User the Payment Method belongs to.

<a id="filter-types-paymentstatusfilter"></a>

### PaymentStatusFilter

Filters a result set by Payment status.

```json
{"equalTo": "accepted", "in": ["accepted"]}
```

- **equalTo** ([PaymentStatus](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-paymentstatus))

  Results must have the specified status.

- **in** ([[PaymentStatus!]](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-paymentstatus))

  Results can have any of the specified statuses.

<a id="filter-types-paymentsfilterset"></a>

### PaymentsFilterSet

The filters that can be applied to a list of Payments.

```json
{
  "created": DateTimeFilter,
  "status": PaymentStatusFilter
}
```

- **created** ([DateTimeFilter](https://fragment.dev/markdown/api-reference/ledger-types.md#filter-types-datetimefilter))

  Use this filter to filter Payments by their `created` timestamp.

- **status** ([PaymentStatusFilter](https://fragment.dev/markdown/api-reference/ledger-types.md#filter-types-paymentstatusfilter))

  Use this to filter Payments by their status.

<a id="filter-types-periodfilter"></a>

### PeriodFilter

A specific year ("2026") or month ("2026-05") used to match dates that fall within it.

```json
"2022-03"
```

<a id="filter-types-stringfilter"></a>

### StringFilter

```json
{
  "equalTo": "abc123",
  "in": ["abc123"],
  "notEqualTo": "abc123",
  "notIn": ["abc123"]
}
```

- **equalTo** ([String](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-string))

- **in** ([[String!]](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-string))

  Must match one of the values provided. Limited to 100 items maximum.

- **notEqualTo** ([String](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-string))

  Must not equal this string value

- **notIn** ([[String!]](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-string))

  Must not match any of the values provided. Limited to 100 items maximum.

<a id="filter-types-stringmatchfilter"></a>

### StringMatchFilter

```json
{
  "contains": "abc123",
  "equalTo": "abc123",
  "in": ["abc123"],
  "matches": "abc123",
  "matchesAny": ["abc123"]
}
```

- **contains** ([String](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-string))

  Must contain the provided pattern somewhere within the string. For example, 'contains: hat' will match 'hat', 'chat', and 'hate'.

- **equalTo** ([String](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-string))

  Must exactly equal the provided value

- **in** ([[String!]](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-string))

  Must exactly equal one of the provided values. Limited to 100 items maximum.

- **matches** ([String](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-string))

  Must match the provided pattern. Wildcards ("*") will match any substring

- **matchesAny** ([[String!]](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-string))

  Must match any one of the provided `matches` patterns, OR-ed together — results are returned as a single paginated list. Each entry uses the same wildcard grammar as `matches`. Cannot be combined with `matches`. Limited to 100 entries.

<a id="filter-types-tagfilter"></a>

### TagFilter

Filters a result set based on the tags it contains.

```json
{
  "all": [TagMatchInput],
  "contains": TagMatchInput,
  "equalTo": TagMatchInput,
  "in": [TagMatchInput],
  "keyEqualTo": "some-safe-string-ik",
  "keyIn": ["some-safe-string-ik"],
  "notEqualTo": TagMatchInput,
  "notIn": [TagMatchInput],
  "notKeyEqualTo": "some-safe-string-ik",
  "notKeyIn": ["some-safe-string-ik"]
}
```

- **all** ([[TagMatchInput!]](https://fragment.dev/markdown/api-reference/ledger-types.md#matchinput-types-tagmatchinput))

  Matches entries that have ALL of the specified tags. The key and value are both matched exactly. Limited to 10 items maximum.

- **contains** ([TagMatchInput](https://fragment.dev/markdown/api-reference/ledger-types.md#matchinput-types-tagmatchinput))

  Matches tag values based on the existence of the provided string within the tag value. The key is matched exactly.

- **equalTo** ([TagMatchInput](https://fragment.dev/markdown/api-reference/ledger-types.md#matchinput-types-tagmatchinput))

  Matches tags based on the exact value provided. The key and value are both matched exactly.

- **in** ([[TagMatchInput!]](https://fragment.dev/markdown/api-reference/ledger-types.md#matchinput-types-tagmatchinput))

  Matches tags based on a list of possible tag matches. The key and value are both matched exactly. Limited to 100 items maximum.

- **keyEqualTo** ([SafeString](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-safestring))

  Matches tags where the key exactly equals the provided value.

- **keyIn** ([[SafeString!]](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-safestring))

  Matches tags where the key matches any of the provided values. Limited to 100 items maximum.

- **notEqualTo** ([TagMatchInput](https://fragment.dev/markdown/api-reference/ledger-types.md#matchinput-types-tagmatchinput))

  Matches tags that do not equal the provided value. The key and value are both matched exactly.

- **notIn** ([[TagMatchInput!]](https://fragment.dev/markdown/api-reference/ledger-types.md#matchinput-types-tagmatchinput))

  Matches tags that do not match any of the provided values. The key and value are both matched exactly. Limited to 100 items maximum.

- **notKeyEqualTo** ([SafeString](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-safestring))

  Matches tags where the key does not equal the provided value.

- **notKeyIn** ([[SafeString!]](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-safestring))

  Matches tags where the key does not match any of the provided values. Limited to 100 items maximum.

<a id="filter-types-txtypefilter"></a>

### TxTypeFilter

```json
{"equalTo": "credit", "in": ["credit"]}
```

- **equalTo** ([TxType](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-txtype))

- **in** ([[TxType!]](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-txtype))

  Must match one of the values provided. Limited to 100 items maximum.

<a id="filter-types-userfilter"></a>

### UserFilter

```json
{
  "email": EmailFilter,
  "ledger": LedgerMatchInput
}
```

- **email** ([EmailFilter!](https://fragment.dev/markdown/api-reference/ledger-types.md#filter-types-emailfilter))

  Filter by the User's email address.

- **ledger** ([LedgerMatchInput!](https://fragment.dev/markdown/api-reference/ledger-types.md#matchinput-types-ledgermatchinput))

  The Ledger the User belongs to.

<a id="utility-types"></a>

## Utility Types

<a id="utility-types-aginginterval"></a>

### AgingInterval

Inclusive posted-time bounds usable directly in existing list filters.

```json
{
  "clearingAccountCount": 2277,
  "endTime": "2007-12-03T10:15:30Z",
  "startTime": "2007-12-03T10:15:30Z",
  "unreconciledTxCount": 2277
}
```

- **clearingAccountCount** ([Int](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-int))

  Unique pending accounts matching ledgerAccounts with this interval's earliestPosted filter. Different pending currencies can place an account in multiple intervals. Null when not requested.

- **endTime** ([DateTime!](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-datetime))

  Inclusive upper bound for earliestPosted.before or posted.before.

- **startTime** ([DateTime](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-datetime))

  Inclusive lower bound for earliestPosted.after or posted.after; null for the oldest interval.

- **unreconciledTxCount** ([Int](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-int))

  Transactions matching unreconciledTxs with this interval's posted filter and the requested Links and filters. Null when not requested.

<a id="utility-types-cardpaymentmethod"></a>

### CardPaymentMethod

A saved card.

```json
{
  "brand": "abc123",
  "created": "2007-12-03T10:15:30Z",
  "expiryMonth": 2277,
  "expiryYear": 2277,
  "id": "3116551f-5efc-4c9e-84ac-5a36a51b09c1",
  "last4": "abc123",
  "user": User
}
```

- **brand** ([String!](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-string))

  The card network, for example `visa` or `mastercard`.

- **created** ([DateTime!](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-datetime))

  When the payment method was saved.

- **expiryMonth** ([Int!](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-int))

  The card's expiry month, 1–12.

- **expiryYear** ([Int!](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-int))

  The card's four-digit expiry year.

- **id** ([ID!](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-id))

  Fragment ID of the saved Payment Method.

- **last4** ([String!](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-string))

  The last four digits of the card number.

- **user** ([User!](https://fragment.dev/markdown/api-reference/ledger-types.md#core-types-user))

  The user who owns this payment method.

<a id="utility-types-checkoutpaymentattempt"></a>

### CheckoutPaymentAttempt

An attempt the payer made through checkout.

```json
{"id": "3116551f-5efc-4c9e-84ac-5a36a51b09c1", "status": "failed"}
```

- **id** ([ID!](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-id))

  The ID of this Payment attempt.

- **status** ([PaymentAttemptStatus!](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-paymentattemptstatus))

  The status of this Payment attempt.

<a id="utility-types-currencyamount"></a>

### CurrencyAmount

A single amount accompanied by its currency

```json
{"amount": "999999999999", "currency": Currency}
```

- **amount** ([Int96!](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-int96))

  Numerical integer value, serialized as a string

- **currency** ([Currency!](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-currency))

  The currency this amount is in

<a id="utility-types-customlink"></a>

### CustomLink

```json
{
  "created": "abc123",
  "dashboardUrl": "abc123",
  "externalAccounts": ExternalAccountsConnection,
  "id": "3116551f-5efc-4c9e-84ac-5a36a51b09c1",
  "name": "abc123"
}
```

- **created** ([String!](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-string))

  ISO-8601 timestamp when the Link was created.

- **dashboardUrl** ([String!](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-string))

  URL to the Fragment  Dashboard for this Link.

- **externalAccounts** ([ExternalAccountsConnection!](https://fragment.dev/markdown/api-reference/ledger-types.md#connection-types-externalaccountsconnection))

  A list of External Accounts associated with this Link.

- **id** ([ID!](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-id))

  Fragment ID of the Custom Link.

- **name** ([String!](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-string))

  Name of the Link as it appears in the Fragment  Dashboard.

<a id="utility-types-increaseenv"></a>

### IncreaseEnv

```json
"production"
```

- **production** ()

- **sandbox** ()

<a id="utility-types-increaselink"></a>

### IncreaseLink

```json
{
  "created": "abc123",
  "dashboardUrl": "abc123",
  "externalAccounts": ExternalAccountsConnection,
  "id": "3116551f-5efc-4c9e-84ac-5a36a51b09c1",
  "increaseEnv": "production",
  "name": "abc123"
}
```

- **created** ([String!](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-string))

  ISO-8601 timestamp when the Link was created.

- **dashboardUrl** ([String!](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-string))

  URL to the Fragment  Dashboard for this Link.

- **externalAccounts** ([ExternalAccountsConnection!](https://fragment.dev/markdown/api-reference/ledger-types.md#connection-types-externalaccountsconnection))

  A list of External Accounts associated with this Link.

- **id** ([ID!](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-id))

  Fragment ID of the Increase Link.

- **increaseEnv** ([IncreaseEnv!](https://fragment.dev/markdown/api-reference/ledger-types.md#utility-types-increaseenv))

  The environment of the Increase Link, either sandbox or production.

- **name** ([String!](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-string))

  Name of the Link as it appears in the Dashboard.

<a id="utility-types-int96condition"></a>

### Int96Condition

A condition that must be met on an Int96 field.

```json
{"eq": "999999999999", "gte": "999999999999", "lte": "999999999999"}
```

- **eq** ([Int96](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-int96))

  Amount must exactly match this value. You may not specify this alongside `gte` or `lte`.

- **gte** ([Int96](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-int96))

  Amount must be greater than or equal to this value.

- **lte** ([Int96](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-int96))

  Amount must be less than or equal to this value.

<a id="utility-types-ledgeraccountcondition"></a>

### LedgerAccountCondition

A set of conditions that a Ledger Account must meet for an operation to succeed.

```json
{
  "ownBalance": Int96Condition,
  "totalBalance": Int96Condition
}
```

- **ownBalance** ([Int96Condition](https://fragment.dev/markdown/api-reference/ledger-types.md#utility-types-int96condition))

  A condition that the `ownBalance` field must satisfy. Note that this condition always applies to the latest balance, not to balances at a specific date or time. See [Read balances](https://fragment.dev/markdown/guides/read-balances.md) for more on the different types of Ledger Account balances.

- **totalBalance** ([Int96Condition](https://fragment.dev/markdown/api-reference/ledger-types.md#utility-types-int96condition))

  A condition that the `totalBalance` field must satisfy. Note that this condition always applies to the latest balance, not to balances at a specific date or time. See [Read balances](https://fragment.dev/markdown/guides/read-balances.md) for more on the different types of Ledger Account balances.

<a id="utility-types-ledgeraccountconsistencyconfig"></a>

### LedgerAccountConsistencyConfig

The consistency configuration of a Ledger Account's balance updates. See [Configure consistency](https://fragment.dev/markdown/guides/configure-consistency.md).

```json
{
  "lines": "eventual",
  "ownBalanceUpdates": "eventual",
  "totalBalanceUpdates": "eventual"
}
```

- **lines** ([LedgerLinesConsistencyMode!](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-ledgerlinesconsistencymode))

- **ownBalanceUpdates** ([BalanceUpdateConsistencyMode!](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-balanceupdateconsistencymode))

  If set to `strong`, then a Ledger Account's `ownBalance` updates will be strongly consistent with the API response. This Ledger Account's balance will be updated and available for strongly consistent reads once you receive an API response. Otherwise if not set or set to `eventual`, `ownBalance` updates are applied asynchronously and may not be immediately reflected in queries. See [Configure consistency](https://fragment.dev/markdown/guides/configure-consistency.md).

- **totalBalanceUpdates** ([BalanceUpdateConsistencyMode](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-balanceupdateconsistencymode))

  If set to `strong`, then a Ledger Account's `ownBalance`, `childBalance`, and `balance` fields' updates will be strongly consistent with the API response. This Ledger Account's balance will be updated and available for strongly consistent reads once you receive an API response. Otherwise if not set or set to `eventual`, updates are applied asynchronously and may not be immediately reflected in queries. See [Configure consistency](https://fragment.dev/markdown/guides/configure-consistency.md).

<a id="utility-types-ledgeraccountdatamigration"></a>

### LedgerAccountDataMigration

Represents a data migration for a specific Ledger Account in a Ledger.

```json
{
  "accountPath": "abc123",
  "currentMigration": LedgerDataMigrationHistoryEntry,
  "history": LedgerDataMigrationHistoryConnection,
  "ledgerEntries": LedgerEntriesConnection,
  "status": "active"
}
```

- **accountPath** ([String!](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-string))

  The path of the Ledger Account being migrated.

- **currentMigration** ([LedgerDataMigrationHistoryEntry](https://fragment.dev/markdown/api-reference/ledger-types.md#utility-types-ledgerdatamigrationhistoryentry))

  Current active migration info (null if migration is inactive).

- **history** ([LedgerDataMigrationHistoryConnection!](https://fragment.dev/markdown/api-reference/ledger-types.md#connection-types-ledgerdatamigrationhistoryconnection))

  The historical transitions of this migration.

  Arguments:

  - **after** ([String](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-string))

    Where to start paginating from, when paginating forwards. Send endCursor from a response to get its next page. Learn more about [pagination](https://fragment.dev/markdown/guides/query-data.md#basics-pagination).

  - **before** ([String](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-string))

    Where to start paginating from, when paginating backwards. Send startCursor from a response to get the previous page. Learn more about [pagination](https://fragment.dev/markdown/guides/query-data.md#basics-pagination).

  - **first** ([Int](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-int))

    The number of Migration History to return per page, when paginating forwards. Defaults to 20, maximum is 200.

  - **last** ([Int](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-int))

    The number of Migration History to return per page, when paginating backwards. Defaults to 20, maximum is 200.

- **ledgerEntries** ([LedgerEntriesConnection!](https://fragment.dev/markdown/api-reference/ledger-types.md#connection-types-ledgerentriesconnection))

  The ledger entries to be migrated.

  Arguments:

  - **after** ([String](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-string))

    Where to start paginating from, when paginating forwards. Send endCursor from a response to get its next page. Learn more about [pagination](https://fragment.dev/markdown/guides/query-data.md#basics-pagination).

  - **before** ([String](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-string))

    Where to start paginating from, when paginating backwards. Send startCursor from a response to get the previous page. Learn more about [pagination](https://fragment.dev/markdown/guides/query-data.md#basics-pagination).

  - **first** ([Int](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-int))

    The number of Ledger Entries to return per page, when paginating forwards. Defaults to 20, maximum is 200.

  - **last** ([Int](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-int))

    The number of Ledger Entries to return per page, when paginating backwards. Defaults to 20, maximum is 200.

- **status** ([LedgerDataMigrationStatus!](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-ledgerdatamigrationstatus))

  The status of the data migration.

<a id="utility-types-ledgeraccountpayment"></a>

### LedgerAccountPayment

Payment configuration of a Ledger Account.

```json
{"enabled": true}
```

- **enabled** ([Boolean!](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-boolean))

<a id="utility-types-ledgeraccounttypes"></a>

### LedgerAccountTypes

```json
"asset"
```

- **asset** ()

- **expense** ()

- **income** ()

- **liability** ()

<a id="utility-types-ledgerdatamigrationhistoryentry"></a>

### LedgerDataMigrationHistoryEntry

A single schema version in the migration history.

```json
{"schemaVersion": 2277, "status": "active"}
```

- **schemaVersion** ([Int!](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-int))

  The schema version.

- **status** ([LedgerDataMigrationStatus!](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-ledgerdatamigrationstatus))

  The current status of this schema version (active if it's the latest and migration is active, otherwise inactive).

<a id="utility-types-ledgerentrycondition"></a>

### LedgerEntryCondition

A set of pre-conditions and post-conditions that a Ledger Account must have satisfied. Each LedgerEntryCondition has at least one of precondition or postcondition.

```json
{
  "account": LedgerAccount,
  "currency": Currency,
  "postcondition": LedgerAccountCondition,
  "precondition": LedgerAccountCondition
}
```

- **account** ([LedgerAccount!](https://fragment.dev/markdown/api-reference/ledger-types.md#core-types-ledgeraccount))

  The Ledger Account that must satisfied the provided conditions.

- **currency** ([Currency!](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-currency))

  The currency of the balance associated with this `LedgerEntryCondition`.

- **postcondition** ([LedgerAccountCondition](https://fragment.dev/markdown/api-reference/ledger-types.md#utility-types-ledgeraccountcondition))

  The conditions that must be satisfied after the operation.

- **precondition** ([LedgerAccountCondition](https://fragment.dev/markdown/api-reference/ledger-types.md#utility-types-ledgeraccountcondition))

  The conditions that must be satisfied prior to the operation.

<a id="utility-types-ledgerentrydatamigration"></a>

### LedgerEntryDataMigration

Represents a data migration for a specific entry type in a Ledger.

```json
{
  "currentMigration": LedgerDataMigrationHistoryEntry,
  "entryType": "some-safe-string-ik",
  "history": LedgerDataMigrationHistoryConnection,
  "ledgerEntries": LedgerEntriesConnection,
  "status": "active",
  "typeVersion": 2277
}
```

- **currentMigration** ([LedgerDataMigrationHistoryEntry](https://fragment.dev/markdown/api-reference/ledger-types.md#utility-types-ledgerdatamigrationhistoryentry))

  Current active migration info (null if migration is inactive).

- **entryType** ([SafeString!](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-safestring))

  The entry type being migrated.

- **history** ([LedgerDataMigrationHistoryConnection!](https://fragment.dev/markdown/api-reference/ledger-types.md#connection-types-ledgerdatamigrationhistoryconnection))

  The historical transitions of this migration.

  Arguments:

  - **after** ([String](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-string))

    Where to start paginating from, when paginating forwards. Send endCursor from a response to get its next page. Learn more about [pagination](https://fragment.dev/markdown/guides/query-data.md#basics-pagination).

  - **before** ([String](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-string))

    Where to start paginating from, when paginating backwards. Send startCursor from a response to get the previous page. Learn more about [pagination](https://fragment.dev/markdown/guides/query-data.md#basics-pagination).

  - **first** ([Int](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-int))

    The number of Migration History to return per page, when paginating forwards. Defaults to 20, maximum is 200.

  - **last** ([Int](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-int))

    The number of Migration History to return per page, when paginating backwards. Defaults to 20, maximum is 200.

- **ledgerEntries** ([LedgerEntriesConnection!](https://fragment.dev/markdown/api-reference/ledger-types.md#connection-types-ledgerentriesconnection))

  The ledger entries to be migrated.

  Arguments:

  - **after** ([String](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-string))

    Where to start paginating from, when paginating forwards. Send endCursor from a response to get its next page. Learn more about [pagination](https://fragment.dev/markdown/guides/query-data.md#basics-pagination).

  - **before** ([String](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-string))

    Where to start paginating from, when paginating backwards. Send startCursor from a response to get the previous page. Learn more about [pagination](https://fragment.dev/markdown/guides/query-data.md#basics-pagination).

  - **first** ([Int](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-int))

    The number of Ledger Entries to return per page, when paginating forwards. Defaults to 20, maximum is 200.

  - **last** ([Int](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-int))

    The number of Ledger Entries to return per page, when paginating backwards. Defaults to 20, maximum is 200.

- **status** ([LedgerDataMigrationStatus!](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-ledgerdatamigrationstatus))

  The status of the data migration.

- **typeVersion** ([Int!](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-int))

  The version of the entry type being migrated.

<a id="utility-types-ledgerentrygroup"></a>

### LedgerEntryGroup

A group of Ledger Entries

```json
{
  "balances": LedgerEntryGroupBalanceConnection,
  "created": "2007-12-03T10:15:30Z",
  "dashboardUrl": "abc123",
  "key": "some-safe-string-ik",
  "ledger": Ledger,
  "ledgerEntries": LedgerEntriesConnection,
  "ledgerId": "3116551f-5efc-4c9e-84ac-5a36a51b09c1",
  "value": "some-safe-string-ik"
}
```

- **balances** ([LedgerEntryGroupBalanceConnection!](https://fragment.dev/markdown/api-reference/ledger-types.md#connection-types-ledgerentrygroupbalanceconnection))

  Arguments:

  - **after** ([String](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-string))

    Where to start paginating from, when paginating forwards. Send endCursor from a response to get its next page. Learn more about [pagination](https://fragment.dev/markdown/guides/query-data.md#basics-pagination).

  - **before** ([String](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-string))

    Where to start paginating from, when paginating backwards. Send startCursor from a response to get the previous page. Learn more about [pagination](https://fragment.dev/markdown/guides/query-data.md#basics-pagination).

  - **filter** ([LedgerEntryGroupBalanceFilterSet](https://fragment.dev/markdown/api-reference/ledger-types.md#filter-types-ledgerentrygroupbalancefilterset))

  - **first** ([Int](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-int))

    The number of group balances to return per page, when paginating forwards. Defaults to 20, maximum is 200.

  - **last** ([Int](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-int))

    The number of group balances to return per page, when paginating backwards. Defaults to 20, maximum is 200.

- **created** ([DateTime](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-datetime))

  ISO-8601 timestamp this LedgerEntryGroup was created in Fragment .

- **dashboardUrl** ([String!](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-string))

  URL to the Fragment  Dashboard for this Ledger Entry Group.

- **key** ([SafeString!](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-safestring))

  The key of this Ledger Entry Group.

- **ledger** ([Ledger!](https://fragment.dev/markdown/api-reference/ledger-types.md#core-types-ledger))

  The Ledger that this Ledger Entry Group is within.

- **ledgerEntries** ([LedgerEntriesConnection!](https://fragment.dev/markdown/api-reference/ledger-types.md#connection-types-ledgerentriesconnection))

  Arguments:

  - **after** ([String](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-string))

    Where to start paginating from, when paginating forwards. Send endCursor from a response to get its next page. Learn more about [pagination](https://fragment.dev/markdown/guides/query-data.md#basics-pagination).

  - **before** ([String](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-string))

    Where to start paginating from, when paginating backwards. Send startCursor from a response to get the previous page. Learn more about [pagination](https://fragment.dev/markdown/guides/query-data.md#basics-pagination).

  - **filter** ([LedgerEntriesFilterSet](https://fragment.dev/markdown/api-reference/ledger-types.md#filter-types-ledgerentriesfilterset))

  - **first** ([Int](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-int))

    The number of Ledger Entries to return per page, when paginating forwards. Defaults to 20, maximum is 200.

  - **last** ([Int](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-int))

    The number of Ledger Entries to return per page, when paginating backwards. Defaults to 20, maximum is 200.

- **ledgerId** ([ID!](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-id))

  The ID of the Ledger this Ledger Entry Group is within.

- **value** ([SafeString!](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-safestring))

  The value associated with Ledger Entry Group.

<a id="utility-types-ledgerentrygroupbalance"></a>

### LedgerEntryGroupBalance

Represents the total effect of a Ledger Entry Group on a Ledger Account balance for a single currency.

```json
{
  "account": LedgerAccount,
  "currency": Currency,
  "ownBalance": "999999999999"
}
```

- **account** ([LedgerAccount!](https://fragment.dev/markdown/api-reference/ledger-types.md#core-types-ledgeraccount))

  The Ledger Account whose balance is affected.

- **currency** ([Currency!](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-currency))

  The currency of the affected balance.

- **ownBalance** ([Int96!](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-int96))

  The total balance change for this Ledger Account and currency.

  Arguments:

  - **consistencyMode** ([ReadBalanceConsistencyMode](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-readbalanceconsistencymode))

    The consistency mode to use when fetching the balance. Use 'use_account' to match the configured consistency mode of the account.

<a id="utility-types-ledgerentrystats"></a>

### LedgerEntryStats

Posting count statistics for a specific type and typeVersion of entry in a Ledger.

```json
{
  "count": "999999999999",
  "ledgerId": "some-safe-string-ik",
  "netCount": "999999999999",
  "reversalsCount": "999999999999",
  "schemaKey": "some-safe-string-ik",
  "type": "some-safe-string-ik",
  "typeVersion": 2277
}
```

- **count** ([Int96!](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-int96))

  The total number of entries of this type.

- **ledgerId** ([SafeString!](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-safestring))

  The ledger ID these stats are for.

- **netCount** ([Int96!](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-int96))

  The net number of entries (count - reversalsCount).

- **reversalsCount** ([Int96!](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-int96))

  The number of entries that are reversals.

- **schemaKey** ([SafeString!](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-safestring))

  The schema key associated with these stats.

- **type** ([SafeString!](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-safestring))

  The type of entry these stats are for.

- **typeVersion** ([Int!](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-int))

  The version of the entry type these stats are for.

<a id="utility-types-ledgerentrytag"></a>

### LedgerEntryTag

A tag attached to a Ledger Entry.

```json
{"key": "some-safe-string-ik", "value": "some-safe-string-ik"}
```

- **key** ([SafeString!](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-safestring))

  The key of this tag.

- **value** ([SafeString!](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-safestring))

  The value associated with this tag's key.

<a id="utility-types-ledgerlinetag"></a>

### LedgerLineTag

A tag attached to a Ledger Line.

```json
{"key": "some-safe-string-ik", "value": "some-safe-string-ik"}
```

- **key** ([SafeString!](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-safestring))

  The key of this tag.

- **value** ([SafeString!](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-safestring))

  The value associated with this tag's key.

<a id="utility-types-paymentattempt"></a>

### PaymentAttempt

One try at charging a Payment.

```json
{"id": "3116551f-5efc-4c9e-84ac-5a36a51b09c1", "status": "failed"}
```

- **id** ([ID!](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-id))

  The ID of this Payment attempt.

- **status** ([PaymentAttemptStatus!](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-paymentattemptstatus))

  The status of this Payment attempt.

<a id="utility-types-paymentcard3dscanceledevent"></a>

### PaymentCard3DSCanceledEvent

The payer abandoned or failed the 3DS check.

```json
{
  "id": "3116551f-5efc-4c9e-84ac-5a36a51b09c1",
  "occurredAt": "2007-12-03T10:15:30Z",
  "paymentStatus": "accepted",
  "status": "accepted"
}
```

- **id** ([ID!](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-id))

  The ID of this Payment event.

- **occurredAt** ([DateTime!](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-datetime))

  When this event occurred.

- **paymentStatus** ([PaymentStatus!](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-paymentstatus))

  The status of the Payment after this event. Always `needs_payment_method`, even while a newer attempt keeps the Payment `processing`.

- **status** ([PaymentStatus!](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-paymentstatus))

  The status of the Payment after this event. Use `paymentStatus` on each event type.

<a id="utility-types-paymentcardcapturedevent"></a>

### PaymentCardCapturedEvent

The card network captured the Payment.

```json
{
  "attempt": PaymentAttempt,
  "attemptStatus": "failed",
  "id": "3116551f-5efc-4c9e-84ac-5a36a51b09c1",
  "ledgerEntry": LedgerEntry,
  "occurredAt": "2007-12-03T10:15:30Z",
  "paymentStatus": "accepted",
  "status": "accepted"
}
```

- **attempt** ([PaymentAttempt](https://fragment.dev/markdown/api-reference/ledger-types.md#utility-types-paymentattempt))

  The captured attempt. `null` on events recorded before attempts.

- **attemptStatus** ([PaymentAttemptStatus](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-paymentattemptstatus))

  The status of the attempt after this event. Always `succeeded`. `null` on events recorded before attempt statuses.

- **id** ([ID!](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-id))

  The ID of this Payment event.

- **ledgerEntry** ([LedgerEntry](https://fragment.dev/markdown/api-reference/ledger-types.md#core-types-ledgerentry))

  The `initiated` Ledger Entry, `null` where the Payment Type defines none.

- **occurredAt** ([DateTime!](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-datetime))

  When this event occurred.

- **paymentStatus** ([PaymentStatus!](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-paymentstatus))

  The status of the Payment after this event. Always `accepted`.

- **status** ([PaymentStatus!](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-paymentstatus))

  The status of the Payment after this event. Use `paymentStatus` on each event type.

<a id="utility-types-paymentcarddeclinedevent"></a>

### PaymentCardDeclinedEvent

The card was declined, or the charge refused.

```json
{
  "attempt": PaymentAttempt,
  "attemptStatus": "failed",
  "declineCode": "abc123",
  "id": "3116551f-5efc-4c9e-84ac-5a36a51b09c1",
  "occurredAt": "2007-12-03T10:15:30Z",
  "paymentStatus": "accepted",
  "status": "accepted"
}
```

- **attempt** ([PaymentAttempt!](https://fragment.dev/markdown/api-reference/ledger-types.md#utility-types-paymentattempt))

  The attempt that failed.

- **attemptStatus** ([PaymentAttemptStatus!](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-paymentattemptstatus))

  The status of the attempt after this event. Always `failed`.

- **declineCode** ([String](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-string))

  The payment processor's reason for the decline, `null` when it gave none.

- **id** ([ID!](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-id))

  The ID of this Payment event.

- **occurredAt** ([DateTime!](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-datetime))

  When this event occurred.

- **paymentStatus** ([PaymentStatus!](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-paymentstatus))

  The status of the Payment after this event. Always `needs_payment_method`, even while a newer attempt keeps the Payment `processing`.

- **status** ([PaymentStatus!](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-paymentstatus))

  The status of the Payment after this event. Use `paymentStatus` on each event type.

<a id="utility-types-paymentcheckoutevent"></a>

### PaymentCheckoutEvent

The payer went through checkout.

```json
{
  "attempt": PaymentAttempt,
  "attemptStatus": "failed",
  "id": "3116551f-5efc-4c9e-84ac-5a36a51b09c1",
  "occurredAt": "2007-12-03T10:15:30Z",
  "paymentStatus": "accepted",
  "status": "accepted"
}
```

- **attempt** ([PaymentAttempt](https://fragment.dev/markdown/api-reference/ledger-types.md#utility-types-paymentattempt))

  The attempt checkout started. `null` on events recorded before attempts.

- **attemptStatus** ([PaymentAttemptStatus](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-paymentattemptstatus))

  The status of the attempt after this event. Always `processing`. `null` on events recorded before attempt statuses.

- **id** ([ID!](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-id))

  The ID of this Payment event.

- **occurredAt** ([DateTime!](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-datetime))

  When this event occurred.

- **paymentStatus** ([PaymentStatus!](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-paymentstatus))

  The status of the Payment after this event. Always `processing`.

- **status** ([PaymentStatus!](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-paymentstatus))

  The status of the Payment after this event. Use `paymentStatus` on each event type.

<a id="utility-types-paymentcreatedevent"></a>

### PaymentCreatedEvent

The Payment was created.

```json
{
  "id": "3116551f-5efc-4c9e-84ac-5a36a51b09c1",
  "occurredAt": "2007-12-03T10:15:30Z",
  "paymentStatus": "accepted",
  "status": "accepted"
}
```

- **id** ([ID!](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-id))

  The ID of this Payment event.

- **occurredAt** ([DateTime!](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-datetime))

  When this event occurred.

- **paymentStatus** ([PaymentStatus!](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-paymentstatus))

  The status of the Payment after this event: `needs_payment_method` for checkout, `processing` for a saved Payment Method.

- **status** ([PaymentStatus!](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-paymentstatus))

  The status of the Payment after this event. Use `paymentStatus` on each event type.

<a id="utility-types-paymentevent"></a>

### PaymentEvent

Something that happened to a Payment.

```json
{
  "id": "3116551f-5efc-4c9e-84ac-5a36a51b09c1",
  "occurredAt": "2007-12-03T10:15:30Z",
  "status": "accepted"
}
```

- **id** ([ID!](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-id))

  The ID of this Payment event.

- **occurredAt** ([DateTime!](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-datetime))

  When this event occurred.

- **status** ([PaymentStatus!](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-paymentstatus))

  The status of the Payment after this event. Use `paymentStatus` on each event type.

<a id="utility-types-paymentmethod"></a>

### PaymentMethod

A payment method saved for a User.

```json
{
  "created": "2007-12-03T10:15:30Z",
  "id": "3116551f-5efc-4c9e-84ac-5a36a51b09c1",
  "user": User
}
```

- **created** ([DateTime!](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-datetime))

  When the payment method was saved.

- **id** ([ID!](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-id))

  Fragment ID of the saved Payment Method.

- **user** ([User!](https://fragment.dev/markdown/api-reference/ledger-types.md#core-types-user))

  The user who owns this payment method.

<a id="utility-types-paymentsettledevent"></a>

### PaymentSettledEvent

The Payment settled.

```json
{
  "id": "3116551f-5efc-4c9e-84ac-5a36a51b09c1",
  "ledgerEntry": LedgerEntry,
  "occurredAt": "2007-12-03T10:15:30Z",
  "paymentStatus": "accepted",
  "status": "accepted"
}
```

- **id** ([ID!](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-id))

  The ID of this Payment event.

- **ledgerEntry** ([LedgerEntry!](https://fragment.dev/markdown/api-reference/ledger-types.md#core-types-ledgerentry))

  The `settled` Ledger Entry.

- **occurredAt** ([DateTime!](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-datetime))

  When this event occurred.

- **paymentStatus** ([PaymentStatus!](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-paymentstatus))

  The status of the Payment after this event. Always `settled`.

- **status** ([PaymentStatus!](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-paymentstatus))

  The status of the Payment after this event. Use `paymentStatus` on each event type.

<a id="utility-types-postedwindow"></a>

### PostedWindow

The posted timestamp window for a clearing account, representing the earliest and latest posted timestamps across all currencies.

```json
{"earliest": "2007-12-03T10:15:30Z", "latest": "2007-12-03T10:15:30Z"}
```

- **earliest** ([DateTime!](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-datetime))

  The earliest posted timestamp across all currencies for this clearing account.

- **latest** ([DateTime!](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-datetime))

  The latest posted timestamp across all currencies for this clearing account.

<a id="utility-types-reconciliationreport"></a>

### ReconciliationReport

Reconciliation counts grouped by age, measured from endTime.

```json
{
  "endTime": "2007-12-03T10:15:30Z",
  "granularity": "daily",
  "intervals": [AgingInterval]
}
```

- **endTime** ([DateTime!](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-datetime))

  Time of the request; the exclusive cutoff used to compute interval boundaries.

- **granularity** ([Granularity!](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-granularity))

  Unit used to compute interval boundaries.

- **intervals** ([[AgingInterval!]!](https://fragment.dev/markdown/api-reference/ledger-types.md#utility-types-aginginterval))

  Intervals ordered youngest first. The final interval has no lower time bound.

<a id="utility-types-savedpaymentmethodpaymentattempt"></a>

### SavedPaymentMethodPaymentAttempt

An attempt that charged a saved Payment Method.

```json
{"id": "3116551f-5efc-4c9e-84ac-5a36a51b09c1", "status": "failed"}
```

- **id** ([ID!](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-id))

  The ID of this Payment attempt.

- **status** ([PaymentAttemptStatus!](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-paymentattemptstatus))

  The status of this Payment attempt.

<a id="utility-types-schemaversion"></a>

### SchemaVersion

An instance of a Schema stored in a Workspace. A new SchemaVersion is created each time a Schema is stored. It stores the Chart of Accounts and list of Ledger Entries as well as a history of its Ledger migrations.

```json
{
  "created": "2007-12-03T10:15:30Z",
  "json": "{\"key\":\"value\"}",
  "migrations": LedgerMigrationConnection,
  "version": 2277
}
```

- **created** ([DateTime!](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-datetime))

- **json** ([JSON!](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-json))

- **migrations** ([LedgerMigrationConnection!](https://fragment.dev/markdown/api-reference/ledger-types.md#connection-types-ledgermigrationconnection))

- **version** ([Int!](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-int))

  The version of the schema.

<a id="utility-types-stripeenv"></a>

### StripeEnv

```json
"livemode"
```

- **livemode** ()

- **testmode** ()

<a id="utility-types-stripelink"></a>

### StripeLink

```json
{
  "created": "abc123",
  "dashboardUrl": "abc123",
  "externalAccounts": ExternalAccountsConnection,
  "id": "3116551f-5efc-4c9e-84ac-5a36a51b09c1",
  "name": "abc123",
  "stripeEnv": "livemode"
}
```

- **created** ([String!](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-string))

  ISO-8601 timestamp when the Link was created.

- **dashboardUrl** ([String!](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-string))

  URL to the Fragment  Dashboard for this Link.

- **externalAccounts** ([ExternalAccountsConnection!](https://fragment.dev/markdown/api-reference/ledger-types.md#connection-types-externalaccountsconnection))

  A list of External Accounts associated with this Link.

- **id** ([ID!](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-id))

  Fragment ID of the Custom Link.

- **name** ([String!](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-string))

  Name of the Link as it appears in the Fragment  Dashboard.

- **stripeEnv** ([StripeEnv!](https://fragment.dev/markdown/api-reference/ledger-types.md#utility-types-stripeenv))

  The environment of the Stripe Link, either testmode or livemode.

<a id="utility-types-unitenv"></a>

### UnitEnv

```json
"production"
```

- **production** ()

- **sandbox** ()

<a id="utility-types-unitlink"></a>

### UnitLink

```json
{
  "created": "abc123",
  "dashboardUrl": "abc123",
  "externalAccounts": ExternalAccountsConnection,
  "id": "3116551f-5efc-4c9e-84ac-5a36a51b09c1",
  "name": "abc123",
  "unitEnv": "production"
}
```

- **created** ([String!](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-string))

  ISO-8601 timestamp when the Link was created.

- **dashboardUrl** ([String!](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-string))

  URL to the Fragment  Dashboard for this Link.

- **externalAccounts** ([ExternalAccountsConnection!](https://fragment.dev/markdown/api-reference/ledger-types.md#connection-types-externalaccountsconnection))

  A list of External Accounts associated with this Link.

- **id** ([ID!](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-id))

  Fragment ID of the Unit Link.

- **name** ([String!](https://fragment.dev/markdown/api-reference/ledger-types.md#scalars-and-enums-string))

  Name of the Link as it appears in the Dashboard.

- **unitEnv** ([UnitEnv!](https://fragment.dev/markdown/api-reference/ledger-types.md#utility-types-unitenv))

  The environment of the Unit Link, either sandbox or production.
