Attestwire › Rule reference › ATW-IBAN-INVALID

ATW-IBAN-INVALID An IBAN must have its country's length and valid check digits

noun · Attestwire · warning · BT-84

For a sample invoice, the library reports: The payment account identifier (BT-84) "DE02120300000000202052" fails the ISO 7064 MOD 97-10 check: the two digits after the country code are computed from the rest of the IBAN, so a mistyped or swapped character makes them disagree.

Business term
BT-84
Severity
warning

The fix

Take the IBAN from the account holder's own record, such as the bank's account confirmation, rather than retyping it, and write it in capitals. Spaces between the groups of four are allowed.

A passing value

the shape this field expects
"payment": { "meansCode": "58", "iban": "DE02120300000000202051" }

What the library returns

The full error returned by @attestwire/en16931. It includes the rule ID, affected field and suggested correction. Developers can use this object in their application:

TeachingError
{
  "rule": "ATW-IBAN-INVALID",
  "field": "BT-84",
  "severity": "warning",
  "message": "The payment account identifier (BT-84) \"DE02120300000000202052\" fails the ISO 7064 MOD 97-10 check: the two digits after the country code are computed from the rest of the IBAN, so a mistyped or swapped character makes them disagree. The IBAN is where the buyer's payment goes, and a bank refuses or returns a transfer to one that does not exist. This is a warning of this library, not a rule of EN 16931 or of a CIUS, so it never makes the invoice invalid.",
  "fix": "Take the IBAN from the account holder's own record, such as the bank's account confirmation, rather than retyping it, and write it in capitals. Spaces between the groups of four are allowed.",
  "example": "\"payment\": { \"meansCode\": \"58\", \"iban\": \"DE02120300000000202051\" }",
  "xpath": "/ubl:Invoice/cac:PaymentMeans/cac:PayeeFinancialAccount/cbc:ID",
  "docsUrl": "https://github.com/attestwire/en16931#not-implemented-yet"
}

xpath is always a UBL path. On a CII invoice, look for the matching CII field instead.