6.1 Skip to content

6. Transactions ingest

6.1 Transaction injection

Trak.e supports the integration of the transactional information corresponding to each profile. This information can be injected through a REST API or through a batch import. Trak.e will carry out the defined checks in near-real time and in case of detecting unusual behavior, it will raise the corresponding alerts. Optionally, a notification callback to the external system can be configured, see Notifications for more information.

6.2 Representation and semantics of a transaction

Below are exemplary transactions along with a natural language description of each one of them.

6.2.1 Example 1: Transaction type: transfer_between_accounts

Consider the following description of a transaction:

Operation Description. On August 21, 2020 at 10:55 AM, the client Juan Pérez (with tax_payer_id 20-35665545-1 and proifle_id 5f05e2cd3bb063a00402b1b4), resident at the address 27 de Febrero al 1800, Rosario, Santa Fe, Argentina transfers Pedro González (with tax_payer_od 20-36985856-9), resident at Riobamba 76, Rosario, Santa Fe, Argentina the amount of 200 Argentine pesos, from the savings bank account (in Argentine pesos) of Bank A, identified by the alias "LLL.PPP.AAA", to the savings bank account (in Argentine pesos) of Bank B identified by the alias "cc".

  • Our client makes an outgoing transfer, we represent it with the side of transfer extraction. Previously we must have registered the customer's profile in the Trak.e services.
  • The transfer was made using a homebanking application.
  • The transfer was made in the vicinity of the intersection between Maipú and Rioja streets in the city of Rosario, Santa Fe, Argentina.

Its representation in the JSON markup language is as follows:

Example
{
    "profile_id":"5f05e2cd3bb063a00402b1b4",
    "transaction_type":"transfer_between_accounts",
    "timestamp":1598050520179,
    "side":"extraction",
    "amount":200,
    "currency":"ARS",
    "transaction_info":{
        "source":{
            "account_type":"savings_account",
            "currency":"ARS",
            "institution":"Banco A",
            "holder_name":"Juan Pérez",
            "holder_tax_payer_id":"20-35665545-1",
            "holder_id_number":"35699996",
            "holder_id_type":"DNI",
            "holder_id_country":"AR",
            "holder_address":{
                "country":"AR",
                "state":"Santa Fe",
                "city":"Rosario",
                "department":"Rosario",
                "zip_code":"2000",
                "street_name":"27 de febrero",
                "number":"1800"
            },
            "account_alias":"LLL.PPP.AAA"
        },
        "destination":{
            "account_type":"savings_account",
            "currency":"ARS",
            "institution":"Banco B",
            "holder_name":"Pedro González",
            "holder_tax_payer_id":"20-36985856-9",
            "holder_id_number":"39499639",
            "holder_id_type":"DNI",
            "holder_id_country":"AR",
            "holder_address":{
                "country":"AR",
                "state":"Santa Fe",
                "city":"Rosario",
                "department":"Rosario",
                "zip_code":"2000",
                "street_name":"Riobamba",
                "number":"76"
            },
            "institution_address":{
                "country":"AR",
                "state":"Santa Fe",
                "city":"Rosario",
                "department":"Rosario",
                "zip_code":"2000",
                "street_name":"Córdoba",
                "number":"1918"
            },
            "account_alias":"NNN.LLL.CCC"
        },
        "destination_type":"other",
        "institution_type":"other",
        "reason":"varios",
        "concept":"Pago de comida",
        "channel":"homebanking",
    },
    "geospatial_info":{
        "long":-32.94682,
        "lat":-60.63932
    }
}

6.2.2 Example 2: Transaction type: transfer_between_accounts

Consider the following description of a transaction:

