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
- Version 1
- MCP tool
calc_check_bic - Try it in the browser
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).
| Input | Type | Description |
|---|---|---|
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.
| Result | Type | Description |
|---|---|---|
valid | boolean | Whether the BIC passes every check. |
normalized | string | The number as it was checked: separators removed, letters in upper case. |
problem | string | What 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. |
message | string | The result in a sentence, naming the rule that failed. |
party_prefix | string | Characters 1 to 4. |
country | string | Characters 5 and 6. |
country_name | string | The country's name. |
party_suffix | string | Characters 7 and 8. |
branch | string | Characters 9 to 11, when given. |
bic8 | string | The first eight characters. |
primary_office | boolean | True when there is no branch code or it is XXX. |
test_bic | boolean | True when the eighth character is 0, which SWIFT uses for test and training BICs. |
Examples
An 11-character BIC with a branch
curl https://api.curatedapi.com/v1/calc/check/bic \
-H "Authorization: Bearer $CURATEDAPI_KEY" \
-H "Content-Type: application/json" \
-d '{
"number": "DEUTDEFF500"
}'
{
"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
curl https://api.curatedapi.com/v1/calc/check/bic \
-H "Authorization: Bearer $CURATEDAPI_KEY" \
-H "Content-Type: application/json" \
-d '{
"number": "ABCDZZ22"
}'
{
"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.