TAN and Resume
TAN selection, TAN media, interactive TAN entry, decoupled approval polling,
and Verification of Payee confirmation are FinTS-backed C API surfaces. Probe
TAN and resume support for arbitrary backend handles through
gln_check_backend_operation_support.
For Verification of Payee scheme background, see the European Payments Council Verification Of Payee page.
Operations
| Operation | Request | Result kind |
|---|---|---|
gln_retrieve_tan_modes | none | GLN_BACKEND_RESULT_KIND_TAN_MODES |
gln_set_tan_mode | gln_set_tan_mode_request_t | GLN_BACKEND_RESULT_KIND_TAN_MODE_SELECTION |
gln_retrieve_tan_media | none | GLN_BACKEND_RESULT_KIND_TAN_MEDIA |
gln_resume_continuation | gln_continuation_t*, optional secret, gln_continuation_input_t | Operation-dependent |
TAN Modes
gln_retrieve_tan_modes returns gln_tan_modes_t.
| Accessor | Meaning |
|---|---|
gln_get_tan_modes_count, gln_get_tan_mode_at | Enumerate available rows. |
gln_get_tan_modes_selected | Current selected security function, when known. |
gln_get_tan_mode_security_function | Security function code to pass to gln_set_tan_mode. |
gln_get_tan_mode_name | Bank-supplied display name. |
gln_get_tan_mode_decoupled | Non-zero when approval happens out of band. |
gln_backend_result_t* result = NULL;
if (gln_retrieve_tan_modes(backend, &result) == GLN_OK &&
gln_get_backend_result_outcome(result) == GLN_BACKEND_OUTCOME_SUCCESS) {
const gln_tan_modes_t* modes = gln_get_backend_result_tan_modes(result);
const gln_tan_mode_t* mode = gln_get_tan_mode_at(modes, 0);
gln_set_tan_mode_request_t request = {0};
gln_default_set_tan_mode_request(&request);
request.security_function = gln_get_tan_mode_security_function(mode);
gln_backend_result_t* selection_result = NULL;
gln_set_tan_mode(backend, &request, &selection_result);
gln_destroy_backend_result(selection_result);
}
gln_destroy_backend_result(result);
TAN Media
gln_retrieve_tan_media returns gln_tan_media_t.
| Accessor | Meaning |
|---|---|
gln_get_tan_media_count, gln_get_tan_medium_at | Enumerate TAN media. |
gln_get_tan_medium_media_name | Bank label. |
gln_get_tan_medium_media_type | Bank media type code. |
gln_get_tan_medium_phone_number | Phone number, when supplied. |
gln_get_tan_medium_card_number | Card number, when supplied. |
gln_get_tan_medium_active | Non-zero when active. |
Interrupts
Action-required envelopes carry a borrowed gln_interrupt_info_t:
| Interrupt kind | Envelope status | Active fields |
|---|---|---|
GLN_INTERRUPT_TAN_REQUIRED | GLN_ERR_TAN_REQUIRED | tan.challenge, tan.challenge_html, optional HHDuc, medium name, and task reference. |
GLN_INTERRUPT_DECOUPLED_PENDING | GLN_ERR_DECOUPLED_PENDING | decoupled_poll fields plus retry_after_seconds. |
GLN_INTERRUPT_VOP_CONFIRMATION_REQUIRED | GLN_ERR_VOP_CONFIRMATION_REQUIRED | vop_confirm.vop_id_or_null, vop_confirm.result_code_or_null, vop_confirm.alternate_name_or_null, and vop_confirm.explanatory_text_or_null. |
Provider status rows attached to an interrupt are available with
gln_get_interrupt_info_provider_status_count and
gln_get_interrupt_info_provider_status_at.
The VoP interrupt fields are populated from the normalized Verification of
Payee response. vop_id_or_null is the identifier stored in the continuation
and submitted by supported VoP confirmation resume paths when the caller
confirms the prompt. result_code_or_null is the bank/protocol VoP result
code. alternate_name_or_null and explanatory_text_or_null carry the
normalized alternate beneficiary name and explanation when present; a non-null
empty string means the normalized VoP info has no value for that field.
Resume Inputs
Initialize gln_continuation_input_t by calling gln_default_continuation_input.
| Resume case | Input setup |
|---|---|
| User enters a TAN | Create a gln_secret_t* from the TAN bytes and pass it as in_interactive_secret_or_null; use GLN_CONTINUATION_INPUT_KIND_NONE unless HHDuc response data is needed. |
| Decoupled poll | Set kind = GLN_CONTINUATION_INPUT_KIND_DECOUPLED_POLL. |
| Decoupled-pending HHDuc echo/status variant | Set kind = GLN_CONTINUATION_INPUT_KIND_HHDUC_RESPONSE and fill hhduc_response_or_null. |
| VoP confirmation | Set kind = GLN_CONTINUATION_INPUT_KIND_VOP_CONFIRM; supported VoP confirmation resume paths confirm the VoP id stored in the continuation. |
gln_default_continuation_input before a NULL interactive secret is not a complete
resume input; the returned envelope reports GLN_ERR_INVALID_ARG.
Unsupported VoP confirmation resume paths return an error envelope with status
GLN_ERR_NOT_SUPPORTED and issue type unsupported_vop_confirmation_backend.
gln_continuation_t* continuation = gln_take_backend_result_continuation(result);
gln_continuation_input_t input = {0};
gln_default_continuation_input(&input);
gln_backend_result_t* resumed = NULL;
gln_status_t resume_status = gln_resume_continuation(
backend,
continuation,
tan_secret_or_null,
&input,
&resumed);
if (resume_status == GLN_OK) {
/* Inspect resumed just like any other backend result envelope. */
}
gln_destroy_backend_result(resumed);
gln_destroy_continuation(continuation);
Use gln_save_continuation and gln_load_continuation when an operation may
be resumed after process restart.