The bank account data processing depends on the used payment method and on the settings of the coresponding payment extension. For example: if your form uses the "Manual Direct Debit" and you allow the donors to choose between account number and IBAN, this choice has to be provided via Form-API as well.
If you have a bank data choice there is a "bank_fields" field in your form and you have to use this field in your form as well. The Form Configuration JSON will show you this field, including the two valid options. You have to show the coresponding bank fields regarding the selected choice.
- You could for example add a hidden input with name "bank_fields" and prefill this input with "iban", and now you only have to show the IBAN field (and BIC if availabe).
- Or you adjust the extension settings to just one kind of bank data, but beware: this has effect on all iFrame-Forms as well!