diff --git a/fints4javaLib/src/main/kotlin/net/dankito/fints/FinTsClient.kt b/fints4javaLib/src/main/kotlin/net/dankito/fints/FinTsClient.kt index acfc6c2b..6ee2f669 100644 --- a/fints4javaLib/src/main/kotlin/net/dankito/fints/FinTsClient.kt +++ b/fints4javaLib/src/main/kotlin/net/dankito/fints/FinTsClient.kt @@ -790,8 +790,10 @@ open class FinTsClient @JvmOverloads constructor( } } - response.getFirstSegmentById(InstituteSegmentId.AccountInfo)?.let { accountInfo -> - customer.iban = accountInfo.iban // TODO: remove and use that one from AccountData + response.getSegmentsById(InstituteSegmentId.AccountInfo).forEach { accountInfo -> + if (customer.iban == null && accountInfo.iban != null) { + customer.iban = accountInfo.iban // TODO: remove and use that one from AccountData + } var accountHolderName = accountInfo.accountHolderName1 accountInfo.accountHolderName2?.let {