> ## Documentation Index
> Fetch the complete documentation index at: https://docs.ebury.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Transaction Models

These models are returned by the [get all transactions](#get-transactions-for-all-accounts) and [get an account transactions](#get-transactions-for-a-single-account) endpoints.

## TransactionData

```json theme={null}
  {
    "account_id": "c18a42df-6652-d462-351b-0485a6d6bc16",
    "additional_transaction_information": "EURGBP 0.876804 - other",
    "amount": {
        "amount": "100.00",
        "currency": "EUR"
    },
    "balance": {
        "amount": {
            "amount": "50212.85",
            "currency": "EUR"
        },
        "credit_debit_indicator": "Credit",
        "type": "InterimAvailable",
    },
    "booking_datetime": "2019-11-11T20:37:30.598",
    "client_id": "EBPCLI285330",
    "credit_debit_indicator": "Credit",
        "creditor_account": {
        "account_name": "EBURY OFFICE ACC CHF",
        "account_number": "",
        "bank_identifier": "",
        "bank_identifier_code": "",
        "iban": "GB78BARC12345678901234",
        "swift": ""
    },
    "creditor_name": "Jorge Chapa",
    "debtor_account": {
        "account_name": "Cool Account",
        "account_number": "1234567890",
        "bank_identifier": "123456",
        "bank_identifier_code": "",
        "iban": "",
        "swift": "RACZHUH1123"
    },
    "debtor_name": "Jorge Corp",
    "status": "Booked",
    "transaction_id": "3ae5b450-1e1a-b116-1fde-3cb4f0353e16",
    "transaction_information": "Bought EUR EBPOTR002772",
    "transaction_reference": "EBPOTR002772",
    "transaction_type": "credit",
    "value_datetime": "2019-11-11T20:37:30.598"
  }
```

This model is a representation of a single transaction for an account within Ebury.

**Fields**

<ResponseField name="account_id" type="string">
  The UUID of the account
</ResponseField>

<ResponseField name="additional_transaction_information" type="string">
  Additional information for the transaction
</ResponseField>

<ResponseField name="amount" type="object">
  The [`Amount`](#amount) of the transaction
</ResponseField>

<ResponseField name="balance" type="object">
  The [`Balance`](#transactionbalance) of the transaction
</ResponseField>

<ResponseField name="booking_datetime" type="string">
  Date and time (UTC) when the transaction was booked
</ResponseField>

<ResponseField name="client_id" type="string">
  Identifier of the client
</ResponseField>

<ResponseField name="credit_debit_indicator" type="string">
  One of [`CreditDebitIndicator`](#creditdebitindicator)
</ResponseField>

<ResponseField name="creditor_account" type="object">
  The [`Bank Account`](#creditordebtoraccount) information of the creditor
</ResponseField>

<ResponseField name="creditor_name" type="string">
  Name of the creditor
</ResponseField>

<ResponseField name="debtor_account" type="object">
  The [`Bank Account`](#creditordebtoraccount) information of the debtor
</ResponseField>

<ResponseField name="debtor_name" type="string">
  Name of the debtor
</ResponseField>

<ResponseField name="status" type="string">
  One of [`TransactionStatus`](#transactionstatus)
</ResponseField>

<ResponseField name="transaction_id" type="string">
  The UUID of the transaction
</ResponseField>

<ResponseField name="transaction_information" type="string">
  Basic information for the transaction
</ResponseField>

<ResponseField name="transaction_reference" type="string">
  Reference for the transaction
</ResponseField>

<ResponseField name="transaction_type" type="string">
  The [`TransactionType`](#transactiontype) of the transaction
</ResponseField>

<ResponseField name="trade_id" type="string">
  Comma separated list of trade ids
</ResponseField>

<ResponseField name="value_datetime" type="string">
  Value date and time (UTC) of the transaction
</ResponseField>

## TransactionBalance

```json theme={null}
{
    "amount": {
        "amount": "50212.85",
        "currency": "EUR"
    },
    "credit_debit_indicator": "Credit",
    "type": "InterimAvailable"
}
```

This model is a representation of the balance of the account (rounded to the currency decimal places) when the transaction happens.

**Fields**

<ResponseField name="amount" type="object">
  The [`Amount`](#amount) of the transaction
</ResponseField>

<ResponseField name="credit_debit_indicator" type="string">
  One of [`CreditDebitIndicator`](#creditdebitindicator)
</ResponseField>

<ResponseField name="type" type="string">
  Type of the balance. One of [`BalanceType`](#balancetype)
</ResponseField>

## TransactionStatus

This is an enumeration of the transaction status types

**Values**

| Value | Description |
| - | - |
| `Booked` | Booked |

## TransactionType

This is an enumeration of the transaction types

**Values**

| Value | Description |
| - | - |
| `credit` | Record of any activity that generates a positive(credit) transaction on the account. |
| `debit` | Record of any activity that generates a negative(debit) transaction on the account (debit from the customer account). |
| `incoming` | Record of the incoming funds from an external source (credit into customer account from third parties, other clients, client's own accounts at other banks etc.,). incoming as a type exclusively covers a subset of transactions which are originally of the type credit. |
| `margin` | Record of the deposits, refunds related to forward trades. |
| `payment_returned` | Record created when funds can't be credited to the beneficiary and the counterparty returned the funds to the customer. |
| `trade` | Record of any trade operation (credit and debit) |

## CreditorDebtorAccount

```json theme={null}
{
    "account_name": "Cool Account",
    "account_number": "1234567890",
    "bank_identifier": "123456",
    "bank_identifier_code": "",
    "iban": "",
    "swift": "RACZHUH1123"
}
```

This model is a representation of the bank account information for the creditor/debtor of a transaction

**Fields**

<ResponseField name="account_name" type="string">
  The name of the account's owner
</ResponseField>

<ResponseField name="account_number" type="string">
  Account number
</ResponseField>

<ResponseField name="bank_identifier" type="string">
  Account bank identifier
</ResponseField>

<ResponseField name="bank_identifier_code" type="string">
  Account bank identifier code (UK sort code, US ABA/FedWire, etc.)
</ResponseField>

<ResponseField name="iban" type="string">
  Account IBAN
</ResponseField>

<ResponseField name="swift" type="string">
  Account SWIFT code
</ResponseField>
