---
updatedAt: 2026-06-12T22:19:48.000Z
agentTools:
  projectIndex: https://docs.moderntreasury.com/platform/llms.txt
---

# Transactions

A `transaction` is an individual entry of activity reported on statements from a vendor such as bank, or payment processor.

Throughout a given business day, there could be `pending` transactions which are notifications of activity that is not finalized. Pending transactions will have a `posted` value of `false` and are automatically deleted when the corresponding posted transaction is reconciled, or when the system determines the pending transaction has no matching posted transaction. The posted transactions are the final record of activity for that given business day. The pending and posted transactions will have different IDs.

Given the immutability of posted transactions, none of attributes outside of `metadata` are editable.

<Table align={["left","left"]}>
  <thead>
    <tr>
      <th>
        Attribute
      </th>

      <th>
        Description
      </th>
    </tr>
  </thead>

  <tbody>
    <tr>
      <td>
        **id** _string_
      </td>

      <td>
        Unique identifier for the transaction.
      </td>
    </tr>

    <tr>
      <td>
        **amount** _int_
      </td>

      <td>
        Value in specified currency's smallest unit. e.g. $10 would be represented as 1000.
      </td>
    </tr>

    <tr>
      <td>
        **currency** _string_
      </td>

      <td>
        Currency that this transaction is denominated in.
      </td>
    </tr>

    <tr>
      <td>
        **direction** _string_
      </td>

      <td>
        Either `credit` or `debit`.
      </td>
    </tr>

    <tr>
      <td>
        **vendor_description** _string_
      </td>

      <td>
        The transaction detail text that often appears on your statement and portal. It can contain remittance information or descriptions about the payment.

        This field may contain sensitive information and is not included in API responses by default. Learn more about changing your settings [here](https://docs.moderntreasury.com/platform/docs/data-privacy-controls-1) .
      </td>
    </tr>

    <tr>
      <td>
        **vendor_code**  
        _string_
      </td>

      <td>
        When applicable, the bank-given code that determines the transaction's category. For most banks this is the BAI2/BTRS transaction code.
      </td>
    </tr>

    <tr>
      <td>
        **vendor_code_type**  
        _string_
      </td>

      <td>
        The type of `vendor_code` being reported. Can be one of `bai2`, `bankprov`, `bnk_dev`, `cleartouch`, `column`,`currencycloud`, `cross_river`, `dc_bank`, `evolve`, `goldman_sachs`, `iso20022`, `jpmc`, `mx`, `plaid`, `signet`, `silvergate`, `swift`, `us_bank` or `user`.
      </td>
    </tr>

    <tr>
      <td>
        **vendor_id**  
        _string_
      </td>

      <td>
        An identifier given to this transaction by the bank.
      </td>
    </tr>

    <tr>
      <td>
        **as_of_date**  
        _date_
      </td>

      <td>
        The date on which the transaction occurred.
      </td>
    </tr>

    <tr>
      <td>
        **as_of_time**  
        _string_
      </td>

      <td>
        The time on which the transaction occurred, formatted as `HH:MM:SS`. Depending on the granularity of the timestamp information received from the bank, it may be `null`.
      </td>
    </tr>

    <tr>
      <td>
        **as_of_timezone**  
        _string_
      </td>

      <td>
        The timezone in which the `as_of_time` is represented, as a [database TZ identifier](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones). Can be `null` if the bank does not provide a time or timezone info.
      </td>
    </tr>

    <tr>
      <td>
        **internal_account_id**  
        _string_
      </td>

      <td>
        The ID of the account for this transaction.
      </td>
    </tr>

    <tr>
      <td>
        **metadata**  
        _object_
      </td>

      <td>
        Additional data represented as key-value pairs. Both the key and value must be strings. See [Metadata](https://docs.moderntreasury.com/platform/reference/metadata)
      </td>
    </tr>

    <tr>
      <td>
        **custom_identifiers**  
        _object_
      </td>

      <td>
        Additional data to be used with reconciliation rules to further enhance custom matching. Similar to the `custom_identifiers` field in expected payments [example](https://docs.moderntreasury.com/platform/reference/create-expected-payment-examples).
      </td>
    </tr>

    <tr>
      <td>
        **posted**  
        _boolean_
      </td>

      <td>
        This field will be true if the transaction has posted to the account.
      </td>
    </tr>

    <tr>
      <td>
        **vendor_customer_id**  
        _string_
      </td>

      <td>
        An identifier given to this transaction by the bank, often `null`.
      </td>
    </tr>

    <tr>
      <td>
        **reconciled**  
        _boolean_
      </td>

      <td>
        This field will be true if a transaction is reconciled by the Modern Treasury system. This means that it has transaction line items that sum up to the transaction's amount.
      </td>
    </tr>

    <tr>
      <td>
        **details**  
        _object_
      </td>

      <td>
        This field contains additional information that the bank provided about the transaction. This is structured data.

        Attributes passed through the `details` field will vary based on your banking partner.

        This field may contain personally identifiable information (PII) and is not included in API responses by default. Learn more about changing your settings in [Data Privacy Controls](https://docs.moderntreasury.com/platform/reference/data-privacy-controls).
      </td>
    </tr>

    <tr>
      <td>
        **live_mode**  
        _boolean_
      </td>

      <td>
        This field will be true if this object exists in the live environment or false if it exists in the test environment.
      </td>
    </tr>

    <tr>
      <td>
        **type**  
        _string_
      </td>

      <td>
        See [Transaction Types](https://docs.moderntreasury.com/platform/reference/payment-order-object).
      </td>
    </tr>
  </tbody>
</Table>

```json Transaction Example
{
  "id": "7fb6c79f-5100-4929-8622-a62c247187d8",
  "amount": 20000,
  "currency": "USD",
  "direction": "debit",
  "vendor_code": "495",
  "vendor_id": null,
  "as_of_date": "2018-11-07",
  "as_of_time": "12:34:56,
  "as_of_timezone": "America/Los_Angeles",
  "internal_account_id": "dcac4afe-41b5-4963-a1e5-9abc06e99c00",
  "metadata": {},
  "custom_identifiers":{
    "buyer_email_address": "jennifer.dough@email.com",
    "payment_id": "abc123"
  },
  "posted": true,
  "vendor_customer_id": null,
  "reconciled": false,
  "live_mode": true,
  "type": "ach",
  "created_at": "2019-11-09T00:11:07Z",
  "updated_at": "2019-11-09T00:11:07Z"
}
```