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
Field | Type | Optional | Description |
---|---|---|---|
id | String | No | Unique identifier of the transaction event persisted in the database. |
transactionId | String | No | Unique identifier for the transaction. |
accountId | String | No | Unique identifier for the account. |
userId | String | No | Unique identifier for the customer. |
accountType | String | No | The account type: e.g. current, credit cards, savings. |
txCode | String | No | The transaction code: e.g. cash withdrawal, credit card payment, direct debit payment, point-of-sale payment. |
date | String | No | The YYYY-MM-DD date of the transaction. |
description | String | No | The transaction description, or statement reference. It is commonly a combination of the merchant name and merchant location. |
amount | Amount | No | The transaction amount. See Amount Schema . |
status | String | Yes | The transaction status, either pending or booked. |
merchantCategoryCode | String | Yes | MCC code for the merchant’s primary activities. |
meta | Object | Yes | Additional data for storage/pass-through. |
l2Category | Category | No | The L2 category of the transaction. See Category Schema . |
l3Counterparty | Counterparty | Yes | The L3 counterparty of the transaction. See Counterparty Schema . |
geotags | Array<Geotag> | Yes | Geotags for up to 3 candidate locations where the transaction could have taken place are ordered from most likely to least likely. See Geotag Schema. |
cardPresent | Boolean | Yes | Was 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. |
timestampCreated | String | Yes | Timestamp 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. |
timestampIngress | String | Yes | Timestamp of when a transaction started being processed. |
timestampEgress | String | Yes | A 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"
}
Updated about 1 month ago