Skip to main content

Module protocol

Module protocol 

Source
Expand description

FinTS 3.0 Protocol State Machine (spec-aligned).

Implements the dialog lifecycle as defined in FinTS 3.0 Formals (2017-10-06) and PIN/TAN Security (2020-07-10).

§Dialog types (spec Chapter C)

  • Synchronization dialog: HKIDN + HKVVB + HKSYN → get system_id → HKEND. Marked by presence of HKSYN. Business segments are forbidden (banks return 9110).
  • Normal dialog: HKIDN + HKVVB [+ HKTAN:4] → [TAN confirmation] → business ops → HKEND.

§State machine (spec Chapter C, Section 6)

  Dialog<New>
      │
      ├── sync()           → (Dialog<Synced>, Response)      [sync dialog]
      │
      └── init()           → InitResult                      [normal dialog]
            ├── Opened(Dialog<Open>)                            response 0010/0020
            └── TanRequired(Dialog<TanPending>, TanChallenge)   response 0030/3955

  Dialog<Synced>
      └── end()            → (BankParams, String)             [get params + system_id]

  Dialog<Open>
      ├── send()           → SendResult                       [business segment]
      │     ├── Success(Response)                               response 0020
      │     ├── NeedTan(Dialog<TanPending>, TanChallenge)       response 0030/3955
      │     └── Touchdown(Response, String)                     response 3040
      └── end()            → ()                               [HKEND]

  Dialog<TanPending>
      ├── poll()           → PollResult                       [HKTAN process S]
      │     ├── Confirmed(Dialog<Open>, Response)               response 0020
      │     └── Pending(Dialog<TanPending>)                     response 3955/3956
      ├── submit_tan()     → (Dialog<Open>, Response)         [HKTAN process 2]
      └── cancel()         → ()                               [HKEND]

Structs§

Account
A validated bank account identifier (Kontoverbindung International).
BankParams
Cached bank and user parameters discovered during sync/init.
Dialog
HoldingsPage
Result of a single securities holdings request page.
New
Dialog not yet started. Can transition to Synced or Open/TanPending.
Open
Dialog is open and authenticated. Business segments can be sent.
Response
Parsed response from the bank after sending a message.
Synced
Synchronization dialog: system_id obtained, BPD/UPD cached. No business ops allowed.
TanChallenge
TanPending
A TAN challenge is pending (either from init or from a business segment).
TransactionPage
Result of a transaction request (single page).

Enums§

BalanceResult
Result of a balance request.
HoldingsResult
Result of a holdings request.
InitResult
Result of Dialog::init(). Per the spec, the bank either accepts the dialog (0010/0020) or requires SCA (0030/3955).
PollResult
Result of Dialog<TanPending>::poll().
SendResult
Result of Dialog<Open>::send(). Per the spec, three outcomes are possible.
TransactionResult
Result of a transaction request.