Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CH IBAN / QR-IBAN problem #2985

Open
andre-m-dev opened this issue Jul 29, 2024 · 2 comments
Open

CH IBAN / QR-IBAN problem #2985

andre-m-dev opened this issue Jul 29, 2024 · 2 comments

Comments

@andre-m-dev
Copy link

Describe the bug

It's not really a technical problem, but you can run into problems in your tests. In Switzerland there are 2 types of IBANs. Normal and QR-IBAN.

How does the QR-IBAN differ from the IBAN?
Instead of the regular IBAN, the client's bank assigns them a QR-IBAN for the credit account. This is required to identify the beneficiary account. The only difference between the QR-IBAN and the IBAN is a different institution identification (IID), the QR-IID. Each legally independent financial institution participating in the procedure is assigned at least one QR-IID. The QR-IID of UBS Switzerland AG is 30005.

https://www.ubs.com/ch/en/corporates/payment-solutions/payments/payment-slips/faq.html

There is therefore the possibility of unreliable tests if such a QR-IBAN is generated by chance.

To Reproduce

Faker::VERSION => "3.4.2"

Faker::Bank.iban(country_code: 'CH')

Additional context

I don't have a quick solution for this either, as the structure of locales/en/bank.yml does not provide an option for this.

@thdaraujo
Copy link
Contributor

Thanks for describing the issue!

Just to make sure I understand: are you saying that one of the IBAN codes that faker generates could also fall into the category of a QR-IBAN in case it matches a bank's QR-IID?

Is there a way to tell them apart (IBAN vs QR-IBAN)? Is there a list of QR-IIDs somewhere? And for your application, why would it matter if the generated code is IBAN or QR-IBAN - are they used in different situations?

Maybe this could be an addition to the documentation. It feels more like a feature request to me than a bug, but I need a bit more context.

@andre-m-dev
Copy link
Author

I accidentally selected a bug issue instead of open issue, sorry for that.

Just to make sure I understand: are you saying that one of the IBAN codes that faker generates could also fall into the category of a QR-IBAN in case it matches a bank's QR-IID?

Exactly

Is there a way to tell them apart (IBAN vs QR-IBAN)? Is there a list of QR-IIDs somewhere?

The QR-IBAN contains the QR-IID (bank identification) in positions 5-9, using a number range from 30000 through 31999.

And for your application, why would it matter if the generated code is IBAN or QR-IBAN - are they used in different situations?

Because a valid QR reference is required for a transfer to a QR-IBAN

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants