IBAN Validator API

Description

Validate and extract regional information about an IBAN via the SWIFT standard/registry.

Endpoint

> GET https://api.jsonrepo.com/v1/compute/validator/iban

Headers

Field Description
api_key Required Your API Key

Parameters

Field Type Description
iban String Required IBAN string to examine
Examples:
GB82WEST12345698765432
IT60X0542811101000000123456

Response

A successful request will result in a populated payload field with the expected output.

A failed request will result in an error output as detailed in Error Rules. If the endpoint validation fails due to missing, badly formatted or invalid parameters, the endpoint will return HTTP code 400 along with a message detailing the error.

See the examples section for more information.

Request

  • Curl
// Validate an Italian `iban`

curl -G \
https://api.jsonrepo.com/v1/compute/validator/iban \
-H "api_key: {YOUR_API_KEY_HERE}" \
--data-urlencode "iban=IT60X0542811101000000123456" 

Success Response

{
    "http_code": 200,
    "http_message": "Ok",
    "message": "Successful execution",
    "payload": {
        "iban": {
            "is_valid": true,
            "checksum": "60",
            "formats": {
                "bban": "X0542811101000000123456",
                "print": "IT60 X054 2811 1010 0000 0123 456",
                "electronic": "IT60X0542811101000000123456",
                "anonymized": "XXXXXXXXXXXXXXXXXXXXXXX3456"
            },
            "bank_identifier": "054281",
            "account_identifier": "1101000000123456",
            "country": {
                "name": "Italy",
                "iso": "IT"
            }
        }
    }
}

Error Response Examples

// Request with missing `iban` parameter

{
    "http_code": 400,
    "http_message": "Bad Request",
    "message": "Malformed request: `iban` parameter must be provided.",
    "payload": []
}

// Request with badly formatted `iban`

{
    "http_code": 400,
    "http_message": "Bad Request",
    "message": "Malformed request: `iban` parameter is unparsable due to improper formatting.",
    "payload": []
}