Operation Description. On August 21, 2020 at 10:55 AM, the customer Juan Pérez (with CUIT 20-35665545-1), resident at the address 27 de Febrero al 1800, Rosario, Santa Fe, transfers Pedro González (with tax_payer_id 20-36985856-9 and profile_id 5f88bd99534940c398903b05), resident at Riobamba 76, Rosario, Santa Fe, the amount of 200 Argentine pesos, from the savings bank account (in Argentine pesos) of Bank A, identified by the alias "LLL.PPP.AAA", to the savings bank account (in Argentine pesos) of Bank B identified by the alias CBU "cc".

  • Our client receives a transfer, we represent him with the type of transfer deposit. Previously we must have registered the client's file in the Trak.e services.
  • The transfer was made using a homebanking application.
  • The transfer was made in the vicinity of the intersection between Maipú and Rioja streets in the city of Rosario, Santa Fe, Argentina.

Its representation in the JSON markup language is as follows:

Example
{
"profile_id":"5f88bd99534940c398903b05",
"transaction_type":"transfer_between_accounts",
"timestamp":1598050520179,
"side":"deposit",
"amount":200,
"currency":"ARS",
"transaction_info":{
    "source":{
        "account_type":"savings_account",
        "currency":"ARS",
        "institution":"Banco A",
        "holder_name":"Juan Pérez",
        "holder_tax_payer_id":"20-35665545-1",
        "holder_id_number":"35699996",
        "holder_id_type":"DNI",
        "holder_id_country":"AR",
        "holder_address":{
            "country":"AR",
            "state":"Santa Fe",
            "city":"Rosario",
            "department":"Rosario",
            "zip_code":"2000",
            "street_name":"27 de febrero",
            "number":"1800"
        },
        "account_alias":"LLL.PPP.AAA"
    },
    "destination":{
        "account_type":"savings_account",
        "currency":"ARS",
        "institution":"Banco B",
        "holder_name":"Pedro González",
        "holder_tax_payer_id":"20-36985856-9",
        "holder_id_number":"39499639",
        "holder_id_type":"DNI",
        "holder_id_country":"AR",
        "holder_address":{
            "country":"AR",
            "state":"Santa Fe",
            "city":"Rosario",
            "department":"Rosario",
            "zip_code":"2128",
            "street_name":"Riobamba",
            "number":"76"
        },
        "institution_address":{
            "country":"AR",
            "state":"Santa Fe",
            "city":"Rosario",
            "department":"Rosario",
            "zip_code":"2000",
            "street_name":"Córdoba",
            "number":"1918"
        },
        "account_alias":"NNN.LLL.CCC"
    },
    "destination_type":"other",
    "institution_type":"other",
    "reason":"varios",
    "concept":"Pago de comida",
    "channel":"homebanking",
},
"geospatial_info":{
    "long":-32.94682,
    "lat":-60.63932
}
}

6.2.3 Labels/Tags

A transaction can be marked using arbitrary strings as tags. A label has a minumum length of 2 characters and a maximum of 20 characters.

6.2.4 Additional information

The transaction can contain any additional information in key-value format. Additionally, each client can define the structure of this additional information by means of a json schema1. This specification will allow validation and standardization of the additional information.

For example if a transaction contains information about the buyer we can define:

{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://example.com/product.schema.json",
  "title": "Buyer",
  "description": "Additional information with a buyer",
  "type": "object",
  "properties": {
    "transaccion": {
      "description": "Transaction info",
      "type": "object",
      "properties": {
        "comprador":{
          "description": "Buyer info",
          "type": "object",
          "properties": {
            "name":{
              "type": "string",
            },
            "tax_id":{
              "type": "string"
            }
          }
        }
      }
    }
  }
}

Note

The $schema field indicates the version of the draft in which the JSON schema is written, so it is important to define it. Trak.e supports JSON schemas with a draft version equal to or greater than Draft 4.

After defining the schema, we can store and access the information in the transaction using the metadata.transaction.buyer attribute. It should be noted that in the absence of a schema, additional information can also be stored in the transaction, but no validation will be performed.

6.3 API Documentation

API