{
  "openapi": "3.1.0",
  "info": {
    "title": "BAV (Verification of Payee) API",
    "version": "4",
    "summary": "Check whether a name matches the holder of a bank account, by IBAN or by UK / US bank code and account number.",
    "description": "Part of the Bank Account Verification service of IBAN.com. You send an account and the name you expect; the API asks the\naccount holder's bank through the Verification of Payee (VOP) scheme and returns whether the name matches (`yes`),\nnearly matches (`partial`), does not match (`no`) or could not be checked (`unavailable`). For a near match it can also\nreturn the name the bank holds (`result.suggested_name`).\n\nThe account is identified by `IBAN`, or by `country_code` + `bank_code` + `account` for the United Kingdom and the United\nStates (domestic mode, new in version 4). IBAN-mode requests and responses are unchanged from version 3.\n\nFull documentation: https://developer.iban.com/bav-api\n\nEach completed verification (HTTP 200) uses one query, and so do `INVALID_IBAN_CHECKSUM` (400) and\n`INTERNAL_SERVER_ERROR:UNERSP` (500); no other refusal uses one. Allow at least 180 seconds before timing out.\n\nSource: the API owner's v4 document of 25 Nov 2026; examples are the document's, not recorded from the live API.\n",
    "termsOfService": "https://www.iban.com/terms",
    "license": {
      "name": "Proprietary — IBAN.com Terms & Conditions",
      "url": "https://www.iban.com/terms"
    },
    "contact": {
      "name": "IBAN.com support",
      "url": "https://clients.iban.com/support"
    }
  },
  "servers": [
    {
      "url": "https://api.iban.com/clients/api/verify/v4",
      "description": "Production. Each completed verification uses one query."
    },
    {
      "url": "https://sandbox.iban.com/clients/api/verify/v4",
      "description": "Sandbox (key `testkey`); free, uses no queries."
    }
  ],
  "security": [
    {
      "ApiKeyHeader": []
    }
  ],
  "tags": [
    {
      "name": "Verification",
      "description": "Verification of Payee through the account holder's bank."
    }
  ],
  "paths": {
    "/": {
      "post": {
        "tags": [
          "Verification"
        ],
        "operationId": "verifyPayee",
        "summary": "Verify that a name matches the holder of an account",
        "description": "IBAN mode: send `IBAN` and `name`. Domestic mode (GB, US): send `country_code`, `bank_code`, `account` and `name`, and leave\n`IBAN` out. If `IBAN` is present and not empty, IBAN mode is used and the domestic fields are ignored. Field names are\ncase-sensitive; any other fields are ignored.\n\nIBAN-mode countries: AT BE CY DE EE ES FI FR GB GR HR IE IT LT LU LV MT NL PT SI SK. Domestic mode: GB (6-digit sort code), US (9-digit ABA\nrouting number). Any other country returns `COUNTRY_NOT_SUPPORTED`.\n",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/VerificationRequest"
              },
              "examples": {
                "iban": {
                  "summary": "IBAN mode",
                  "value": {
                    "IBAN": "DE89370400440532013000",
                    "name": "Max Mustermann"
                  }
                },
                "domestic_gb": {
                  "summary": "Domestic mode, UK sort code",
                  "value": {
                    "country_code": "GB",
                    "bank_code": "20-00-00",
                    "account": "55779911",
                    "name": "Jane Smith"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The verification was completed. Decide on `result.name_match`; `error` is empty or one of `NAME_PARTIAL_MATCH`,\n`NAME_NOT_MATCH`, `VERIFICATION_NOT_SUPPORTED`, `VOP_REQUEST_FAILED`. `query.success` is always `true`. Uses one query.\n",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VerificationResponse"
                },
                "examples": {
                  "match": {
                    "summary": "Match, IBAN mode",
                    "value": {
                      "query": {
                        "IBAN": "DE89370400440532013000",
                        "name": "Max Mustermann",
                        "success": true
                      },
                      "result": {
                        "valid": true,
                        "name_match": "yes",
                        "bic": "COBADEFFXXX",
                        "suggested_name": ""
                      },
                      "error": ""
                    }
                  },
                  "match_domestic": {
                    "summary": "Match, domestic mode (UK sort code)",
                    "value": {
                      "query": {
                        "country_code": "GB",
                        "bank_code": "200000",
                        "account": "55779911",
                        "name": "Jane Smith",
                        "success": true
                      },
                      "result": {
                        "valid": true,
                        "name_match": "yes",
                        "bic": "BARCGB22XXX",
                        "suggested_name": ""
                      },
                      "error": ""
                    }
                  },
                  "partial": {
                    "summary": "Partial match with the name the bank holds",
                    "value": {
                      "query": {
                        "IBAN": "DE89370400440532013000",
                        "name": "Max Musterman",
                        "success": true
                      },
                      "result": {
                        "valid": true,
                        "name_match": "partial",
                        "bic": "COBADEFFXXX",
                        "suggested_name": "Max Mustermann"
                      },
                      "error": "NAME_PARTIAL_MATCH"
                    }
                  },
                  "no_match": {
                    "summary": "No match",
                    "value": {
                      "query": {
                        "IBAN": "DE89370400440532013000",
                        "name": "John Doe",
                        "success": true
                      },
                      "result": {
                        "valid": false,
                        "name_match": "no",
                        "bic": "COBADEFFXXX",
                        "suggested_name": ""
                      },
                      "error": "NAME_NOT_MATCH"
                    }
                  },
                  "unavailable": {
                    "summary": "Name could not be checked",
                    "value": {
                      "query": {
                        "IBAN": "DE89370400440532013000",
                        "name": "Max Mustermann",
                        "success": true
                      },
                      "result": {
                        "valid": true,
                        "name_match": "unavailable",
                        "bic": "COBADEFFXXX",
                        "suggested_name": ""
                      },
                      "error": ""
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Refused: `MISSING_API_KEY`, `INVALID_JSON`, `MISSING_INPUT_IBAN` (neither `IBAN` nor `country_code` was sent),\n`MISSING_INPUT_NAME`, `COUNTRY_NOT_SUPPORTED`, `INVALID_IBAN_CHECKSUM` (IBAN mode only; uses one query).\n",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RefusedResponse"
                },
                "examples": {
                  "country": {
                    "summary": "Country not supported",
                    "value": {
                      "error": "COUNTRY_NOT_SUPPORTED"
                    }
                  },
                  "checksum": {
                    "summary": "Check digits of the IBAN are wrong (uses one query)",
                    "value": {
                      "error": "INVALID_IBAN_CHECKSUM"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Key or account problem: `INVALID_API_KEY`, `IP_NOT_ALLOWED`, `USER_NOT_ALLOWED`, `SUBSCRIPTION_EXPIRED`,\n`NO_CREDITS_AVAILABLE`. Do not retry in a loop.\n",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RefusedResponse"
                },
                "examples": {
                  "wrong_key": {
                    "summary": "The key is not known",
                    "value": {
                      "error": "INVALID_API_KEY"
                    }
                  }
                }
              }
            }
          },
          "405": {
            "description": "The request was not POST (`METHOD_NOT_ALLOWED`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RefusedResponse"
                },
                "examples": {
                  "get": {
                    "summary": "GET instead of POST",
                    "value": {
                      "error": "METHOD_NOT_ALLOWED"
                    }
                  }
                }
              }
            }
          },
          "415": {
            "description": "`Content-Type` is missing or is not `application/json` (`UNSUPPORTED_FORMAT`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RefusedResponse"
                },
                "examples": {
                  "form": {
                    "summary": "Other content type",
                    "value": {
                      "error": "UNSUPPORTED_FORMAT"
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "More than 20 requests per second. Not processed, uses no query. Slow down and retry."
          },
          "500": {
            "description": "`INTERNAL_SERVER_ERROR:BNFDBS` — the bank code (from the IBAN, or `bank_code`) was not found in the bank directory,\nincluding a missing `bank_code` in domestic mode (no query used; do not retry unchanged). `INTERNAL_SERVER_ERROR:UNERSP` —\nthe request to the bank network failed or returned an unexpected answer (uses one query; retry later). Match on the\nprefix `INTERNAL_SERVER_ERROR`.\n",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RefusedResponse"
                },
                "examples": {
                  "bank_not_found": {
                    "summary": "Bank code not in the directory",
                    "value": {
                      "error": "INTERNAL_SERVER_ERROR:BNFDBS"
                    }
                  },
                  "network": {
                    "summary": "Request to the bank network failed (uses one query)",
                    "value": {
                      "error": "INTERNAL_SERVER_ERROR:UNERSP"
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "ApiKeyHeader": {
        "type": "apiKey",
        "in": "header",
        "name": "X-API-Key",
        "description": "Your API key. Never put it in a URL. Sandbox key is `testkey`."
      }
    },
    "schemas": {
      "VerificationRequest": {
        "type": "object",
        "required": [
          "name"
        ],
        "description": "Send `IBAN` (IBAN mode) or `country_code`, `bank_code` and `account` (domestic mode), always with `name`.",
        "properties": {
          "IBAN": {
            "type": "string",
            "description": "IBAN mode. The account's IBAN. Spaces and punctuation are removed and letters are upper-cased.",
            "examples": [
              "DE89370400440532013000",
              "de89 3704-0044 0532 0130 00"
            ]
          },
          "name": {
            "type": "string",
            "description": "The name you expect the account to be held in: a person or a company, UTF-8.",
            "examples": [
              "Max Mustermann"
            ]
          },
          "country_code": {
            "type": "string",
            "description": "Domestic mode. ISO 3166 two-letter country code: `GB` or `US`. Letters are upper-cased and anything else is removed.",
            "examples": [
              "GB",
              "US"
            ]
          },
          "bank_code": {
            "type": "string",
            "description": "Domestic mode. The bank's national code. GB: 6-digit sort code. US: 9-digit ABA routing number. Spaces and dashes are removed.",
            "examples": [
              "20-00-00"
            ]
          },
          "account": {
            "type": "string",
            "description": "Domestic mode. The account number. Spaces and punctuation are removed.",
            "examples": [
              "55779911"
            ]
          }
        }
      },
      "VerificationResponse": {
        "type": "object",
        "required": [
          "query",
          "result",
          "error"
        ],
        "properties": {
          "query": {
            "type": "object",
            "required": [
              "name",
              "success"
            ],
            "description": "What was checked, after spaces and punctuation were removed. `IBAN` in IBAN mode; `country_code`, `bank_code` and `account` in domestic mode.",
            "properties": {
              "IBAN": {
                "type": "string",
                "description": "IBAN mode. The IBAN that was checked, cleaned and upper-cased."
              },
              "country_code": {
                "type": "string",
                "enum": [
                  "GB",
                  "US"
                ],
                "description": "Domestic mode."
              },
              "bank_code": {
                "type": "string",
                "description": "Domestic mode. The sort code or routing number, digits only."
              },
              "account": {
                "type": "string",
                "description": "Domestic mode. The account number, cleaned."
              },
              "name": {
                "type": "string",
                "description": "The name you sent."
              },
              "success": {
                "type": "boolean",
                "description": "Always `true` on a 200."
              }
            }
          },
          "result": {
            "type": "object",
            "required": [
              "valid",
              "name_match",
              "bic",
              "suggested_name"
            ],
            "properties": {
              "valid": {
                "type": [
                  "boolean",
                  "null"
                ],
                "description": "`true`: the bank accepted the account (the name may still not match exactly; check `name_match`). `false`: the bank rejected the account and name pair. `null`: no verdict."
              },
              "name_match": {
                "type": "string",
                "enum": [
                  "yes",
                  "partial",
                  "no",
                  "unavailable"
                ],
                "description": "The verdict on the name."
              },
              "bic": {
                "type": "string",
                "minLength": 11,
                "maxLength": 11,
                "description": "The bank's BIC, always 11 characters (8-character BICs get `XXX` added)."
              },
              "suggested_name": {
                "type": "string",
                "description": "On a partial match, the name the bank holds, if it shares it. Otherwise empty."
              }
            }
          },
          "error": {
            "type": "string",
            "enum": [
              "",
              "NAME_PARTIAL_MATCH",
              "NAME_NOT_MATCH",
              "VERIFICATION_NOT_SUPPORTED",
              "VOP_REQUEST_FAILED"
            ],
            "description": "Empty, or a code explaining the verdict."
          }
        }
      },
      "RefusedResponse": {
        "type": "object",
        "required": [
          "error"
        ],
        "additionalProperties": false,
        "properties": {
          "error": {
            "type": "string",
            "description": "Error code; `INTERNAL_SERVER_ERROR` is followed by a colon and a tag.",
            "examples": [
              "COUNTRY_NOT_SUPPORTED",
              "INVALID_API_KEY",
              "INTERNAL_SERVER_ERROR:BNFDBS"
            ]
          }
        }
      }
    }
  }
}
