Expand description
ISO 20022 / banking domain JSON-LD types.
Opt-in extension to the crate::seo::JsonLdPlugin that lets
fintech / banking / payments authors emit strongly-typed, Schema.org
compatible JSON-LD blobs for the five most common financial domain
entities. Ports concepts from the ISO 20022 messaging vocabulary into
a Schema.org-friendly shape:
BankAccount— Schema.orgBankAccountwith IBAN/BIC.PaymentInstrument— card, transfer, direct debit.FinancialTransaction— extends Schema.orgMoneyTransfer.RegulatedFinancialInstitution— extendsOrganization.FinancialProduct— loan, deposit, derivative.
All ISO-20022-specific fields are emitted under the iso20022:
namespace prefix so that Schema.org-only validators still see a
conformant payload.
§Validation
Two validators are bundled:
validate_iban— performs MOD-97 checksum verification per ISO 13616.validate_bic— checks the 8/11-character ISO 9362 layout.
Invalid values do NOT fail the build — they emit a log::warn!
naming the offending page and the field that didn’t validate.
§Documentation pointer
On first use within a build, log_first_use_pointer emits an
info-level log pointing at the canonical docs URL.
§Schema.org base mapping
| ISO 20022 type | @type |
|---|---|
BankAccount | BankAccount |
PaymentInstrument | PaymentService |
FinancialTransaction | MoneyTransfer |
RegulatedFinancialInstitution | BankOrCreditUnion |
FinancialProduct | FinancialProduct |
Structs§
- Bank
Account - A bank account record. Schema.org base type:
BankAccount. - Financial
Product - A financial product (loan, deposit, derivative). Schema.org base
type:
FinancialProduct. - Financial
Transaction - A financial transaction. Schema.org base type:
MoneyTransfer. - Monetary
Amount - ISO 4217 monetary amount.
- Payment
Instrument - A payment instrument (card, transfer, direct debit). Schema.org
base type:
PaymentService. - Regulated
Financial Institution - A regulated financial institution. Schema.org base type:
BankOrCreditUnion. - Schema
OrgError - Validation error raised by the bundled Schema.org subset validator.
Enums§
- Dispatch
Error - Errors that can occur when interpreting an
iso20022:frontmatter block. These do NOT abort the build — they cause the block to be skipped with a warning. - Iso20022
Entity - Tagged union dispatched from the
iso20022.typefrontmatter key. - Validation
Outcome - Result of an ISO 20022 field validation. Errors are warnings, not hard failures — the build continues regardless.
Constants§
- DOCS_
URL - Canonical docs URL emitted on first use within a build.
Functions§
- from_
frontmatter - Parses the
iso20022:frontmatter block into a typed entity. - log_
first_ use_ pointer - Emits an info-level log pointing at the iso20022 docs URL, exactly once per process. Idempotent.
- redact_
for_ log - Validates an IBAN (ISO 13616) using the MOD-97 checksum.
- validate_
bic - Validates a BIC (ISO 9362) by length + alphanumeric layout.
- validate_
iban - crate dependency-free for the ISO validator.
- validate_
schema_ org - Validates an ISO 20022 JSON-LD blob against the Schema.org subset.
- warn_
invalid_ fields - Walks every IBAN/BIC inside an entity and emits
log::warn!for anything that fails validation. Thepage_labelis included in the warning so site authors can locate the offending page.