curatedapi
Browse the docs

Guides

Finance

Excel functions

Late payments

E-invoices

Accounting

Number checks

VAT and GST

Billing and pricing

Money and currencies

Dates and time

Math

Unit conversion

Everyday

Health

BIC (SWIFT code) check API

Check the structure of a BIC (SWIFT code) under ISO 9362 and split it into party, country and branch.

POST https://api.curatedapi.com/v1/calc/check/bic

Checks a Business Identifier Code as ISO 9362 defines it: 8 or 11 characters, a four-character party prefix, a two-letter ISO 3166 country code, a two-character party suffix and an optional three-character branch. A BIC has no check digit, so the structure and the country code are all that can be tested without the SWIFT directory.

Formula

4 characters (party prefix) + 2 letters (ISO 3166 country) + 2 characters (party suffix) + optional 3 characters (branch)
  • The number is checked by arithmetic alone. Nothing is looked up, so a valid result means the number is well formed, not that the account, company or security exists.
  • Whether a BIC is in use can only be told from the SWIFT directory, which is licensed and is not consulted.

Inputs

Send numbers as strings to keep every digit. options sets precision and rounding (see numbers and rounding).

InputTypeDescription
number required string The BIC to check, 8 or 11 characters. Spaces, dots, hyphens and slashes are ignored, and lower-case letters are read as upper case. At most 64 characters.

Result

Under result in the answer, next to exactness, precision, inputs, formula, references and warnings.

ResultTypeDescription
validbooleanWhether the BIC passes every check.
normalizedstringThe number as it was checked: separators removed, letters in upper case.
problemstringWhat is wrong, when valid is false: CHARACTERS: a character that cannot appear in this kind of number; LENGTH: the wrong number of characters; COUNTRY: an unknown or unsupported country code; FORMAT: the right length but the wrong structure; CHECK_DIGIT: the check digit or check characters do not match the rest of the number.
messagestringThe result in a sentence, naming the rule that failed.
party_prefixstringCharacters 1 to 4.
countrystringCharacters 5 and 6.
country_namestringThe country's name.
party_suffixstringCharacters 7 and 8.
branchstringCharacters 9 to 11, when given.
bic8stringThe first eight characters.
primary_officebooleanTrue when there is no branch code or it is XXX.
test_bicbooleanTrue when the eighth character is 0, which SWIFT uses for test and training BICs.

Examples

An 11-character BIC with a branch

Requestcurl
curl https://api.curatedapi.com/v1/calc/check/bic \
  -H "Authorization: Bearer $CURATEDAPI_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "number": "DEUTDEFF500"
  }'
200 OKResponse
{
  "calculator": "check/bic@1",
  "result": {
    "valid": true,
    "normalized": "DEUTDEFF500",
    "message": "A well-formed BIC for Germany.",
    "party_prefix": "DEUT",
    "country": "DE",
    "country_name": "Germany",
    "party_suffix": "FF",
    "branch": "500",
    "bic8": "DEUTDEFF",
    "primary_office": false,
    "test_bic": false
  },
  "exactness": {},
  "precision": null,
  "inputs": {
    "number": "DEUTDEFF500"
  },
  "formula": "4 characters (party prefix) + 2 letters (ISO 3166 country) + 2 characters (party suffix) + optional 3 characters (branch)",
  "references": [
    {
      "title": "ISO 9362:2022 Banking: Business identifier code (BIC)",
      "url": "https://www.iso.org/standard/84108.html"
    },
    {
      "title": "SWIFT: Business Identifier Code (BIC)",
      "url": "https://www.swift.com/standards/data-standards/bic-business-identifier-code"
    }
  ],
  "warnings": []
}

Not a country code

Requestcurl
curl https://api.curatedapi.com/v1/calc/check/bic \
  -H "Authorization: Bearer $CURATEDAPI_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "number": "ABCDZZ22"
  }'
200 OKResponse
{
  "calculator": "check/bic@1",
  "result": {
    "valid": false,
    "normalized": "ABCDZZ22",
    "problem": "COUNTRY",
    "message": "ZZ (characters 5 and 6) is not an ISO 3166 country code."
  },
  "exactness": {},
  "precision": null,
  "inputs": {
    "number": "ABCDZZ22"
  },
  "formula": "4 characters (party prefix) + 2 letters (ISO 3166 country) + 2 characters (party suffix) + optional 3 characters (branch)",
  "references": [
    {
      "title": "ISO 9362:2022 Banking: Business identifier code (BIC)",
      "url": "https://www.iso.org/standard/84108.html"
    },
    {
      "title": "SWIFT: Business Identifier Code (BIC)",
      "url": "https://www.swift.com/standards/data-standards/bic-business-identifier-code"
    }
  ],
  "warnings": []
}

References

Results follow each calculator's documented rules and the sources listed. They are not financial, tax or legal advice. Check that the rules fit your case before you rely on a result. See the terms.

Errors share one format; see errors. Billing, retries and batches work the same for every endpoint.