[
    {
        "name": "transaction_id",
        "type": "STRING",
        "mode": "REQUIRED",
        "description": "MANDATORY: Unique ID of this transaction, from the point of view of the specified Account. Note that a transfer is between two accounts, both in the Account table, and should be represented by two transactions with separate transaction IDs, one with direction = DEBIT and one with direction = CREDIT."
    },
    {
        "name": "validity_start_time",
        "type": "TIMESTAMP",
        "mode": "REQUIRED",
        "description": "MANDATORY: Timestamp when the information of this row was the correct state of the entity."
    },
    {
        "name": "is_entity_deleted",
        "type": "BOOL",
        "mode": "NULLABLE",
        "description": "RECOMMENDED: If set to TRUE, indicates the Transaction is no longer present in your system of record."
    },
    {
        "name": "source_system",
        "type": "STRING",
        "mode": "NULLABLE",
        "description": "RECOMMENDED: Name of the system that this row was fetched from to help manage data lineage. This field has no impact on AML AI functionality."
    },
    {
        "name": "type",
        "type": "STRING",
        "mode": "REQUIRED",
        "description": "MANDATORY: High level type of the transaction. Supported values: CARD, transaction involving a credit or debit card (includes GPay); CASH, transaction where cash is paid into or withdrawn from an account; CHECK, transaction where a cheque is used; WIRE, default for other transactions, including transfers between accounts at the same or different banks. One of: [WIRE:CASH:CHECK:CARD:OTHER:CRYPTO]."
    },
    {
        "name": "direction",
        "type": "STRING",
        "mode": "REQUIRED",
        "description": "MANDATORY: Direction of the transaction assets flow from the point of view of the specified account ID. Uses common definition of credit/debit in banking. Supported values: DEBIT, represents a transfer of value from this account; CREDIT, represents a transfer of value to this account One of: [DEBIT:CREDIT]."
    },
    {
        "name": "account_id",
        "type": "STRING",
        "mode": "REQUIRED",
        "description": "MANDATORY: Account ID of the Account in the Account Party Link table."
    },
    {
        "name": "counterparty_account",
        "type": "STRUCT",
        "mode": "NULLABLE",
        "description": "MANDATORY: Details of counterparty and their account used in this transaction. Relates specifically to WIRE, CASH and CHECK transactions. For CARD transactions, this may represent the merchant or be NULL in case you do not have these details.",
        "fields": [
            {
                "name": "account_id",
                "type": "STRING",
                "mode": "NULLABLE",
                "description": "MANDATORY: Account ID of a transaction's counterparty, if in the AccountPartyLink table. Can be NULL if the counterparty account is not represented in the Account Party Link table, for example, the customer of another financial institution."
            },
            {
                "name": "counterparty_name",
                "type": "STRING",
                "mode": "NULLABLE",
                "description": "EXPERIMENTAL: Name of the counterparty."
            },
            {
                "name": "addresses",
                "type": "STRUCT",
                "mode": "REPEATED",
                "description": "EXPERIMENTAL: Counterparty address, if known.",
                "fields": [
                    {
                        "name": "address_line",
                        "type": "STRING",
                        "mode": "NULLABLE",
                        "description": "RECOMMENDED: First line of address in case not captured by street and building number."
                    },
                    {
                        "name": "street",
                        "type": "STRING",
                        "mode": "NULLABLE",
                        "description": "RECOMMENDED: Street of the address."
                    },
                    {
                        "name": "building_number",
                        "type": "STRING",
                        "mode": "NULLABLE",
                        "description": "RECOMMENDED: Building number of the address."
                    },
                    {
                        "name": "post_office_box",
                        "type": "STRING",
                        "mode": "NULLABLE",
                        "description": "RECOMMENDED: PO Box identifier in case the address is a PO Box."
                    },
                    {
                        "name": "post_code",
                        "type": "STRING",
                        "mode": "NULLABLE",
                        "description": "RECOMMENDED: Postcode. Include postcode for each Party where this is known to the bank."
                    },
                    {
                        "name": "town",
                        "type": "STRING",
                        "mode": "NULLABLE",
                        "description": "RECOMMENDED: Town of the address."
                    },
                    {
                        "name": "subregion",
                        "type": "STRING",
                        "mode": "NULLABLE",
                        "description": "MANDATORY: Region within the country. For AML do not use NULL for this field."
                    },
                    {
                        "name": "region_code",
                        "type": "STRING",
                        "mode": "NULLABLE",
                        "description": "MANDATORY: Country or region in two-letter Unicode CLDR code format. Do not use NULL for this field."
                    }
                ]
            },
            {
                "name": "region_code",
                "type": "STRING",
                "mode": "NULLABLE",
                "description": "RECOMMENDED: Country or region of the counterparty account in two-letter Unicode CLDR code format. In the case of cash withdrawals or deposits, this should be the country where the cash was withdrawn or deposited."
            }
        ]
    },
    {
        "name": "book_time",
        "type": "TIMESTAMP",
        "mode": "NULLABLE",
        "description": "MANDATORY: The time when the transaction was posted to the account (recommended). You may use a different time if preferred by your internal processes and controls."
    },
    {
        "name": "normalized_booked_amount",
        "type": "STRUCT",
        "mode": "NULLABLE",
        "description": "MANDATORY: Non-negative booked amount posted on the party's account, normalized to a standard currency for the whole dataset.",
        "fields": [
            {
                "name": "currency_code",
                "type": "STRING",
                "mode": "REQUIRED",
                "description": "MANDATORY: The three-letter currency code defined in ISO 4217."
            },
            {
                "name": "units",
                "type": "INT64",
                "mode": "REQUIRED",
                "description": "MANDATORY: The whole units of the amount. For example, if currency_code is USD, then 1 unit is one US dollar."
            },
            {
                "name": "nanos",
                "type": "INT64",
                "mode": "REQUIRED",
                "description": "MANDATORY: Number of nano (10^-9) units of the amount. The value must be between 0 and 999,999,999, inclusive. Nanos must be positive or zero."
            }
        ]
    },
    {
        "name": "ip_address",
        "type": "STRUCT",
        "mode": "NULLABLE",
        "description": "EXPERIMENTAL: Ip address from which the transaction was booked.",
        "fields": [
            {
                "name": "type",
                "type": "STRING",
                "mode": "NULLABLE",
                "description": "MANDATORY: IP address type. One of: [V4:V6]."
            },
            {
                "name": "ip",
                "type": "STRING",
                "mode": "NULLABLE",
                "description": "EXPERIMENTAL: IP address."
            },
            {
                "name": "obfuscated_ip",
                "type": "STRING",
                "mode": "NULLABLE",
                "description": "EXPERIMENTAL: IP address, obfuscated."
            },
            {
                "name": "region_code",
                "type": "STRING",
                "mode": "NULLABLE",
                "description": "EXPERIMENTAL: Region code extracted from the IP address in two-letter Unicode CLDR code format, if known."
            },
            {
                "name": "is_vpn",
                "type": "BOOL",
                "mode": "NULLABLE",
                "description": "EXPERIMENTAL: Whether a VPN service was used."
            }
        ]
    }
]