From 33aea75422761564cb96f6989e7bce15630df592 Mon Sep 17 00:00:00 2001 From: catallo Date: Mon, 12 Oct 2026 14:33:39 +0200 Subject: [PATCH] Expose the raw HHD UC challenge as tanChallengeHhdUc for chipTAN flicker codes --- README.md | 4 ++++ src/interactions/customerInteraction.ts | 8 ++++++++ 2 files changed, 12 insertions(+) diff --git a/README.md b/README.md index 60ebb5b..70500f9 100644 --- a/README.md +++ b/README.md @@ -138,6 +138,10 @@ You could ask the user to confirm that the approval was given and then continue see also the `decoupled` property on the `TanMethod` object for related parameters given by the bank. +**chipTAN optisch / flicker codes** + +For chipTAN methods the bank sends the challenge data for the TAN generator in the HITAN segment. The response exposes it unchanged as `tanChallengeHhdUc` (a string with the HHD 1.3/1.4 start code and data elements), so that a client can render the optical flicker animation; `tanPhoto` only applies to photoTAN banks that put an image container into the same field. + ### Starting a session from saved banking information As mentioned earlier there is a second way to initialize the `FinTSClient` with a `FinTSConfig` when you already performed a synchronization in a previous session and this is by providing the `bankingInformation` object received from previous uses. This `bankingInformation` object, which contains the general bank (BPD) and accounts information (UPD), should be persisted after a session and reloaded in the next session. diff --git a/src/interactions/customerInteraction.ts b/src/interactions/customerInteraction.ts index 4eabc41..5ddb8e6 100644 --- a/src/interactions/customerInteraction.ts +++ b/src/interactions/customerInteraction.ts @@ -32,6 +32,13 @@ export interface ClientResponse { tanReference?: string; tanChallenge?: string; tanPhoto?: PhotoTan; + /** + * The raw HHD UC challenge from HITAN, untouched. photoTAN banks put an + * image container here (see tanPhoto), chipTAN banks the flicker code data + * (HHD 1.3/1.4 start code and data elements) that a client renders as the + * optical flicker animation. Only this raw form is usable for chipTAN. + */ + tanChallengeHhdUc?: string; tanMediaName?: string; } @@ -117,6 +124,7 @@ export abstract class CustomerInteraction { bankAnswers.find((answer) => answer.code === 3957)?.text ?? '', tanPhoto: hitan.challengeHhdUc ? this.parseHHDUC(hitan.challengeHhdUc) : undefined, + tanChallengeHhdUc: hitan.challengeHhdUc, tanMediaName: hitan.tanMedia, }; } else {