Regular Transactions Schema for Egress

Field reference for regular transaction series messages on the Kafka egress topic.

Message envelope

The Kafka message value is a JSON object produced by the regular-transactions worker:

FieldTypeOptionalDescription
accountIdString (max 36)NoAccount identifier for which series were computed.
predictionsArray<Object>NoArray of regular transaction series objects (schema below). May be empty.

Series object (predictions[])

Each element matches the object built in the worker’s result-formatting stage.

FieldTypeOptionalDescription
seriesIdString (max 36)NoThe ID of the regular transaction series. UUID format.
accountIdString (max 36)NoThe ID of the account the transactions belong to.
userIdString (max 36)YesThe ID of the user the transactions belong to.
typeString (max 7)NoWhether the series contains income or payment transactions (income or payment).
subtypeString (max 21)YesSubtype: directDebit, standingOrder, frequentVisit, committedCardPayment, or other.
frequencyString (max 11)NoFrequency: yearly, quarterly, monthly, fortnightly, or weekly.
descriptionString (max 256)NoThe full description of the latest transaction in the series. Same limit as enriched transaction description.
cleanedDescriptionString (max 256)NoThe cleaned description of the latest transaction in the series.
matchMethodString (max 64)NoThe method used to match transactions in the series.
stitchedBooleanNoWhether the series has been stitched together from multiple series.
numTxMatchedInSeriesIntegerNoThe number of transactions contained in the series.
gapLengthInFreqUnitsIntegerNoIf the series contains a gap, the number of whole frequency units that are missing.
dateAnomaliesCountIntegerNoThe number of date anomalies detected in the series.
numReturnedTxsIntegerNoThe number of returned transactions (reversed or declined) contained in the series.
lastDateString (max 10)NoThe date of the latest transaction in the series (yyyy-MM-dd).
predictedDateString (max 10)NoThe predicted date of the next transaction in the series (yyyy-MM-dd).
predictedDateEarliestString (max 10)YesThe earliest predicted date at which the next transaction could occur (null if not set).
predictedDateLatestString (max 10)YesThe latest predicted date at which the next transaction could occur (null if not set).
predictedDateMethodString (max 64)NoThe method used to predict the next transaction date.
predictedTxLateOrNotDetectedBooleanYesWhether the next predicted transaction is overdue or not detected. May be omitted if not set.
predictedAmountNumberNoThe predicted amount of the next transaction (as emitted by detection; currency base units where applicable).
predictedAmountLowerNumberYesLower bound of the predicted amount.
predictedAmountUpperNumberYesUpper bound of the predicted amount.
predictedAmountMethodString (max 64)NoThe method used to predict the next transaction amount.
currencyString (max 3)YesISO 4217 currency code. Same limit as enriched transaction currency.
counterpartyIdString (max 36)YesL3 counterparty identifier from the first matched transaction that has counterparty enrichment. UUID format.
predictedCategoryIdString (max 3)NoThe ID of the predicted category. Same limit as enriched transaction l2CategoryId.
analysisCategoryString (max 32)YesThe analysis category for the series. Same limit as counterparty l3CounterpartyCategory.
transactionsStringNoJSON string encoding an array of transaction objects (see below). Not a native JSON array on the wire.

Parsed shape of transactions

After JSON.parse on the transactions string, each element has:

FieldTypeDescription
uidString (max 36)Transaction identifier.
dateString (max 10)Transaction date (yyyy-MM-dd).
descriptionString (max 256)Transaction description.
amountNumberTransaction amount.
categoryIdString (max 3)Category ID.
cleanedDescriptionString (max 256)Cleaned description.
txCodeString (max 64)Provider transaction type code.
cardPresentBooleanWhether the transaction was card-present.
analysisCategoryString (max 32)Counterparty analysis category identifier. May be omitted when not available.

Example (Kafka message body)

{
  "accountId": "090ea264-eb48-494c-9d59-1b10b322c3e1",
  "predictions": [
    {
      "seriesId": "45f004dc-254f-5d09-b07f-8d4de4487781",
      "accountId": "090ea264-eb48-494c-9d59-1b10b322c3e1",
      "userId": null,
      "type": "payment",
      "subtype": "frequentVisit",
      "frequency": "quarterly",
      "description": "Dentist Checkup",
      "cleanedDescription": "Dentist Checkup",
      "matchMethod": "default",
      "stitched": false,
      "numTxMatchedInSeries": 4,
      "gapLengthInFreqUnits": 0,
      "dateAnomaliesCount": 0,
      "numReturnedTxs": 0,
      "lastDate": "2026-01-20",
      "predictedDate": "2026-04-20",
      "predictedDateEarliest": "2026-04-20",
      "predictedDateLatest": "2026-04-21",
      "predictedDateMethod": "sameDay",
      "predictedTxLateOrNotDetected": false,
      "predictedAmount": -65,
      "predictedAmountLower": -65,
      "predictedAmountUpper": -65,
      "predictedAmountMethod": "sameAmount",
      "currency": "GBP",
      "counterpartyId": "203d5a9a-d4dd-5ce5-ab60-60f740336dea",
      "predictedCategoryId": "11",
      "analysisCategory": null,
      "transactions": "[{\"uid\":\"TXN-090ea264-775\",\"date\":\"2026-01-20\",\"description\":\"Dentist Checkup\",\"amount\":-65,\"categoryId\":\"11\",\"cleanedDescription\":\"Dentist Checkup\"},{\"uid\":\"TXN-090ea264-774\",\"date\":\"2025-10-20\",\"description\":\"Dentist Checkup\",\"amount\":-65,\"categoryId\":\"11\",\"cleanedDescription\":\"Dentist Checkup\"}]"
    }
  ]
}

The transactions value above is one string; parsed it is equivalent to:

[
  {
    "uid": "TXN-090ea264-775",
    "date": "2026-01-20",
    "description": "Dentist Checkup",
    "amount": -65,
    "categoryId": "11",
    "cleanedDescription": "Dentist Checkup"
  },
  {
    "uid": "TXN-090ea264-774",
    "date": "2025-10-20",
    "description": "Dentist Checkup",
    "amount": -65,
    "categoryId": "11",
    "cleanedDescription": "Dentist Checkup"
  }
]