Rule reference
l3lint ships 78 rules in 5 rule packs. Each rule has its own page with the requirement, the reason, the check, the fix, its public sources and a passing and a failing example. l3lint explain <ruleId> prints the same page in a terminal.
Findings are advisory. A finding says a payload is likely to downgrade or misses a documented requirement; a clean result says the payload meets the documented requirements l3lint checks. Card networks and issuers decide the rate. See Rules, severity and confidence for how to read the columns below.
General (all brands)
Pack l3lint.rules.general version 1.0.0, published 2026-10-25, 23 rules.
| Rule | Title | Severity | Level | Confidence | Effective |
|---|---|---|---|---|---|
| GEN-ARITH-001 | Line total does not match quantity times unit cost less discount | error | L3 | processor-doc | always |
| GEN-ARITH-002 | Transaction amount does not match the line totals and summary amounts | error | L3 | processor-doc | always |
| GEN-ARITH-003 | Header tax differs from the sum of line taxes | warning | L3 | processor-doc | always |
| GEN-ARITH-004 | Negative quantity or unit cost on a debit line | error | L3 | processor-doc | always |
| GEN-ARITH-005 | Discount counted twice | warning | L3 | processor-doc | always |
| GEN-DQ-001 | Placeholder description | warning | L3 | inferred | always |
| GEN-DQ-002 | Description is the merchant name | warning | L3 | inferred | always |
| GEN-DQ-003 | Placeholder product code or unit | warning | L3 | inferred | always |
| GEN-DQ-004 | Filler customer code or PO | warning | L2 | inferred | always |
| GEN-DQ-005 | One-line invoice that mirrors the total | warning | L3 | inferred | always |
| GEN-DQ-006 | Generic or malformed commodity code | warning | L3 | inferred | always |
| GEN-DQ-007 | Same description or product code across most of a batch | warning | L3 | inferred | always |
| GEN-DQ-008 | Duplicate lines in one transaction | information | L3 | inferred | always |
| GEN-ELIG-001 | Consumer card | information | general | processor-doc | always |
| GEN-ELIG-002 | Card product unknown | information | general | policy | always |
| GEN-FMT-001 | Payload does not match the canonical schema | error | general | policy | always |
| GEN-FMT-002 | Currency missing or not ISO 4217 | error | general | policy | always |
| GEN-FMT-003 | Amount not positive, or more decimals than the currency allows | error | general | policy | always |
| GEN-FMT-004 | Descriptive text has unsupported characters | warning | general | processor-doc | always |
| GEN-FMT-005 | Too many line items | error | L3 | processor-doc | always |
| GEN-FMT-006 | Field longer than the brand or processor maximum | warning | general | processor-doc | always |
| GEN-FMT-007 | Line sequence numbers missing, duplicated or not contiguous | error | L3 | processor-doc | always |
| GEN-PCI-001 | Card number in the payload | error | general | policy | always |
Visa
Pack l3lint.rules.visa version 1.0.0, published 2026-10-25, 26 rules.
| Rule | Title | Severity | Level | Confidence | Effective |
|---|---|---|---|---|---|
| VISA-DQ-001 | Placeholder description or merchant name as description | error | L3 | processor-doc | from 2025-10-17 |
| VISA-DQ-002 | Zero or filler in a required code field | error | L3 | processor-doc | from 2025-10-17 |
| VISA-ELIG-001 | Card product not eligible for Product 3 | information | general | processor-doc | from 2025-10-17 |
| VISA-ELIG-002 | MCC excluded from Product 3 | information | general | processor-doc | from 2025-10-17 |
| VISA-ELIG-003 | Commercial prepaid card | information | general | processor-doc | always |
| VISA-ELIG-004 | Federal government card at an excluded medical MCC | information | general | processor-doc | from 2025-10-17 |
| VISA-ELIG-005 | Card not present without a billing postal code | warning | L2 | processor-doc | always |
| VISA-L2-001 | Tax outside 0.1% to 22% of the amount | error | L2 | processor-doc | until 2026-04-17 (last day the rule applies) |
| VISA-L2-002 | Tax indicator missing | error | L2 | processor-doc | until 2026-04-17 (last day the rule applies) |
| VISA-L2-003 | Purchasing card at a fuel MCC without a customer code | error | L2 | processor-doc | until 2026-04-17 (last day the rule applies) |
| VISA-L3-001 | No line items | error | L3 | processor-doc | from 2025-10-17 |
| VISA-L3-002 | Line item descriptor missing | error | L3 | processor-doc | from 2025-10-17 |
| VISA-L3-003 | Product code missing | error | L3 | processor-doc | from 2025-10-17 |
| VISA-L3-004 | Commodity code is required for Product 3 | error | L3 | processor-doc | from 2025-10-17 |
| VISA-L3-005 | Quantity missing or not above 0 | error | L3 | processor-doc | from 2025-10-17 |
| VISA-L3-006 | Unit of measure missing | error | L3 | processor-doc | from 2025-10-17 |
| VISA-L3-007 | Unit cost missing | error | L3 | processor-doc | from 2025-10-17 |
| VISA-L3-008 | Line total missing | error | L3 | processor-doc | from 2025-10-17 |
| VISA-L3-009 | Line discount missing | error | L3 | processor-doc | from 2025-10-17 |
| VISA-L3-010 | Line-item detail indicator missing | warning | L3 | processor-doc | from 2025-10-17 |
| VISA-L3-011 | Summary discount, freight or duty missing | error | L3 | processor-doc | from 2025-10-17 |
| VISA-L3-012 | Tax must be positive or explicitly exempt | error | L3 | processor-doc | from 2025-10-17 |
| VISA-L3-013 | Freight without shipping postal codes or country | warning | L3 | processor-doc | from 2025-10-17 |
| VISA-L3-014 | Descriptor longer than 26 characters | warning | L3 | processor-doc | always |
| VISA-L3-015 | Commodity code over 12 characters or not alphanumeric | error | L3 | processor-doc | always |
| VISA-LT-001 | Large Ticket rates may be cheaper | information | general | processor-doc | always |
Mastercard
Pack l3lint.rules.mastercard version 1.0.0, published 2026-10-25, 17 rules.
| Rule | Title | Severity | Level | Confidence | Effective |
|---|---|---|---|---|---|
| MC-ELIG-001 | Business card earns Level 2 only | information | general | processor-doc | always |
| MC-ELIG-002 | Card product code MBS or MEF | information | general | processor-doc | always |
| MC-ELIG-003 | MCC excluded from Mastercard Level 2 or Level 3 | information | general | processor-doc | always |
| MC-FMT-001 | Amount longer than 9 digits | warning | general | processor-doc | always |
| MC-L2-001 | Tax outside 0.1% to 30% of the amount | error | L2 | processor-doc | always |
| MC-L2-002 | Customer code and PO both missing | error | L2 | processor-doc | always |
| MC-L2-003 | Tax indicator missing | error | L2 | processor-doc | always |
| MC-L2-004 | Merchant tax ID missing | warning | L2 | processor-doc | always |
| MC-L3-001 | No line items | error | L3 | processor-doc | always |
| MC-L3-002 | Description missing | error | L3 | processor-doc | always |
| MC-L3-003 | Product code missing | error | L3 | processor-doc | always |
| MC-L3-004 | Quantity missing or not above 0 | error | L3 | processor-doc | always |
| MC-L3-005 | Unit of measure not on the Mastercard list | error | L3 | processor-doc | from 2025-10-01 |
| MC-L3-006 | Unit price or extended amount missing | error | L3 | processor-doc | always |
| MC-L3-007 | Debit or credit indicator missing | warning | L3 | processor-doc | always |
| MC-L3-008 | Line tax indicator, discount indicator or tax type missing | warning | L3 | processor-doc | always |
| MC-L3-009 | Ship-to postal code missing | warning | L3 | processor-doc | always |
American Express
Pack l3lint.rules.amex version 1.0.0, published 2026-10-25, 9 rules.
| Rule | Title | Severity | Level | Confidence | Effective |
|---|---|---|---|---|---|
| AMEX-ELIG-001 | No public Amex Level 3 rate | information | general | processor-doc | always |
| AMEX-FMT-001 | Advice text over 4 lines or 40 characters a line | error | L3 | processor-doc | always |
| AMEX-FMT-002 | More line items than the gateway forwards to Amex | warning | L3 | processor-doc | always |
| AMEX-L2-001 | Ship-to postal code missing | error | L2 | processor-doc | always |
| AMEX-L2-002 | PO number over 22 characters | warning | L2 | processor-doc | always |
| AMEX-L2-003 | Customer reference over 20 characters | warning | L2 | processor-doc | always |
| AMEX-L2-004 | Tax exempt without a tax registration ID | error | L2 | processor-doc | always |
| AMEX-L3-001 | Unit of measure not an ANSI X12 code | error | L3 | processor-doc | always |
| AMEX-L3-002 | Level 3 prerequisites missing | error | L3 | processor-doc | always |
Discover
Pack l3lint.rules.discover version 1.0.0, published 2026-10-25, 3 rules.
| Rule | Title | Severity | Level | Confidence | Effective |
|---|---|---|---|---|---|
| DISC-ELIG-001 | No Discover Level 2 or 3 rate | information | general | processor-doc | always |
| DISC-FMT-001 | More than 98 line items | error | L3 | processor-doc | always |
| DISC-L2-001 | Taxable flag missing | warning | L2 | processor-doc | always |
Engine diagnostics
The engine raises these findings itself. They are not part of any rule pack and do not count toward the 78 catalog rules.
| Rule | Title | Severity | Level | Confidence | Effective |
|---|---|---|---|---|---|
| L3LINT-CTX-001 | Card brand unknown | information | general | policy | always |
| L3LINT-ENGINE-001 | A rule failed internally | error | general | policy | always |