
Step 1: Apply for an API key at iban-test.de
To be able to check an IBAN via the iban-test.de API, we first need a corresponding authorization code for the API. To do this, call up the following page in your web browser iban-test.com and click in the Navigation bar on the button [API].
Now enter your name, e-mail address, website and type of use in the left-hand column. After clicking on the button [Create API key] a new window opens containing your auth code for the API. It is best to copy the code into a text editor and save the file.
Step 2: Create subscript for IBAN check in FileMaker
The API of iban-test.de can be addressed via an ordinary HTTP GET/POST request. In this step, we create a partial script that is called Script-parameter accepts an IBAN and returns a 1 (valid) or a 0 (invalid) as the result. In our example file, a dialog is displayed at the end of the script that shows whether the entered IBAN is valid or invalid.
Script: ts.IBAN_check
Set error recording [On]
# Script parameter: IBAN
Set variable [$iban; Value:Get(ScriptParameter)]
Set variable [$authcode; value:ibancheck::Authcode]
Set variable [$type; value:ibancheck:type]
#
Set variable [$r; Value:MBS("Trace")]
# Prepare transfer
Set variable [$authcode; value:MBS("StringEncodeURLComponent"; $authcode; "utf8")]
Set variable [$type; value:MBS("StringEncodeURLComponent"; $type; "utf8")]
Set variable [$iban; value:MBS("StringEncodeURLComponent"; $iban; "utf8")]
Set variable [$curl; Value:MBS("CURL.New")]
Set variable [$result; value:MBS("CURL.SetOptionpost"; $curl; 1)]
Set variable [$result; Value:MBS("CURL.SetOptionVerbose"; $curl; 1)]
Set variable [$result; Value:MBS("CURL.SetOptionURL"; "http://www.iban-test.de/api.php")]
# Set input parameters
Set variable [$content; value: "authcode=" & $authcode & "&" & "type=" & $type & "&" & "iban=" & $iban]
Set variable [$content; value:MBS("String.ReplaceNewline"; $content; 2 )]
Set variable [$result; Value:MBS("CURL.SetOptionPostFields"; $curl; $content)]
# Start transfer
Set variable [$result; Value:MBS("CURL.Perform"; $curl)]
# Result check
Set variable [$debugText; value:MBS("String.ReplaceNewline"; MBS("CURL.GetDebugAsText"; $curl); 1)]
Set variable [$resultText; Value:MBS("String.ReplaceNewline"; MBS("GetResultAsText"; $curl); 1)]
Set variable [$r; value:MBS("CURL.Cleanup"; $curl); 1)]
Set variable [$result; Value:If(PatternNumber($resultText; "200") > 0; 1; 0)]
Set variable [$result text; Value:If($result=0; "invalid"; "valid")]
# Test dialog
Display own dialog box ["IBAN" & $result text; "The IBAN entered is " & $result text
The script initially accepts the IBAN as a script parameter. To prevent any spaces within the IBAN, it is recommended to add the command Replace($iban; " "; "") to add.
Enter authcode

Prepare transfer
In the program section Transfer the three parameters are set to the correct form and the query URL is set. In our example, the URL
http://www.iban-test.de/api.php
is permanently integrated into the script - it can of course also be obtained dynamically from a field.
Start transfer
In the parts Set input parameters and Start transfer the parameters are put together, the fields are transferred and the transfer is started. The result check checks whether the result code 200 is a valid IBAN or whether it is invalid.
In our sample database, we have added a test dialog that shows whether the IBAN entered is valid or invalid.
Integration into your own FileMaker solutions
In our example script, the last line is the command
Exit current script [Result: $result]
This command is not required for our example file. However, if you integrate the included script into your solution, it is advisable to integrate it as a partial script that returns as a value whether the supplied IBAN is valid or not. Please do not forget to remove the example dialog during integration ;-)
MBS FileMaker Plugin
This solution uses CURL functions of the MBS FileMaker Plugin. Tip: Until April 30, the MBS FileMaker plugin is available as part of the 20th anniversary at the K&K Verlag (FileMaker Magazine) in Hamburg at reduced prices. Further information on the MBS FileMaker Plugin can be found on the Website of the manufacturer.
Download sample file for FileMaker 12/13
How to transfer scripts from the sample file to your solution
Scripts can be easily transferred from one FileMaker solution to another via the clipboard. Simply open the dialog Manage scriptsSelect the desired script with the mouse and copy the script to the clipboard using the [Edit - Copy] menu or [Ctrl/Cmd-C] key combination. Then open the same dialog in the target solution and simply paste the previously copied script using the [Edit - Paste] menu command.
To transfer tables from the example file to your solution
Tables can be inserted into an existing solution in several ways. The easiest way is to import the Table via the [Import...] button in the dialog Database Manage. All tables to be imported from the source solution can then be selected in a subsequent dialog. This method is therefore particularly suitable if several tables are to be imported at the same time. If only one table is to be imported, this can also be done via the clipboard like a script. If a table is to be imported together with its data, this can be done with the command [File > Import records > File]. In the import dialog, the target table New table must be specified.
How to transfer value lists from the example file to your solution
Value lists can be easily imported from one FileMaker solution to another via the clipboard. Simply open the dialog under [File/File > Manage > Value lists], select the desired value list and click on [Import]. Value list with the mouse and copy the value list to the clipboard using the [Edit - Copy] menu or the [Ctrl/Cmd-C] key combination. Then open the same dialog in the target solution and paste the previously copied value list using the [Edit - Paste] menu command.
How to transfer your own functions from the example file to your solution
In the [File > Manage > Custom functions...] dialog, click on the [Import] button and select the sample file. Select the desired custom functions in the following dialog and confirm the dialog. Please note that this function is only available in FileMaker Pro Advanced, but not in FileMaker Pro.

Markus Schall has been developing individual databases, interfaces and business applications based on Claris FileMaker since 1994. He is a Claris partner, FMM Award winner 2011 and developer of the ERP software gFM-Business. He is also a book author and founder of the M. Schall Publishers.



This reminds me of the good old days when we used to type listings for the C=64. Many thanks for the article and the sample file :-)
Hello and good day,
I am currently testing this script and get an "invalid" for every IBAN. Is the script still up to date?
Here you may have to check whether the provider's interface is still up to date or whether it has been changed in the meantime.