Egress Message Format

We support both denormalised and normalised egress formats for all interfaces, API, Kafka and SFTP, with schemas documented below.

Egress message schema

FieldTypeOptionalDescription
idStringNoUnique identifier of the transaction event persisted in the database.
transactionIdStringNoUnique identifier for the transaction.
accountIdStringNoUnique identifier for the account.
userIdStringNoUnique identifier for the customer.
accountTypeStringNoThe account type: e.g. current, credit cards, savings.
txCodeStringNoThe transaction code: e.g. cash withdrawal, credit card payment, direct debit payment, point-of-sale payment.
dateStringNoThe YYYY-MM-DD date of the transaction.
descriptionStringNoThe transaction description, or statement reference. It is commonly a combination of the merchant name and merchant location.
amountAmountNoThe transaction amount. See Amount Schema .
statusStringYesThe transaction status, either pending or booked.
merchantCategoryCodeStringYesMCC code for the merchant’s primary activities.
metaObjectYesAdditional data for storage/pass-through.
l2CategoryCategoryNoThe L2 category of the transaction. See Category Schema .
l3CounterpartyCounterpartyYesThe L3 counterparty of the transaction. See Counterparty Schema .
geotagsArray<Geotag>YesGeotags for up to 3 candidate locations where the transaction could have taken place are ordered from most likely to least likely. See Geotag Schema.
cardPresentBooleanYesWas the cardholder present when the transaction occurred? Note that online purchases are considered cardholder not present. Only cardholder-present transactions are eligible for geotagging. We estimate this field from the transaction data.
timestampCreatedStringYesTimestamp of when the message containing the transaction was created on the Kafka raw ingest topic, i.e. the Kafka topic that the Enrichment Engine retrieves messages from. For the API interface, this is effectively when the transaction was sent to the API.
timestampIngressStringYesTimestamp of when a transaction started being processed.
timestampEgressStringYesA timestamp is set on the transaction when processing has finished, and it is about to be sent to the egress topic, and in the API case, sent back as the response.

Example

Based on the example ingress message.

{
    "id": "741bc0c5-b798-48bf-9a91-58cf997b0840",
    "transactionId": "123456",
    "accountId": "5382358854398",
    "userId": "5382358854398",
    "accountType": "cash",
    "txCode": ")))",
    "date": "1970-01-01",
    "description": "Tesco BriLL 293484 SS",
    "amount": {
        "value": -10.99,
        "currency": "GBP"
    },
    "status": "booked",
    "merchantCategoryCode": "5411",
    "meta": {
        "sourceSystem": "hex",
        "authorisedBy": "PStibbons",
        "yearOfCreation": "Year of the Luminous Lemur"
    },
    "l2Category": {
        "l2CategoryId": "std:"
    },
    "l3Counterparty": {
        "l3CounterpartyId": "030a7556-e17d-432d-8afb-7a9f71128152"
    },
    "geotags": [
        {
            "geotagId": "39828184-5334-4ec5-ba65-8985912542dc"
        },
        {
            "geotagId": "b4a9bf43-2b54-45d9-9bbd-a0aa1286e302"
        },
        {
            "geotagId": "669c42a7-632c-43e4-b9f8-7f2b9f797e5e"
        }
    ],
    "cardPresent": true,
    "timestampCreated": "1970-01-01T00:00:00Z",
    "timestampIngress": "1970-01-01T00:00:00Z",
    "timestampEgress": "1970-01-01T00:00:00Z"
}
{
    "id": "741bc0c5-b798-48bf-9a91-58cf997b0840",
    "transactionId": "123456",
    "accountId": "5382358854398",
    "userId": "5382358854398",
    "accountType": "current",
    "type": "point-of-sale payment",
    "date": "1970-01-01T00:00:00Z",
    "description": "Tesco BriLL 293484 SS",
    "amount": {
        "value": 999,
        "currency": "GBP"
    },
    "status": "booked",
    "merchantCategoryCode": "5411",
    "meta": {
        "sourceSystem": "hex",
        "authorisedBy": "PStibbons",
        "yearOfCreation": "Year of the Luminous Lemur"
    },
    "l2Category": {
        "l1CategoryId": "std:1567",
        "l1CategoryName": "Shopping",
        "l2CategoryId": "std:12345",
        "l2CategoryName": "Groceries"
    },
    "l3Counterparty": {
        "l3CounterpartyId": "030a7556-e17d-432d-8afb-7a9f71128152",
        "l3CounterpartyName": "Tesco Express - Redcliffe, Bristol",
        "parentId": "b3e0c142-1377-4e7d-b434-37b64d34a008",
        "parentName": "Tesco Groceries",
        "fullCompanyName": "Tesco Stores Limited",
        "logoUrl": "examplelogo.com",
        "website": "example.com",
        "registeredLocation": null,
        "l2CategoryName": "Groceries",
        "l3CounterpartyCategory": "Convenience shop",
        "l4LoanType": null
    },
    "geotags": [
        {
            "geotagId": "39828184-5334-4ec5-ba65-8985912542dc",
            "counterpartyName": "",
            "counterpartyLabel": "",
            "houseNumber": "",
            "street": "",
            "neighbourhood": "",
            "locality": "",
            "city": "",
            "county": "",
            "region": "",
            "postcode": "",
            "latitude": "",
            "longitude": "",
            "counterpartyCategory": "",
            "postcodeEstimated": "",
            "postcodeErrorKm": ""
        },
        {
            "geotagId": "b4a9bf43-2b54-45d9-9bbd-a0aa1286e302",
            "counterpartyName": "",
            "counterpartyLabel": "",
            "houseNumber": "",
            "street": "",
            "neighbourhood": "",
            "locality": "",
            "city": "",
            "county": "",
            "region": "",
            "postcode": "",
            "latitude": "",
            "longitude": "",
            "counterpartyCategory": "",
            "postcodeEstimated": "",
            "postcodeErrorKm": ""
        },
        {
            "geotagId": "669c42a7-632c-43e4-b9f8-7f2b9f797e5e",
            "counterpartyName": "",
            "counterpartyLabel": "",
            "houseNumber": "",
            "street": "",
            "neighbourhood": "",
            "locality": "",
            "city": "",
            "county": "",
            "region": "",
            "postcode": "",
            "latitude": "",
            "longitude": "",
            "counterpartyCategory": "",
            "postcodeEstimated": "",
            "postcodeErrorKm": ""
        }
    ],
    "cardPresent": "TRUE",
    "timestampCreated": "1970-01-01T00:00:00Z",
    "timestampIngress": "1970-01-01T00:00:00Z",
    "timestampEgress": "1970-01-01T00:00:00Z"
}