Table of Contents

JSON results reference

This is the shape of l3lint lint --output json, the contract for machines. The MCP tool lint_payload returns the same transaction and finding objects. See Output formats for the other formats and the exit codes.

Schema: results.schema.json (JSON Schema draft 2020-12, $id https://brimatt16219.github.io/l3lint/schemas/results.schema.json). l3lint schema results prints the same file.

The JSON output of l3lint lint. Findings are advisory: they say a payload is likely to downgrade or meets the documented requirement. Card networks and issuers decide the rate.

Types read "string or null" when a property may also be null. In the tables, an object that has its own table links to it.

Root object

Property Type Required Constraints Description
schemaVersion string no always 1.0 Results schema version.
tool object, see tool yes The tool that wrote the results.
rulePacks map of string keys to string yes Rule pack ID to pack version.
asOf string or null no pattern ^[0-9]{4}-[0-9]{2}-[0-9]{2}$ The --as-of date when given, else null (each transaction then carries its own as-of date).
profile string no Processor profile used.
inputs array of object, see inputs[] yes Every input of the run, in the order given.
inputErrors array of object, see inputErrors[] no Inputs, or NDJSON records, that could not be read. Each one makes the exit code at least 2.
transactions array of transaction yes One entry per transaction, in input order.
batchFindings array of finding no Findings about the run as a whole, such as GEN-DQ-007. Each points at the first transaction that carries the repeated value.
summary object, see summary yes Counts over every finding, including findings left out by --max-findings.
notes array of string no Notes about the run, such as where the settings came from.
exitCode integer yes at least 0; at most 3 The exit code of the run: 0 clean or below --fail-on, 1 findings at or above --fail-on, 2 usage or input error, 3 rule pack, config or internal error.

No other properties are allowed.

tool

The tool that wrote the results.

Property Type Required Constraints Description
name string yes Always l3lint.
version string yes Engine version, for example 1.0.0.
informationUri string no Project home page.

No other properties are allowed.

inputs[]

Property Type Required Constraints Description
path string yes The path as given (relative paths stay relative), or - for standard input.
format string yes The format the input was read as, for example stripe; unknown when it could not be read.
sha256 string yes at least 1 character Lowercase hex SHA-256 of the input's bytes.
transactions integer yes at least 0 How many transactions the input held.

No other properties are allowed.

inputErrors[]

Property Type Required Constraints Description
path string yes The input that failed.
line integer or null no The line where reading failed, when known.
message string yes What went wrong and what to change.
candidates array of string no The formats that tied when detection could not choose; pass one with --format.

No other properties are allowed.

summary

Counts over every finding, including findings left out by --max-findings.

Property Type Required Constraints Description
transactions integer yes at least 0 Transactions linted.
errors integer yes at least 0 Error findings.
warnings integer yes at least 0 Warning findings.
information integer yes at least 0 Information findings.
byRule map of string keys to integer yes values: at least 0 Rule ID to the number of findings it raised.
byBrand map of string keys to object, see summary.byBrand.* no Brand to finding counts. A general rule's findings count under the transaction's brand.
findingsShown integer no at least 0 Findings written to the output. Present only when --max-findings left some out.
findingsOmitted integer no at least 0 Findings left out by --max-findings. Present only when above 0.

No other properties are allowed.

summary.byBrand.*

Property Type Required Constraints Description
errors integer yes at least 0 Error findings for the brand.
warnings integer yes at least 0 Warning findings for the brand.
information integer yes at least 0 Information findings for the brand.

No other properties are allowed.

transaction

The result for one transaction.

Property Type Required Constraints Description
index integer yes at least 0 0-based position of the transaction in the run.
input integer yes at least 0 0-based index of its input in inputs.
id string or null no The transaction ID from the payload.
brand string no one of visa, mastercard, amex, discover, unknown The effective card brand: the --brand flag, else the payload, else the config file.
brands array of string no items: one of visa, mastercard, amex, discover, unknown Every brand evaluated: one brand normally, all four with --brand all. Absent when the brand is unknown and only general rules ran.
cardProduct string or null no one of consumer, business, corporate, purchasing, fleet, commercialPrepaid, unknown The effective card product.
mcc string or null no The effective merchant category code.
format string no The adapter that read the transaction, for example stripe.
asOf string or null no pattern ^[0-9]{4}-[0-9]{2}-[0-9]{2}$ The date whose rules applied: --as-of, else transactionDate, else the day of the run.
likelyTier tier or null no The tier rollup for the transaction's brand, or null when the brand is unknown.
likelyTiers array of tier no One tier rollup per evaluated brand. Present when more than one brand was evaluated.
costEstimate costEstimate no Estimated cost from the user's rate table. Present only with --rates.
notes array of string no Notes such as context overrides and adapter remarks.
findings array of finding yes The findings, sorted by canonical path, then rule ID.

No other properties are allowed.

finding

One rule result on one transaction.

Property Type Required Constraints Description
ruleId string yes pattern ^((GEN|VISA|MC|AMEX|DISC)-[A-Z0-9]+-[0-9]{3}|L3LINT-[A-Z]+-[0-9]{3})$ The rule ID, for example VISA-L3-004, or an engine diagnostic ID such as L3LINT-ENGINE-001.
severity string yes one of error, warning, information The effective severity after profile scoping and overrides.
impact string yes one of blocksLevel3, blocksLevel2, riskVisaValidation, truncation, noBenefit, hygiene What the finding means for the interchange tier.
brand string no one of visa, mastercard, amex, discover, unknown The brand whose pack raised the finding. Absent for general rules.
transactionIndex integer no at least 0 0-based index of the transaction. Present in batchFindings.
path object, see finding.path yes Where the problem is.
location object, see finding.location or null no Line and column of the value in the input file, or null when the value is absent or the position is unknown.
message string yes What is wrong, in plain words.
expected string or null no What the rule expected, when it can be stated.
actual string or null no The value found, already masked for card numbers; null when the value is absent.
fix string yes How to fix it, stated as an action.
patch array of patchOperation or null no A mechanical RFC 6902 patch for this finding, or null when there is none.
needsHuman boolean no True when a person must decide the fix, for example a proposed unit mapping. Absent otherwise.
confidence string yes one of public-brand, processor-doc, inferred, policy The rule's confidence label.
sources array of string yes Public pages the rule comes from.

No other properties are allowed.

finding.path

Where the problem is.

Property Type Required Constraints Description
canonical string yes JSON Pointer in the canonical payload, for example /lineItems/1/commodityCode.
source string or null no The same place in the original format, such as a Stripe JSON Pointer or a CSV cell label; null when the format has no such field.

No other properties are allowed.

finding.location

Property Type Required Constraints Description
line integer yes at least 1 1-based line in the input file.
column integer yes at least 1 1-based column in the input file.

No other properties are allowed.

tier

The tier rollup for one brand: the best tier the card and MCC allow and the tier the data likely reaches.

Property Type Required Constraints Description
brand string no one of visa, mastercard, amex, discover, unknown The brand. Present in likelyTiers entries.
best string yes one of product3, product2, belowProduct3, belowProduct2, dataRate3, dataRate2, dataRate1, none The best tier the card and MCC allow, or none.
likely string yes one of product3, product2, belowProduct3, belowProduct2, dataRate3, dataRate2, dataRate1, none The tier the payload likely reaches.
status string yes one of meets, atRisk, blocked, noBenefit meets: the payload meets the documented requirements of the best tier. atRisk: Visa may still reject the data after settlement. blocked: an error finding blocks the best tier. noBenefit: no enhanced-data rate exists for this card, brand or MCC.
blockingErrors integer no at least 0 How many error findings blocked tiers.

No other properties are allowed.

costEstimate

Estimated interchange cost from the user's rate table. Always an estimate, never the actual fee.

Property Type Required Constraints Description
label string yes always estimate Always estimate.
rateTable string yes The rate table's name.
effective string yes The rate table's effective date.
currency string yes Currency of the amounts.
estimates array of object, see costEstimate.estimates[] yes One entry per evaluated brand that has categories in the rate table.

No other properties are allowed.

costEstimate.estimates[]

Property Type Required Constraints Description
brand string yes one of visa, mastercard, amex, discover, unknown The brand.
likelyTier string yes The rate table tier used for the likely outcome.
likelyCost number or null yes Estimated cost at the likely tier, or null when the table has no matching category.
bestTier string yes The rate table tier used for the best outcome.
bestCost number or null yes Estimated cost at the best tier, or null when the table has no matching category.
difference number or null yes Likely cost minus best cost, when both exist: what the downgrade likely costs.

No other properties are allowed.

patchOperation

One RFC 6902 JSON Patch operation in the source format's paths and units.

Property Type Required Constraints Description
op string yes one of add, remove, replace, move, copy, test The operation.
path string yes JSON Pointer of the target value in the source document.
from string no JSON Pointer of the source value, for move and copy.
value any JSON value no The value to add, replace or test.