Skip to content

ISO 9362:2014 — Business Identifier Code

Notifications You must be signed in to change notification settings

Fleshgrinder/kotlin-bic

Repository files navigation

Société Bic S.A. Logo

ISO 9362:2014 — Business Identifier Code

BIC stands for Business Identifier Code (aka. Bank Identifier Code) and is an international standard defined through the ISO in ISO 9362. A BIC specifies the elements and structure of a universal identifier (UID) for financial and non-financial institutions, for which such an international identifier is required to facilitate automated processing of information for financial services. The BIC is used for addressing messages, routing business transactions, and identifying business parties. SWIFT acts as the registration authority (RA) for BICs and is responsible for its implementation.

This Kotlin (and Java) implementation adheres to the latest revision, ISO 9362:2014, of the standard in which a few things have changed compared to previous iterations. You can find additional information regarding the changes in the SWIFT White Paper and SWIFT Information Paper. The following description will not include information on how it was in the past but rather explain how it is now.

A BIC is made up of 11 characters of which the last 3 are optional. The required 8 characters are the Business Party Identifier (BPI) which is further separated into three parts, the Business Party Prefix, Country Code, and Business Party Suffix. The prefix and suffix are chosen by SWIFT and the country corresponds to the country where the business resides (following ISO 3166-1 alpha-2). The optional last 3 characters are called the Branch Code which identifies a specific location, department, service, or unit of the business party.

The following ABNF specifies the syntactic requirements:

business-identifier-code  := business-party-identifier [ branch-identifier ]

business-party-identifier := business-party-prefix country-code business-party-suffix
business-party-prefix     := 4alnum
country-code              := 2alpha
business-party-suffix     := 2alnum
branch-identifier         := 3alnum

alnum := alpha / digit
alpha := %x41-5A ; A-Z
digit := %x30-39 ; 0-9

A corresponding regular expression would look as follows:

/^(?<business_identifier_code>
    (?<business_party_identifier>
        (?<business_party_prefix>[A-Z0-9]{4})
        (?<country_code>[A-Z]{2})
        (?<business_party_suffix>[A-Z0-9]{2})
    )
    (?<branch_code>[A-Z0-9]{3})?
)$/x

Please refer to the class documentation for examples and all the gory details of the actual implementation.

Installation

The module is available from Bintray only. It will become available via JCenter and Maven Central once 1.0.0 is out.

Add the following to your build.gradle.kts file:

dependencies {
    implementation("com.fleshgrinder.kotlin:bic:0.1.0")
}

repositories {
    maven("https://dl.bintray.com/fleshgrinder/com.fleshgrinder.kotlin")
}

Please refer to Bintray for instructions on how to add the module to Maven or Ivy.

Project Info

Logo Usage

This non-commercial project uses the logo of the Société Bic S.A. company in a parodied context because of the naming similarity of the standards abbreviation BIC and the common name the company is known by BiC. It is believed that this usage falls under Fair Use and that no permission is required to use the logo. However, it is important to note that this project is not associated with Société Bic S.A. nor is it endorsed by them. In fact, they are probably not even aware of this project in the first place.

The logo itself is not distributed along with this project but included from https://en.wikipedia.org/wiki/File:BIC_logo.svg. It should be obvious that the project’s Unlicense doesn’t apply to the logo which is owned by Société Bic S.A.

Releases

No releases published

Packages

No packages published