---
title: "Search pending transactions"
method: POST
path: "/accounting/v1.0/pending-transactions"
tags: ["Transactions"]
---

# Search pending transactions

`POST /accounting/v1.0/pending-transactions`

## Request

- Base URL: `https://api.cloudbeds.com`
- URL: `https://api.cloudbeds.com/accounting/v1.0/pending-transactions`
- Auth: one of:
  - HTTP bearer
  - OAuth 2
    - Implicit: `https://hotels.cloudbeds.com/api/v1.2/oauth`
    - Scopes: `read:payment`

Search and retrieve pending (not yet posted) transactions for a property. Pending transactions represent charges, payments, or adjustments that have been created but not yet finalized. This endpoint uses POST (instead of GET) to support complex filter criteria in the request body. The filter and sort options are the same as for posted transactions.

**Routing behavior:** pending transactions keep their original source; when a transaction is routed to another source (for example a group profile), the routing target is stored separately. Filters on `source_kind`, `source_id`, and `source_identifier` (with `equals` or `in` operators) match the transaction's original **or** routed-to source, so querying a group profile returns both its direct pending charges and pending charges routed into it from reservations. `folio_id` filters (with `equals` or `in` operators) likewise match the folio the transaction occupies on either side of the routing. Returned transactions always show their original source in `sourceKind` / `sourceId` / `sourceIdentifier`.

**Supported filter fields:**
  - `account_category`
  - `chart_of_account_type`
  - `created_at` (alias for `transaction_datetime`)
  - `customer_id`
  - `custom_code`
  - `external_relation_id`
  - `external_relation_kind`
  - `folio_id`
  - `id`
  - `internal_code`
  - `origin_id`
  - `parent_id`
  - `source_id`
  - `source_identifier`
  - `source_kind`
  - `transaction_datetime`
  - `trial_balance_id`
  - `service_date`


**Supported sort fields:**
  - `created_at` (alias for `transaction_datetime`)
  - `id`
  - `internal_code`
  - `source_id`
  - `transaction_datetime`
  - `service_date`


**Required filter constraints:** The API has certain constraints for filters so that the system is able to efficiently query the data. Every request must include at least one of the following base filters:
  - `id` with operator `equals` or `in`
  - `source_id` together with `source_kind`
  - `source_identifier` together with `source_kind`
  - `external_relation_id` together with `external_relation_kind`
  - `transaction_datetime`
  - `service_date`
  - `trial_balance_id`


**Additional filter rules:**
  - Filters cannot be empty.
  - `source_id` requires `source_kind` to be present in the same request.
  - `source_identifier` requires `source_kind` to be present in the same request.
  - `external_relation_id` and `external_relation_kind` must always be used together.
  - `trial_balance_id` only supports the `equals` operator and cannot appear more than once.
  - When using a single filter condition (without `and`/`or`), only `id`, `transaction_datetime`,
    or `service_date` are allowed, and the operator must be `equals` or `in`.


**Example — single filter condition (no AND/OR needed):**
```
  {
    "filters": {
      "field": "id",
      "operator": "in",
      "value": [101, 102, 103]
    }
  }
```

```
  {
    "filters": {
      "field": "service_date",
      "operator": "equals",
      "value": "2024-01-01"
    }
  }
```

**Example — composite filter condition:**
```
  {
    "filters": {
      "and": [
        {
          "field": "transaction_datetime",
          "operator": "greater_than_or_equal",
          "value": "2024-01-01T00:00:00Z"
        },
        {
          "field": "transaction_datetime",
          "operator": "less_than",
          "value": "2024-02-01T00:00:00Z"
        }
      ]
    }
  }
```

**Example — composite filter condition with sorting and pagination:**
```
  {
    "filters": {
      "and": [
        {
          "operator": "greater_than_or_equal",
          "value": "2019-01-11T08:59:00Z",
          "field": "transaction_datetime"
        },
        {
          "operator": "equals",
          "value": "123",
          "field": "source_id"
        },
        {
          "operator": "equals",
          "value": "RESERVATION",
          "field": "source_kind"
        },
        {
          "or": [
            {
              "operator": "in",
              "value": ["1", "2", "3"],
              "field": "customer_id"
            },
            {
              "operator": "equals",
              "value": "9000",
              "field": "internal_code"
            }
          ]
        }
      ]
    },
    "pageToken": null,
    "limit": 10,
    "sort": [
      {
        "field": "transaction_datetime",
        "direction": "asc"
      }
    ]
  }
```

## Headers

- `X-Property-ID` integer, required

## Request body

- ListPendingTransactionsRequest
  - `filters` union, required
    - object
      - `and` union[]
        - union
          - AndOrGroup
            - `and` union[]
              - …
            - `or` union[]
              - …
          - FieldFilter
            - `operator` 'greater_than_or_equal' | 'greater_than' | 'less_than_or_equal' | 'less_than' | 'equals' | 'not_equals' | 'in' | 'not_in' | 'contains' | 'not_contains' | 'is_null' | 'not_null', required
            - `value` unknown
            - `field` string, required
      - `or` union[]
        - union
          - AndOrGroup
            - `and` union[]
              - …
            - `or` union[]
              - …
          - FieldFilter
            - `operator` 'greater_than_or_equal' | 'greater_than' | 'less_than_or_equal' | 'less_than' | 'equals' | 'not_equals' | 'in' | 'not_in' | 'contains' | 'not_contains' | 'is_null' | 'not_null', required
            - `value` unknown
            - `field` string, required
    - object
      - `operator` 'greater_than_or_equal' | 'greater_than' | 'less_than_or_equal' | 'less_than' | 'equals' | 'not_equals' | 'in' | 'not_in' | 'contains' | 'not_contains' | 'is_null' | 'not_null', required
      - `value` unknown
      - `field` string, required
  - `pageToken` string
  - `limit` integer: Optional parameter. Default value is 100, maximum value is 1100.
  - `sort` Sort[]
    - `field` string, required
    - `direction` 'asc' | 'desc', required: Direction for sort - asc or desc

## Response `200`

OK

- ListPendingTransactionsPaginated
  - `transactions` TransactionResponse[]
    - `id` string: Id of the transaction.
    - `propertyId` string: Property ID where the transaction was created.
    - `internalTransactionCode` string: Internal code for the transaction, managed by Cloudbeds.
    - `customTransactionCode` string: Custom code for the transaction, managed by Property.
    - `generalLedgerCustomCode` string: Custom code for general ledger, managed by Property.
    - `amount` number: Amount of the transaction.
    - `currencyScale` integer: Number of decimal places for the currency.
    - `currency` string: Currency (ISO code) applied to the amount of the transaction.
    - `customerId` string: Id of the user who perform the transaction, also know as guest id.
    - `rootId` string: Root Id of the transaction, it contains the id of the transaction that is related to it.
    - `parentId` string: Id of the transaction that is parent of this one. For example Tax on top of a rate, tax on top of a fee, etc.
    - `sourceId` string: Id of the source. It is related with the source_kind, so if sourceKind is RESERVATION, is the reservation id.
    - `subSourceId` string: Id of the sub source. At the moment only for reservations that is the booking_room_id.
    - `sourceKind` 'RESERVATION' | 'HOUSE_ACCOUNT' | 'GROUP_PROFILE' | 'ACCOUNTS_RECEIVABLE_LEDGER': The type of financial source that owns transactions and balances. RESERVATION is an individual guest booking, HOUSE_ACCOUNT is a property-level account for miscellaneous charges, GROUP_PROFILE is a group booking that can aggregate charges from multiple reservations, and ACCOUNTS_RECEIVABLE_LEDGER tracks balances transferred for later collection.
    - `account` Account
      - `id` string: ID of account
      - `description` string: Description of the account
      - `name` string: Name of the account
      - `category` 'DEPOSITS': Account category
      - `chartOfAccountType` 'LIABILITIES' | 'REVENUE' | 'ASSETS' | 'EQUITY' | 'EXPENSES': Chart of account type
    - `externalRelationId` string: External relation id, for example if the transaction is a payment it will contain payment id.
    - `externalRelationKind` 'ROOM' | 'PAYMENT' | 'ITEM' | 'ITEM_POS' | 'ADDON' | 'RESERVATION' | 'ACCOUNTS_RECEIVABLE' | 'ROOM_REVENUE' | 'TAX' | 'FEE' | 'ADJUSTMENT' | 'PAYMENT_FEE' | 'BOOKABLE_RESOURCE' | 'CHANNEL_COMMISSION' | 'GRATUITY' | 'CHECK_ITEM' | 'CHECK_SERVICE_CHARGE' | 'CHECK_DISCOUNT' | 'CHANNEL_COMMISSION_MANUAL': Kind of the external relation id, for example if transaction is a payment it will contain PAYMENT.
    - `originId` string: Id of origin of the transaction. For example if the transaction is created based on a rate, is the rate id.
    - `routedFrom` string: Id of the transaction that was routed from. It can be null.
    - `quantity` integer: Amount of items purchased.
    - `description` string: Description of the transaction.
    - `userId` string: ID of the user who created the transaction
    - `sourceDatetime` string, date-time: Date time the source was created. (ISO 8601) in UTC
    - `transactionDatetime` string, date-time: Date time when the transaction should be created at. (ISO 8601) in UTC
    - `transactionDatetimePropertyTime` string, date-time: Date time when the transaction should be created at base on the property timezone.
    - `serviceDate` string, date: Date when the posted transaction was created (property time).
    - `businessDate` string, date: Business date the posted transaction belongs to (property time), aligned to night audit.
    - `createdAt` string, date-time: Date time when the transaction was inserted on the database. (ISO 8601) in UTC
    - `sourceIdentifier` string: If source_kind = RESERVATION, this field will contain a reservation identifier. For a transaction with source_kind = GROUP_PROFILE, this field will contain a group code. For source_king = HOUSE_ACCOUNT it will be null.
    - `subSourceIdentifier` string: identifier of a booking room
    - `notes` string: Notes associated with the transaction
  - `nextPageToken` string: Token for fetching the next page of results

## Other responses

- `400`: Bad Request

---

[API](https://skmtc.dev/cloudbeds/apis/accounting-api.md) - [All operations](https://skmtc.dev/cloudbeds/apis/accounting-api/llms.txt) - [OpenAPI document](https://skmtc.dev/cloudbeds/apis/accounting-api/revisions/0b58c698deef?raw)
