The official Go package for validating IBAN using the ibanapi.com public API
This package offers methods to validate IBAN (full and basic validation) wherein full validation will return the bank information alongside the basic validations.
- Get an API Key from the ibanapi.com website.
- Install the package
go get github.com/ibanapi/ibanapi_go
- You can now initialize & use the package as follows
- Import the package
import ibanapi "github.com/ibanapi/ibanapi_go/ibanapi"
- For full iban validation
//Get all the IBAN Information
resp, err := ibanapi.ValidateIBAN("API_KEY", "EE471000001020145685")
if err != nil {
panic(err)
}
//Use the results to fit your application logic
fmt.Println(resp.Result)
- For basic iban validation
//Get all the basic IBAN Information
resp, err := ibanapi.ValidateIBANBasic("API_KEY", "EE471000001020145685")
if err != nil {
panic(err)
}
//Use the results to fit your application logic
fmt.Println(resp.Result)
- To get the balance
//Get the account balance
resp, err := ibanapi.GetBalance("API_KEY")
if err != nil {
panic(err)
}
fmt.Println(resp.Result)
Please feel free to open a bug report or pull request to this repo.
or visit the iban api website