IBAN Validation
An IBAN (International Bank Account Number) is an identification number for (nearly) every bank account in the world. Swan lets you fetch an IBAN's bank and account data as well as its reachability.
First, the
ibanValidation
query lets you check the format of the IBAN. If there are any issues, we will return an error.Valid IBAN
Invalid IBAN
query MyQuery {
ibanValidation(input: { iban: "FR7817569000305414384277J07" }) {
... on ValidIban {
__typename
accountNumber
}
... on InvalidIban {
__typename
message
code
}
}
}
query MyQuery {
ibanValidation(input: { iban: "FR76182060016265" }) {
... on ValidIban {
__typename
accountNumber
}
}
... on InvalidIban {
__typename
code
message
}
}
}
To limit abuse in the Sandbox, the resolver provides only dummy data.
If the IBAN format is valid, Swan will return, when available, information about the account and bank associated to the IBAN:
accountNumber
: the account number (also referred to as the BBAN)bic
: the BIC (Bank Identifier Code) of the bank holding the concerned accountnationalId
: the bank's local identifierbranch
: the bank branch where the account is openedname
: the name of the bankaddress
: the address of the bank
The
ibanValidation
query also provides payment schemes reachability. A boolean, true/false, indicates whether or not the IBAN in question can be reached using one of the following payment schemes:sepaCreditTransferInst
: if true, the IBAN can receive SEPA instant credit transfers
At the moment, the only scheme available to send from Swan is SEPA Credit Transfers. We are actively working on delivering the SDD Core, SDD B2B, and SCT Inst schemes.
This feature enables some use cases like:
- 1.Error detection: before using the
initiateCreditTransfers
mutation, you can check if the IBAN is valid. This saves you the trouble of handling errors in case of incorrectly structured IBANs. - 2.Display bank information in real-time: instead of displaying only the IBAN to your end-users, add the bank name, country, Bic code, address. Users know instantly if the IBAN they manipulate is the correct one. This prevents you from wiring money to the wrong account.
Last modified 5mo ago