NAV Navbar
shell ruby python javascript php
  • Getting Started with API
  • Access Authentication
  • Access Key Managemenet
  • Account and Account Holder interaction API Calls
  • Lookup API Calls
  • Transactional API Calls
  • Notification Management
  • eWallet iFrame
  • Additional Files
  • Getting Started with API

    
      /$$$$$$            /$$       /$$                 /$$          
     /$$__  $$          |__/      | $$                | $$          
    | $$  \ $$  /$$$$$$  /$$      | $$$$$$$   /$$$$$$ | $$  /$$$$$$ 
    | $$$$$$$$ /$$__  $$| $$      | $$__  $$ /$$__  $$| $$ /$$__  $$
    | $$__  $$| $$  \ $$| $$      | $$  \ $$| $$$$$$$$| $$| $$  \ $$
    | $$  | $$| $$  | $$| $$      | $$  | $$| $$_____/| $$| $$  | $$
    | $$  | $$| $$$$$$$/| $$      | $$  | $$|  $$$$$$$| $$| $$$$$$$/
    |__/  |__/| $$____/ |__/      |__/  |__/ \_______/|__/| $$____/ 
              | $$                                        | $$      
              | $$                                        | $$      
              |__/     
    
      /$$$$$$            /$$       /$$                 /$$          
     /$$__  $$          |__/      | $$                | $$          
    | $$  \ $$  /$$$$$$  /$$      | $$$$$$$   /$$$$$$ | $$  /$$$$$$ 
    | $$$$$$$$ /$$__  $$| $$      | $$__  $$ /$$__  $$| $$ /$$__  $$
    | $$__  $$| $$  \ $$| $$      | $$  \ $$| $$$$$$$$| $$| $$  \ $$
    | $$  | $$| $$  | $$| $$      | $$  | $$| $$_____/| $$| $$  | $$
    | $$  | $$| $$$$$$$/| $$      | $$  | $$|  $$$$$$$| $$| $$$$$$$/
    |__/  |__/| $$____/ |__/      |__/  |__/ \_______/|__/| $$____/ 
              | $$                                        | $$      
              | $$                                        | $$      
              |__/     
    
      /$$$$$$            /$$       /$$                 /$$          
     /$$__  $$          |__/      | $$                | $$          
    | $$  \ $$  /$$$$$$  /$$      | $$$$$$$   /$$$$$$ | $$  /$$$$$$ 
    | $$$$$$$$ /$$__  $$| $$      | $$__  $$ /$$__  $$| $$ /$$__  $$
    | $$__  $$| $$  \ $$| $$      | $$  \ $$| $$$$$$$$| $$| $$  \ $$
    | $$  | $$| $$  | $$| $$      | $$  | $$| $$_____/| $$| $$  | $$
    | $$  | $$| $$$$$$$/| $$      | $$  | $$|  $$$$$$$| $$| $$$$$$$/
    |__/  |__/| $$____/ |__/      |__/  |__/ \_______/|__/| $$____/ 
              | $$                                        | $$      
              | $$                                        | $$      
              |__/     
    
      /$$$$$$            /$$       /$$                 /$$          
     /$$__  $$          |__/      | $$                | $$          
    | $$  \ $$  /$$$$$$  /$$      | $$$$$$$   /$$$$$$ | $$  /$$$$$$ 
    | $$$$$$$$ /$$__  $$| $$      | $$__  $$ /$$__  $$| $$ /$$__  $$
    | $$__  $$| $$  \ $$| $$      | $$  \ $$| $$$$$$$$| $$| $$  \ $$
    | $$  | $$| $$  | $$| $$      | $$  | $$| $$_____/| $$| $$  | $$
    | $$  | $$| $$$$$$$/| $$      | $$  | $$|  $$$$$$$| $$| $$$$$$$/
    |__/  |__/| $$____/ |__/      |__/  |__/ \_______/|__/| $$____/ 
              | $$                                        | $$      
              | $$                                        | $$      
              |__/     
    
      /$$$$$$            /$$       /$$                 /$$          
     /$$__  $$          |__/      | $$                | $$          
    | $$  \ $$  /$$$$$$  /$$      | $$$$$$$   /$$$$$$ | $$  /$$$$$$ 
    | $$$$$$$$ /$$__  $$| $$      | $$__  $$ /$$__  $$| $$ /$$__  $$
    | $$__  $$| $$  \ $$| $$      | $$  \ $$| $$$$$$$$| $$| $$  \ $$
    | $$  | $$| $$  | $$| $$      | $$  | $$| $$_____/| $$| $$  | $$
    | $$  | $$| $$$$$$$/| $$      | $$  | $$|  $$$$$$$| $$| $$$$$$$/
    |__/  |__/| $$____/ |__/      |__/  |__/ \_______/|__/| $$____/ 
              | $$                                        | $$      
              | $$                                        | $$      
              |__/     
    

    This guide is an introduction to the MiFinity API use. It will guide you from the most basic authentication to your first transaction. Once familiarized with this, we encourage you to explore the full API specification for more features.

    We have language bindings in Shell, Ruby, and Python! You can view code examples in the dark area to the right, and you can switch the programming language of the examples with the tabs in the top right.

    To follow this guide, and later for general API use, you need:

    Access Authentication

    Token Authentication

    Make sure to replace Basic c3RlaXhlaXJhQG1pZmluaXR5LmNvbToiZG1pbjEyMzQy with your credentials.

    This is the most basic level of authentication using your MiFinity credentials (user name and password). This function returns a security token. We are showing this function for informational purposes in the context of this tutorial. For regular API calls, do not use tokens, use API keys instead (will be explained in next session "Generate API Key"). The accountHolderId and userId values will be useful for some API functions. We recommend storing them in your system to avoid automating this function call.

    To authorize, use this code:

    require 'uri'
    require 'net/http'
    
    url = URI("https://demo.mifinitypay.com/api/oauth/token")
    
    http = Net::HTTP.new(url.host, url.port)
    http.use_ssl = true
    http.verify_mode = OpenSSL::SSL::VERIFY_NONE
    
    request = Net::HTTP::Post.new(url)
    request["accept"] = 'application/json'
    request["content-type"] = 'application/x-www-form-urlencoded'
    request["x-api-version"] = '1'
    request["authorization"] = 'Basic c3RlaXhlaXJhQG1pZmluaXR5LmNvbToiZG1pbjEyMzQy'
    request.body = "grant_type=client_credentials"
    
    response = http.request(request)
    puts response.read_body
    
    import http.client
    
    conn = http.client.HTTPSConnection("demo.mifinitypay.com")
    
    payload = "grant_type=client_credentials"
    
    headers = {
        'accept': "application/json",
        'content-type': "application/x-www-form-urlencoded",
        'x-api-version': "1",
        'authorization': "Basic c3RlaXhlaXJhQG1pZmluaXR5LmNvbToiZG1pbjEyMzQy",
        }
    
    conn.request("POST", "/api/oauth/token", payload, headers)
    
    res = conn.getresponse()
    data = res.read()
    
    print(data.decode("utf-8"))
    
    # With shell, you can just pass the correct header with each request
    curl -X POST \
      https://demo.mifinitypay.com/api/oauth/token \
      -H 'accept: application/json' \
      -H 'authorization: Basic c3RlaXhlaXJhQG1pZmluaXR5LmNvbToiZG1pbjEyMzQy' \
      -H 'content-type: application/x-www-form-urlencoded' \
      -H 'x-api-version: 1' \
      -d grant_type=client_credentials
    
    var data = "grant_type=client_credentials";
    
    var xhr = new XMLHttpRequest();
    xhr.withCredentials = true;
    
    xhr.addEventListener("readystatechange", function () {
      if (this.readyState === 4) {
        console.log(this.responseText);
      }
    });
    
    xhr.open("POST", "https://demo.mifinitypay.com/api/oauth/token");
    xhr.setRequestHeader("accept", "application/json");
    xhr.setRequestHeader("content-type", "application/x-www-form-urlencoded");
    xhr.setRequestHeader("x-api-version", "1");
    xhr.setRequestHeader("authorization", "Basic c3RlaXhlaXJhQG1pZmluaXR5LmNvbToiZG1pbjEyMzQy");
    xhr.send(data);
    
    <?php
    
    $request = new HttpRequest();
    $request->setUrl('https://demo.mifinitypay.com/api/oauth/token');
    $request->setMethod(HTTP_METH_POST);
    
    $request->setHeaders(array(
      'authorization' => 'Basic c3RlaXhlaXJhQG1pZmluaXR5LmNvbToiZG1pbjEyMzQy',
      'x-api-version' => '1',
      'content-type' => 'application/x-www-form-urlencoded',
      'accept' => 'application/json'
    ));
    
    $request->setContentType('application/x-www-form-urlencoded');
    $request->setPostFields(array(
      'grant_type' => 'client_credentials'
    ));
    
    try {
      $response = $request->send();
    
      echo $response->getBody();
    } catch (HttpException $ex) {
      echo $ex;
    }
    ?>
    

    HTTP Request

    POST https://demo.mifinity.com/api/oauth/token

    Parameter Type Description
    Content-Type String Use value 'application/x-www-form-urlencoded'
    Accept String Use value 'application/json'
    x-api-version String Use value 1
    Authorization String Concatenate 'Basic ' and 'username:password (encoded in Base64)'

    Parameters

    Field Type Description
    grant_type String Use value 'client_credentials'

    Successful response

    {
      "access_token":"YivPXq-5z3LjeZ_pc4V_2npiNoXACcYIAkQqLrFumht.........IE5dxw8d-biwUJ09KtS7RvARKSOJyzsv9",
      "token_type":"bearer",
      "expires_in":86399,
      "accountHolderId":"8UA4IF4sJXQOrT-0xHXDeigJkTxp3MR9kGhwa4oFFAg=",
      "createTime":"2018-05-02T12:32:12.883Z",
      "passwordExpired":false,
      "uuid":"f291b39e-064c-4f89-9e23-d2c3672d8e96",
      "userId":"6hY9RsVoIwUvC_4RVSLhnGhJIsf3QJXCFcPULH0bQJY="
    }
    

    Successful response

    Field Type Description
    access_token String Security token
    accountHolderId String Your Account Holder Id (store it in your system if possible)
    userId String Your User ID (store it in your system if possible)
    token_type String The type of token
    expires_in Number
    createTime DataTime Time of creation
    passwordExpired Boolean
    uuid Srring

    Access Key Managemenet

    Generate API key

    If you are doing an automated connection to our APIs (machine to machine), you have to create a security key. Send this key within every call so we can authenticate you into our APIs.

    Keys do not expire (unless you create them with expiry date) and you can store them and use multiple times.

    Use the example below replacing access_token and userId with the values you have from the previous steps.

    The returning field keyData is your security key to call the API functions. Store this key (using the method you prefer) at the moment it is generated. Once created we will not show this value to you again (for security reasons). If you lose it, you can generate a new key and disable the lost one.

    We recommend that you manage your keys using the MiFinity portal. It can be convenient as it is usually not necessary to create keys frequently, and you can avoid implementing API calls for key creation in your system.

    To generate the API key , use this code:

    require 'uri'
    require 'net/http'
    
    url = URI("https://demo.mifinity.com/api/users/6hY9RsVoIwUvC_4RVSLhnGhJIsf3QJXCFcPULH0bQJY=/api-keys")
    
    http = Net::HTTP.new(url.host, url.port)
    http.use_ssl = true
    http.verify_mode = OpenSSL::SSL::VERIFY_NONE
    
    request = Net::HTTP::Post.new(url)
    request["accept"] = 'application/json'
    request["content-type"] = 'application/x-www-form-urlencoded'
    request["x-api-version"] = '1'
    request["authorization"] = 'Bearer YivPXq-5z3LjeZ_pc4V_2npiNoXACcYIAkQqLrFumht.........IE5dxw8d-biwUJ09KtS7RvARKSOJyzs'
    request.body = "name=my%20key%20name"
    
    response = http.request(request)
    puts response.read_body
    
    import http.client
    
    conn = http.client.HTTPSConnection("demo.mifinity.com")
    
    payload = "name=my%20key%20name"
    
    headers = {
        'accept': "application/json",
        'content-type': "application/x-www-form-urlencoded",
        'x-api-version': "1",
        'authorization': "Bearer YivPXq-5z3LjeZ_pc4V_2npiNoXACcYIAkQqLrFumht.........IE5dxw8d-biwUJ09KtS7RvARKSOJyzs"
        }
    
    conn.request("POST", "/api/users/6hY9RsVoIwUvC_4RVSLhnGhJIsf3QJXCFcPULH0bQJY=/api-keys", payload, headers)
    
    res = conn.getresponse()
    data = res.read()
    
    print(data.decode("utf-8"))
    
    curl -X POST \
      https://demo.mifinity.com/api/users/6hY9RsVoIwUvC_4RVSLhnGhJIsf3QJXCFcPULH0bQJY=/api-keys \
      -H 'accept: application/json' \
      -H 'authorization: Bearer YivPXq-5z3LjeZ_pc4V_2npiNoXACcYIAkQqLrFumht.........IE5dxw8d-biwUJ09KtS7RvARKSOJyzs' \
      -H 'content-type: application/x-www-form-urlencoded' \
      -H 'x-api-version: 1' \
      -d name=my%20key%20name
    
    var data = "name=my%20key%20name";
    
    var xhr = new XMLHttpRequest();
    xhr.withCredentials = true;
    
    xhr.addEventListener("readystatechange", function () {
      if (this.readyState === 4) {
        console.log(this.responseText);
      }
    });
    
    xhr.open("POST", "https://demo.mifinity.com/api/users/6hY9RsVoIwUvC_4RVSLhnGhJIsf3QJXCFcPULH0bQJY=/api-keys");
    xhr.setRequestHeader("accept", "application/json");
    xhr.setRequestHeader("content-type", "application/x-www-form-urlencoded");
    xhr.setRequestHeader("x-api-version", "1");
    xhr.setRequestHeader("authorization", "Bearer YivPXq-5z3LjeZ_pc4V_2npiNoXACcYIAkQqLrFumht.........IE5dxw8d-biwUJ09KtS7RvARKSOJyzs");
    xhr.send(data); 
    
    <?php
    
    $request = new HttpRequest();
    $request->setUrl('https://demo.mifinity.com/api/users/6hY9RsVoIwUvC_4RVSLhnGhJIsf3QJXCFcPULH0bQJY=/api-keys');
    $request->setMethod(HTTP_METH_POST);
    
    $request->setHeaders(array(
      'authorization' => 'Bearer YivPXq-5z3LjeZ_pc4V_2npiNoXACcYIAkQqLrFumht.........IE5dxw8d-biwUJ09KtS7RvARKSOJyzs',
      'x-api-version' => '1',
      'content-type' => 'application/x-www-form-urlencoded',
      'accept' => 'application/json'
    ));
    
    $request->setContentType('application/x-www-form-urlencoded');
    $request->setPostFields(array(
      'name' => 'my key name'
    ));
    
    try {
      $response = $request->send();
    
      echo $response->getBody();
    } catch (HttpException $ex) {
      echo $ex;
    }
    ?>
    

    HTTP Request

    POST https://demo.mifinity.com/api/users/{userId}/api-keys

    Parameter Type Description
    Content-Type String Use value 'application/x-www-form-urlencoded'
    Accept String Use value 'application/json'
    x-api-version String Use value 1
    Authorization String Authorization Use 'bearer '

    Parameters

    Field Type Description
    userId String (Path Variable)Your user Id
    name String Api Key name of your choice

    Successful response

    {
      "payload":[
        {
          "entityId":"smFb_iAQU2uHaP88myysvG-O90rUfax0WjHKz6gWWzI=",
          "lastPasswordChange":"2018-05-02T13:14:14.989Z",
          "createdOn":"2018-05-02T13:14:14.975Z",
          "keyName":"my key name",
          "keyData":"qbS2i_dlYYQrLwYvTzDd2CHpZ-KNR...VNs-3qLI1jQg7uvfx-A-bYwAS9EbHl-3h_OuQWNxjIO25mkr-t7j",
          "type":"API_KEY",
          "status":"ACTIVE",
          "totpEnabled":false,
          "valid":true
        }
      ]
    }
    

    Successful response

    Field Type Description
    entityId String Id for API key
    createOn DateTime Date Time for creating API time
    KeyData String Update an new API key.
    totpEnabled Boolean
    keyName String Key name
    type String Having API_KEY and EMAIL_PASSWORD two options
    totpEnabled Boolean
    valid Boolean
    lastPasswordChang String
    status String

    Disable API Key

    To disable an API key , use this code:

    require 'uri'
    require 'net/http'
    
    url = URI("https://demo.mifinity.com/api/api-keys/smFb_iAQU2uHaP88myysvG-O90rUfax0WjHKz6gWWzI=")
    
    http = Net::HTTP.new(url.host, url.port)
    http.use_ssl = true
    http.verify_mode = OpenSSL::SSL::VERIFY_NONE
    
    request = Net::HTTP::Delete.new(url)
    request["accept"] = 'application/json'
    request["content-type"] = 'application/x-www-form-urlencoded'
    request["x-api-version"] = '1'
    request["key"] = 'qbS2i_dlYYQrLwYvTzDd2CHpZ-KNR...VNs-3qLI1jQg7uvfx-A-bYwAS9EbHl-3h_OuQWNxjIO25mkr-t7j'
    response = http.request(request)
    puts response.read_body
    
    import requests
    
    url = "https://demo.mifinity.com/api/api-keys/smFb_iAQU2uHaP88myysvG-O90rUfax0WjHKz6gWWzI="
    
    headers = {
        'accept': "application/json",
        'content-type': "application/x-www-form-urlencoded",
        'x-api-version': "1",
        'key': "qbS2i_dlYYQrLwYvTzDd2CHpZ-KNR...VNs-3qLI1jQg7uvfx-A-bYwAS9EbHl-3h_OuQWNxjIO25mkr-t7j"
        }
    
    response = requests.request("DELETE", url, headers=headers)
    
    print(response.text)
    
    curl -X DELETE \
      https://demo.mifinity.com/api/api-keys/smFb_iAQU2uHaP88myysvG-O90rUfax0WjHKz6gWWzI= \
      -H 'accept: application/json' \
      -H 'content-type: application/x-www-form-urlencoded' \
      -H 'key: qbS2i_dlYYQrLwYvTzDd2CHpZ-KNR...VNs-3qLI1jQg7uvfx-A-bYwAS9EbHl-3h_OuQWNxjIO25mkr-t7j' \
      -H 'x-api-version: 1'
    
    
    
    
    <?php
    
    $request = new HttpRequest();
    $request->setUrl('https://demo.mifinity.com/api/api-keys/smFb_iAQU2uHaP88myysvG-O90rUfax0WjHKz6gWWzI=');
    $request->setMethod(HTTP_METH_DELETE);
    
    $request->setHeaders(array(
      'key' => 'qbS2i_dlYYQrLwYvTzDd2CHpZ-KNR...VNs-3qLI1jQg7uvfx-A-bYwAS9EbHl-3h_OuQWNxjIO25mkr-t7j',
      'x-api-version' => '1',
      'content-type' => 'application/x-www-form-urlencoded',
      'accept' => 'application/json'
    ));
    
    try {
      $response = $request->send();
    
      echo $response->getBody();
    } catch (HttpException $ex) {
      echo $ex;
    }
    ?>
    

    HTTP Request

    DELETE https://demo.mifinity.com/api/api-keys/{entityId}

    Header

    Parameter Type Description
    Content-Type String Use value 'application/x-www-form-urlencoded'
    Accept String Use value 'application/json'
    x-api-version String Use value 1
    key String Use your API key

    Parameters

    Field Type Description
    entityId String (Path Variable) The entity id of the key that will be disabled.

    Update API Key

    Updates an API key properties. Note calling this API will return in token being flagged as expired.

    require 'uri'
    require 'net/http'
    
    url = URI("https://demo.mifinity.com/api/api-keys/S_bYbUDbx-QjAbhNP6_YOqNVqQJ_SH1TUQ5SlUfLuNk=")
    
    http = Net::HTTP.new(url.host, url.port)
    http.use_ssl = true
    http.verify_mode = OpenSSL::SSL::VERIFY_NONE
    
    request = Net::HTTP::Put.new(url)
    request["accept"] = 'application/json'
    request["content-type"] = 'application/json'
    request["x-api-version"] = '1'
    request["key"] = 'sQO8Q3i5-HeD7F0BqVSIN1p8Bq2r2AO1jG68Tjp2Qw1d62F8R_axDre5aOFQkIpldqtl8D_CWRIcazGBDIE0KVLHnl0H4oa2OlzjF65qnjqMDo8Bl0GKUTvexaVm5n7g'
    request.body = "{\n        \"totpEnabled\":false \n}"
    
    response = http.request(request)
    puts response.read_body
    
    import http.client
    
    conn = http.client.HTTPSConnection("demo.mifinity.com")
    
    payload = "{\n        \"totpEnabled\":false \n}"
    
    headers = {
        'accept': "application/json",
        'content-type': "application/json",
        'x-api-version': "1",
        'key': "sQO8Q3i5-HeD7F0BqVSIN1p8Bq2r2AO1jG68Tjp2Qw1d62F8R_axDre5aOFQkIpldqtl8D_CWRIcazGBDIE0KVLHnl0H4oa2OlzjF65qnjqMDo8Bl0GKUTvexaVm5n7g"
        }
    
    conn.request("PUT", "/api/api-keys/S_bYbUDbx-QjAbhNP6_YOqNVqQJ_SH1TUQ5SlUfLuNk=", payload, headers)
    
    res = conn.getresponse()
    data = res.read()
    
    print(data.decode("utf-8"))
    
    curl -X PUT \
      https://demo.mifinity.com/api/api-keys/S_bYbUDbx-QjAbhNP6_YOqNVqQJ_SH1TUQ5SlUfLuNk= \
      -H 'accept: application/json' \
      -H 'key: sQO8Q3i5-HeD7F0BqVSIN1p8Bq2r2AO1jG68Tjp2Qw1d62F8R_axDre5aOFQkIpldqtl8D_CWRIcazGBDIE0KVLHnl0H4oa2OlzjF65qnjqMDo8Bl0GKUTvexaVm5n7g' \
      -H 'content-type: application/json' \
      -H 'x-api-version: 1' \
      -d '{
           "totpEnabled":false
    }'
    
    var data = JSON.stringify({
            "totpEnabled":false
    });
    
    var xhr = new XMLHttpRequest();
    xhr.withCredentials = true;
    
    xhr.addEventListener("readystatechange", function () {
      if (this.readyState === 4) {
        console.log(this.responseText);
      }
    });
    
    xhr.open("PUT", "https://demo.mifinity.com/api/api-keys/S_bYbUDbx-QjAbhNP6_YOqNVqQJ_SH1TUQ5SlUfLuNk=");
    xhr.setRequestHeader("accept", "application/json");
    xhr.setRequestHeader("content-type", "application/json");
    xhr.setRequestHeader("x-api-version", "1");
    xhr.setRequestHeader("key", "sQO8Q3i5-HeD7F0BqVSIN1p8Bq2r2AO1jG68Tjp2Qw1d62F8R_axDre5aOFQkIpldqtl8D_CWRIcazGBDIE0KVLHnl0H4oa2OlzjF65qnjqMDo8Bl0GKUTvexaVm5n7g");
    xhr.send(data); 
    
    <?php
    
    $request = new HttpRequest();
    $request->setUrl('https://demo.mifinity.com/api/api-keys/S_bYbUDbx-QjAbhNP6_YOqNVqQJ_SH1TUQ5SlUfLuNk=');
    $request->setMethod(HTTP_METH_PUT);
    
    $request->setHeaders(array(
      'key' => 'sQO8Q3i5-HeD7F0BqVSIN1p8Bq2r2AO1jG68Tjp2Qw1d62F8R_axDre5aOFQkIpldqtl8D_CWRIcazGBDIE0KVLHnl0H4oa2OlzjF65qnjqMDo8Bl0GKUTvexaVm5n7g',
      'x-api-version' => '1',
      'content-type' => 'application/json',
      'accept' => 'application/json'
    ));
    
    $request->setBody('{
          "totpEnabled":false
    }');
    
    try {
      $response = $request->send();
    
      echo $response->getBody();
    } catch (HttpException $ex) {
      echo $ex;
    }
    ?>
    

    HTTP Request

    PUT https://demo.mifinity.com/api/api-keys/{keyId}

    Header

    Parameter Type Description
    Content-Type String Use value 'application/x-www-form-urlencoded'
    Accept String Use value 'application/json'
    x-api-version String Use value 1
    key String Use your API key

    Parameters

    Field Type Require Description
    keyId String Entity Id for the API Key (Path Variable)
    totpEnabled Boolean
    keyName String optional Key name
    type String optional Having API_KEY and EMAIL_PASSWORD two options
    keyData String optional API Key

    Successful response

    {
       "payload": [
            {
                "entityId": "BQb4XyMlK3Cr5wNx6ytwsbPmhQs6wk32TvQUqd9BpGc=",
                "lastPasswordChange": "2018-09-25T09:05:25.542Z",
                "createdOn": "2018-09-25T09:05:25.539Z",
                "keyName": "fifth key",
                "keyData": "2v9hJY9SscdEgCsQZokCcDvg90Q0QCqE/plDflvRl38=",
                "type": "API_KEY",
                "status": "ACTIVE",
                "totpEnabled": false,
                "valid": true
            }
        ]
    }
    

    Successful response

    Field Type Description
    entityId String Id for API key
    createOn DateTime Date Time for creating API time
    KeyData String Update an new API key.
    totpEnabled Boolean
    keyName String Key name
    type String Having API_KEY and EMAIL_PASSWORD two options
    lastPasswordChang String
    valid Boolean
    status String

    Account and Account Holder interaction API Calls

    Get Account Listing by Account Holder Id

    Get list of Accounts belonging to an Account Holder by AccountHolderId. Replacing key and accountHolderId with the values that you have from the previous steps. Using any paramaters value.

    require 'uri'
    require 'net/http'
    
    url = URI("https://demo.mifinity.com/api/account-holders/c50fzSfbhsLvmtcx9zTgkDwvjg8ZxOi2LUWHvcGkVc0=/accounts")
    
    http = Net::HTTP.new(url.host, url.port)
    http.use_ssl = true
    http.verify_mode = OpenSSL::SSL::VERIFY_NONE
    
    request = Net::HTTP::Get.new(url)
    request["accept"] = 'application/json'
    request["content-type"] = 'application/json'
    request["x-api-version"] = '1'
    request["key"] = 'sQO8Q3i5-HeD7F0BqVSIN1p......qnjqMDo8Bl0GKUTvexaVm5n7g'
    
    response = http.request(request)
    puts response.read_body
    
    import http.client
    
    conn = http.client.HTTPSConnection("demo.mifinity.com")
    
    
    headers = {
        'accept': "application/json",
        'content-type': "application/json",
        'x-api-version': "1",
        'key': "sQO8Q3i5-HeD7F0BqVSIN1p......qnjqMDo8Bl0GKUTvexaVm5n7g"
        }
    
    conn.request("GET", "/api/account-holders/c50fzSfbhsLvmtcx9zTgkDwvjg8ZxOi2LUWHvcGkVc0=/accounts",  headers)
    
    res = conn.getresponse()
    data = res.read()
    
    print(data.decode("utf-8"))
    
    curl -X GET \
      https://demo.mifinity.com/api/account-holders/c50fzSfbhsLvmtcx9zTgkDwvjg8ZxOi2LUWHvcGkVc0=/accounts \
      -H 'accept: application/json' \
      -H 'key: sQO8Q3i5-HeD7F0BqVSIN1p......qnjqMDo8Bl0GKUTvexaVm5n7g' \
      -H 'content-type: application/json' \
      -H 'x-api-version: 1' \
    
    var xhr = new XMLHttpRequest();
    xhr.withCredentials = true;
    
    xhr.addEventListener("readystatechange", function () {
      if (this.readyState === 4) {
        console.log(this.responseText);
      }
    });
    
    xhr.open("GET", "https://demo.mifinity.com/api/account-holders/c50fzSfbhsLvmtcx9zTgkDwvjg8ZxOi2LUWHvcGkVc0=/accounts");
    xhr.setRequestHeader("accept", "application/json");
    xhr.setRequestHeader("content-type", "application/json");
    xhr.setRequestHeader("x-api-version", "1");
    xhr.setRequestHeader("key", "sQO8Q3i5-HeD7F0BqVSIN1p......qnjqMDo8Bl0GKUTvexaVm5n7g");
    
    
    <?php
    
    $request = new HttpRequest();
    $request->setUrl('https://demo.mifinity.com/api/account-holders/c50fzSfbhsLvmtcx9zTgkDwvjg8ZxOi2LUWHvcGkVc0=/accounts');
    $request->setMethod(HTTP_METH_GET);
    
    $request->setHeaders(array(
      'key' => 'sQO8Q3i5-HeD7F0BqVSIN1p......qnjqMDo8Bl0GKUTvexaVm5n7g',
      'x-api-version' => '1',
      'content-type' => 'application/json',
      'accept' => 'application/json'
    ));
    
    
    try {
      $response = $request->send();
    
      echo $response->getBody();
    } catch (HttpException $ex) {
      echo $ex;
    }
    ?>
    

    HTTP Request

    GET https://demo.mifinity.com/api/account-holders/{accountHolderId}/accounts

    Parameter Type Description
    Content-Type String Use value 'application/json'
    Accept String Use value 'application/json'
    x-api-version String Use value 1
    Key String API key

    Parameters

    Field Type Required Description
    accountHolderId String Unique account holder id (Path Variable)
    accountDescription String optional Account description
    number Number optional Unique account number
    accountType String optional The account type. Accepted values: SYSTEM, PLATFORM, CARD
    loading boolean optional Is loading account
    currency String optional Account currency
    includeDisabled boolean Show disabled accounts
    andor String optional And, Or operator
    includeKycPending boolean optional Show KYC pending accounts (default true)
    sort sort optional Records sort direction
    total long optional Total number of records to return
    page int optional
    size int optional

    Successful response

    {
        "payload": [
            {
                "accountNumber": "50010001000007",
                "accountDescription": "Travel",
                "balance": {
                    "amount": 0,
                    "currency": "EUR",
                    "presentationAmount": "EUR0.00"
                },
                "availableBalance": {
                    "amount": 0,
                    "currency": "EUR",
                    "presentationAmount": "EUR0.00"
                },
                "displayInfo": "50010001000007-travel [ 0.00 EUR ]",
                "accountHolderId": "n9bOW7XaTXpfU-rtQwEWr2XBAX1nkI6LtgwiZVikWKY=",
                "accountType": "PLATFORM",
                "notificationThresholdAmount": 0,
                "accountCategory": "TRAVEL",
                "createdOn": "2018-09-12T10:37:46.185Z",
                "isDefault": true,
                "entityId": "DM0fGZ8g3lyhgT8atnG6Rc0l4DcrkpaUpsTvaZwAB78="
            }
        ],
        "page": {
            "size": 100,
            "page": 0,
            "total": 3
        }
    }
    

    Successful response

    Field Type Description
    accountNumber String The unique account number
    accountDescription String Description of the account
    balance Object Complex object containing amount, currency and persentationAmount
    avaiableBalance Object Complex object containing amount, currency and persentationAmount
    displayInfo String Display information
    accountHolderId String Unique account holder Id
    accountType String the type of account
    notificationThresholdAmount int
    createdOn String Date and time token generation timestamp
    accountCategory String Account category. Values: GAMING, TRAVEL, E_COMMERCE, REMITTANCE
    isDefault boolean
    entityId String Unique entity id
    page Object Complex object containing: size, page and total

    Update Account Threshold

    Update an accounts threshold by using accoundId (which is entityid) generated by previous steps. In the below code, changing account Thershold from origin value into 10.

    require 'uri'
    require 'net/http'
    
    url = URI("https://demo.mifinity.com/api/accounts/HbQDvaIwhweH6BW0FF_uSdL__FEJ7QCkw8KCfOJVNP0=/threshold")
    
    http = Net::HTTP.new(url.host, url.port)
    http.use_ssl = true
    http.verify_mode = OpenSSL::SSL::VERIFY_NONE
    
    request = Net::HTTP::Put.new(url)
    request["accept"] = 'application/json'
    request["content-type"] = 'application/json'
    request["x-api-version"] = '1'
    request["key"] = 'sQO8Q3i5-HeD7F0BqVSIN1p......qnjqMDo8Bl0GKUTvexaVm5n7g'
    request.body = "{\n        \"notificationThresholdAmount\" : 10 \n}"
    
    response = http.request(request)
    puts response.read_body
    
    import http.client
    
    conn = http.client.HTTPSConnection("demo.mifinity.com")
    payload = "{\n        \"notificationThresholdAmount\" : 10 \n}"
    
    headers = {
        'accept': "application/json",
        'content-type': "application/json",
        'x-api-version': "1",
        'key': "sQO8Q3i5-HeD7F0BqVSIN1p......qnjqMDo8Bl0GKUTvexaVm5n7g"
        }
    
    conn.request("PUT", "/api/accounts/HbQDvaIwhweH6BW0FF_uSdL__FEJ7QCkw8KCfOJVNP0=/threshold", payload, headers)
    
    res = conn.getresponse()
    data = res.read()
    
    print(data.decode("utf-8"))
    
    curl -X PUT \
      https://demo.mifinity.com/api/accounts/HbQDvaIwhweH6BW0FF_uSdL__FEJ7QCkw8KCfOJVNP0=/threshold \
      -H 'accept: application/json' \
      -H 'key: sQO8Q3i5-HeD7F0BqVSIN1p......qnjqMDo8Bl0GKUTvexaVm5n7g' \
      -H 'content-type: application/json' \
      -H 'x-api-version: 1' \
      -d '{"notificationThresholdAmount" : 10}'
    
    var data = JSON.stringify({
      "notificationThresholdAmount": 10
    });
    
    var xhr = new XMLHttpRequest();
    xhr.withCredentials = true;
    
    xhr.addEventListener("readystatechange", function () {
      if (this.readyState === 4) {
        console.log(this.responseText);
      }
    });
    
    xhr.open("PUT", "https://demo.mifinity.com/api/accounts/HbQDvaIwhweH6BW0FF_uSdL__FEJ7QCkw8KCfOJVNP0=/threshold");
    xhr.setRequestHeader("accept", "application/json");
    xhr.setRequestHeader("content-type", "application/json");
    xhr.setRequestHeader("x-api-version", "1");
    xhr.setRequestHeader("key", "sQO8Q3i5-HeD7F0BqVSIN1p......qnjqMDo8Bl0GKUTvexaVm5n7g");
    xhr.send(data); 
    
    <?php
    
    $request = new HttpRequest();
    $request->setUrl('https://demo.mifinity.com/api/accounts/HbQDvaIwhweH6BW0FF_uSdL__FEJ7QCkw8KCfOJVNP0=/threshold');
    $request->setMethod(HTTP_METH_PUT);
    
    $request->setHeaders(array(
      'key' => 'sQO8Q3i5-HeD7F0BqVSIN1p......qnjqMDo8Bl0GKUTvexaVm5n7g',
      'x-api-version' => '1',
      'content-type' => 'application/json',
      'accept' => 'application/json'
    ));
    
    $request->setBody('{
           "notificationThresholdAmount": 10
    }');
    
    try {
      $response = $request->send();
    
      echo $response->getBody();
    } catch (HttpException $ex) {
      echo $ex;
    }
    ?>
    

    HTTP Request

    PUT https://demo.mifinity.com/api/accounts/{accountId}/threshold

    Header

    Parameter Type Description
    Content-Type String Use value 'application/json'
    Accept String Use value 'application/json'
    x-api-version String Use value 1
    Key String API key

    Parameters

    Field Type Required Description
    EntityId String Unique entity id
    notificationThresholdAmount BigDecimal the value of threshold amount

    Successful response

    {
        "payload": [
            {
                "accountNumber": "50010001000015",
                "accountDescription": "teff",
                "balance": {
                    "amount": 0,
                    "currency": "EUR",
                    "presentationAmount": "EUR0.00"
                },
                "availableBalance": {
                    "amount": 0,
                    "currency": "EUR",
                    "presentationAmount": "EUR0.00"
                },
                "displayInfo": "50010001000015-teff [ 0.00 EUR ]",
                "accountHolderId": "Q_dr37VojL1shDZwSvQe1KVUhV19nDaRwqzdbw1EHsI=",
                "accountType": "PLATFORM",
                "notificationThresholdAmount": 10,
                "accountCategory": "GAMING",
                "createdOn": "2018-09-12T12:28:31.241Z",
                "isDefault": false,
                "entityId": "lyUneEZqJSMF3lqvHIrJoQvDdXk-DrG6hPLgQGaa52c="
            }
        ]
    }
    

    Successful response

    Field Type Description
    accountNumber String The unique account number
    accountDescription String Description of the account
    balance Object Complex object containing amount, currency and persentationAmount
    avaiableBalance Object Complex object containing amount, currency and persentationAmount
    displayInfo String Display information
    accountHolderId String Unique account holder Id
    accountType String the type of account
    notificationThresholdAmount int changed into new value
    createdOn String Date and time token generation timestamp
    accountCategory String Account category. Values: GAMING, TRAVEL, E_COMMERCE, REMITTANCE
    isDefault boolean default is false
    entityId String Unique entity id

    Change Users Password

    An API call used to change a platform user password. Using the userId which is generated in first steps. There will be two results generated. One is that password has changed successfully, which has no any payload shown. Another one is bad request, which means that password only is changed one time per day.

    require 'uri'
    require 'net/http'
    
    url = URI("https://demo.mifinity.com/api/users/PJ71Bz9hI3SKv3Q5YBQTqUrO5fKtSDs0PzQ8MrmdlFo=/password")
    
    http = Net::HTTP.new(url.host, url.port)
    http.use_ssl = true
    http.verify_mode = OpenSSL::SSL::VERIFY_NONE
    
    request = Net::HTTP::Put.new(url)
    request["accept"] = 'application/json'
    request["content-type"] = 'application/json'
    request["x-api-version"] = '1'
    request["key"] = 'sQO8Q3i5-HeD7F0BqVSIN1p......qnjqMDo8Bl0GKUTvexaVm5n7g'
    request.body = "{\n        \"newPassword\" : \"NeW_Pa$$w0rD\", \n        \"oldPassword\" : \"Pa$$w0rD\"  \n}"
    
    response = http.request(request)
    puts response.read_body
    
    import http.client
    
    conn = http.client.HTTPSConnection("demo.mifinity.com")
    payload = "{\n        \"newPassword\" : \"NeW_Pa$$w0rD\", \n        \"oldPassword\" : \"Pa$$w0rD\"  \n}"
    
    headers = {
        'accept': "application/json",
        'content-type': "application/json",
        'x-api-version': "1",
        'key': "sQO8Q3i5-HeD7F0BqVSIN1p......qnjqMDo8Bl0GKUTvexaVm5n7g"
        }
    
    conn.request("PUT", "/api/users/PJ71Bz9hI3SKv3Q5YBQTqUrO5fKtSDs0PzQ8MrmdlFo=/password", payload, headers)
    
    res = conn.getresponse()
    data = res.read()
    
    print(data.decode("utf-8"))
    
    curl -X PUT \
      https://demo.mifinity.com/api/users/PJ71Bz9hI3SKv3Q5YBQTqUrO5fKtSDs0PzQ8MrmdlFo=/password \
      -H 'accept: application/json' \
      -H 'key: sQO8Q3i5-HeD7F0BqVSIN1p......qnjqMDo8Bl0GKUTvexaVm5n7g' \
      -H 'content-type: application/json' \
      -H 'x-api-version: 1' \
      -d '{"newPassword":"NeW_Pa$$w0rD",
            "oldPassword":"Pa$$w0rD"
            }'
    
    var data = JSON.stringify({
      "newPassword":"NeW_Pa$$w0rD",
      "oldPassword":"Pa$$w0rD"
    });
    
    var xhr = new XMLHttpRequest();
    xhr.withCredentials = true;
    
    xhr.addEventListener("readystatechange", function () {
      if (this.readyState === 4) {
        console.log(this.responseText);
      }
    });
    
    xhr.open("PUT", "https://demo.mifinity.com/api/users/PJ71Bz9hI3SKv3Q5YBQTqUrO5fKtSDs0PzQ8MrmdlFo=/password");
    xhr.setRequestHeader("accept", "application/json");
    xhr.setRequestHeader("content-type", "application/json");
    xhr.setRequestHeader("x-api-version", "1");
    xhr.setRequestHeader("key", "sQO8Q3i5-HeD7F0BqVSIN1p......qnjqMDo8Bl0GKUTvexaVm5n7g");
    xhr.send(data); 
    
    <?php
    $request = new HttpRequest();
    $request->setUrl('https://demo.mifinity.com/api/users/PJ71Bz9hI3SKv3Q5YBQTqUrO5fKtSDs0PzQ8MrmdlFo=/password');
    $request->setMethod(HTTP_METH_PUT);
    
    $request->setHeaders(array(
      'key' => 'sQO8Q3i5-HeD7F0BqVSIN1p......qnjqMDo8Bl0GKUTvexaVm5n7g',
      'x-api-version' => '1',
      'content-type' => 'application/json',
      'accept' => 'application/json'
    ));
    
    $request->setBody('{
           "newPassword":"NeW_Pa$$w0rD",
           "oldPassword":"Pa$$w0rD"
    }');
    
    try {
      $response = $request->send();
    
      echo $response->getBody();
    } catch (HttpException $ex) {
      echo $ex;
    }
    ?>
    

    HTTP Request

    PUT https://demo.mifinity.com/api/users/{userId}/password

    Header

    Parameter Type Description
    Content-Type String Use value 'application/json'
    Accept String Use value 'application/json'
    x-api-version String Use value 1
    Key String API key

    Parameters

    Field Type Required Description
    userId String Unique entity id
    newPassword String optional the new password for the platform
    oldPassword String optional the old password for the platform

    Successful response

    {
        "payload": []
    }
    
    {
        "errors": [
            {
                "type": "VALIDATION_FIELD",
                "errorCode": "VALIDATION",
                "message": "You can change your password only once per day.",
                "formObjectName": "form",
                "field": "newPassword"
            }
        ]
    }
    

    Successful Response

    There are two responses. First one is that user password has been changed successfully. So, there is nothing to return. Second one is to dedicate that user cannot change password more than one time per day.

    Create New Subaccount

    This call is used to create a new account under an existing membership.

    require 'uri'
    require 'net/http'
    
    url = URI("https://demo.mifinity.com/api/account-holders/c50fzSfbhsLvmtcx9zTgkDwvjg8ZxOi2LUWHvcGkVc0=/accounts")
    
    http = Net::HTTP.new(url.host, url.port)
    http.use_ssl = true
    http.verify_mode = OpenSSL::SSL::VERIFY_NONE
    
    request = Net::HTTP::Post.new(url)
    request["accept"] = 'application/json'
    request["content-type"] = 'application/json'
    request["x-api-version"] = '1'
    request["key"] = 'sQO8Q3i5-HeD7F0BqVSIN1p......qnjqMDo8Bl0GKUTvexaVm5n7g'
    request.body = "{\n        \"accountDescription\":\"Account Description\",\n        \"currency\":\"EUR\"\n}"
    
    response = http.request(request)
    puts response.read_body
    
    import http.client
    
    conn = http.client.HTTPSConnection("demo.mifinity.com")
    
    payload = "{\n        \"accountDescription\":\"Account Description\",\n        \"currency\":\"EUR\"\n}"
    
    headers = {
        'accept': "application/json",
        'content-type': "application/json",
        'x-api-version': "1",
        'key': "sQO8Q3i5-HeD7F0BqVSIN1p......qnjqMDo8Bl0GKUTvexaVm5n7g"
        }
    
    conn.request("POST", "/api/account-holders/c50fzSfbhsLvmtcx9zTgkDwvjg8ZxOi2LUWHvcGkVc0=/accounts", payload, headers)
    
    res = conn.getresponse()
    data = res.read()
    print(data.decode("utf-8"))
    
    curl -X POST \
      https://demo.mifinity.com/api/account-holders/c50fzSfbhsLvmtcx9zTgkDwvjg8ZxOi2LUWHvcGkVc0=/accounts \
      -H 'accept: application/json' \
      -H 'key: sQO8Q3i5-HeD7F0BqVSIN1p......qnjqMDo8Bl0GKUTvexaVm5n7g' \
      -H 'content-type: application/json' \
      -H 'x-api-version: 1' \
      -d '{
            "accountDescription":"Account Description",
            "currency":"EUR"
    }'
    
    var data = JSON.stringify({
      "accountDescription":"Account Description",
            "currency":"EUR"
    });
    
    var xhr = new XMLHttpRequest();
    xhr.withCredentials = true;
    
    xhr.addEventListener("readystatechange", function () {
      if (this.readyState === 4) {
        console.log(this.responseText);
      }
    });
    
    xhr.open("POST", "https://demo.mifinity.com/api/account-holders/c50fzSfbhsLvmtcx9zTgkDwvjg8ZxOi2LUWHvcGkVc0=/accounts");
    xhr.setRequestHeader("accept", "application/json");
    xhr.setRequestHeader("content-type", "application/json");
    xhr.setRequestHeader("x-api-version", "1");
    xhr.setRequestHeader("key", "sQO8Q3i5-HeD7F0BqVSIN1p......qnjqMDo8Bl0GKUTvexaVm5n7g");
    xhr.send(data); 
    
    <?php
    
    $request = new HttpRequest();
    $request->setUrl('https://demo.mifinity.com/api/account-holders/c50fzSfbhsLvmtcx9zTgkDwvjg8ZxOi2LUWHvcGkVc0=/accounts');
    $request->setMethod(HTTP_METH_POST);
    
    $request->setHeaders(array(
      'key' => 'sQO8Q3i5-HeD7F0BqVSIN1p......qnjqMDo8Bl0GKUTvexaVm5n7g',
      'x-api-version' => '1',
      'content-type' => 'application/json',
      'accept' => 'application/json'
    ));
    
    $request->setBody('{
            "accountDescription":"Account Description",
            "currency":"EUR"
    }');
    
    try {
      $response = $request->send();
    
      echo $response->getBody();
    } catch (HttpException $ex) {
      echo $ex;
    }
    ?>
    

    HTTP Request

    POST https://demo.mifinity.com/api/account-holders/{accountHolderId}/accounts

    Header

    Parameter Type Description
    Content-Type String Use value 'application/json'
    Accept String Use value 'application/json'
    x-api-version String Use value 1
    Key String API key

    Parameters

    Field Type Required Description
    accountHolderId String Unique account holder id (Path Variable)
    accountDescription String Account description
    currency String Account currency
    notificationThresholdAmount BigDecimal optional
    accountCategory String optional category including GAMING,TRAVLE,E_COMMERCE and REMITTANCE

    Successful response

    {
         "payload": [
            {
                "accountNumber": "50010001000056",
                "accountDescription": "Account Description",
                "balance": {
                    "amount": 0,
                    "currency": "EUR",
                    "presentationAmount": "EUR0.00"
                },
                "availableBalance": {
                    "amount": 0,
                    "currency": "EUR",
                    "presentationAmount": "EUR0.00"
                },
                "displayInfo": "50010001000056-Account Description [ 0.00 EUR ]",
                "accountHolderId": "npw1_GaJ4MxLPfZvk8EWOvkXX03Zc01SyGJlwEw3Z_o=",
                "accountType": "PLATFORM",
                "notificationThresholdAmount": 0,
                "accountCategory": "GAMING",
                "createdOn": "2018-09-18T13:41:51.934Z",
                "isDefault": false,
                "entityId": "dbUMjHccVQm-YS0m2U-AvAqbnRiFyGUTg111fZheWho="
            }
        ]
    }
    

    Successful response

    Field Type Description
    accountNumber String The unique account number
    accountDescription String Description of the account
    balance Object Complex object containing amount, currency and persentationAmount
    avaiableBalance Object Complex object containing amount, currency and persentationAmount
    displayInfo String Display information
    accountHolderId String Unique account holder Id
    accountType String the type of account
    notificationThresholdAmount int changed into new value
    createdOn String Date and time token generation timestamp
    accountCategory String Account category. Values: GAMING, TRAVEL, E_COMMERCE, REMITTANCE
    isDefault boolean default is false
    entityId String Unique entity id

    Disable Monetary Account

    Disabling a particular account

    require 'uri'
    require 'net/http'
    
    url = URI("https://demo.mifinity.com/api/accounts/HbQDvaIwhweH6BW0FF_uSdL__FEJ7QCkw8KCfOJVNP0=")
    
    http = Net::HTTP.new(url.host, url.port)
    http.use_ssl = true
    http.verify_mode = OpenSSL::SSL::VERIFY_NONE
    
    request = Net::HTTP::Delete.new(url)
    request["accept"] = 'application/json'
    request["content-type"] = 'application/json'
    request["x-api-version"] = '1'
    request["key"] = 'sQO8Q3i5-HeD7F0BqVSIN1p......qnjqMDo8Bl0GKUTvexaVm5n7g'
    
    response = http.request(request)
    puts response.read_body
    
    import http.client
    
    conn = http.client.HTTPSConnection("demo.mifinity.com")
    
    headers = {
        'accept': "application/json",
        'content-type': "application/json",
        'x-api-version': "1",
        'key': "sQO8Q3i5-HeD7F0BqVSIN1p......qnjqMDo8Bl0GKUTvexaVm5n7g"
        }
    
    conn.request("DELETE", "/api/accounts/HbQDvaIwhweH6BW0FF_uSdL__FEJ7QCkw8KCfOJVNP0=", payload, headers)
    
    res = conn.getresponse()
    data = res.read()
    
    print(data.decode("utf-8"))
    
    curl -X DELETE \
      https://demo.mifinity.com/api/accounts/HbQDvaIwhweH6BW0FF_uSdL__FEJ7QCkw8KCfOJVNP0= \
      -H 'accept: application/json' \
      -H 'key: sQO8Q3i5-HeD7F0BqVSIN1p......qnjqMDo8Bl0GKUTvexaVm5n7g' \
      -H 'content-type: application/json' \
      -H 'x-api-version: 1' \
    
    
    
    <?php
    
    $request = new HttpRequest();
    $request->setUrl('https://demo.mifinity.com/api/accounts/HbQDvaIwhweH6BW0FF_uSdL__FEJ7QCkw8KCfOJVNP0=');
    $request->setMethod(HTTP_METH_DELETE);
    
    $request->setHeaders(array(
      'key' => 'sQO8Q3i5-HeD7F0BqVSIN1p......qnjqMDo8Bl0GKUTvexaVm5n7g',
      'x-api-version' => '1',
      'content-type' => 'application/json',
      'accept' => 'application/json'
    ));
    
    try {
      $response = $request->send();
    
      echo $response->getBody();
    } catch (HttpException $ex) {
      echo $ex;
    }
    ?>
    

    HTTP Request

    DELETE https://demo.mifinity.com/api/accounts/{accountId}

    Header

    Parameter Type Description
    Content-Type String Use value 'application/json'
    Accept String Use value 'application/json'
    x-api-version String Use value 1
    Key String API key

    Parameters

    Field Type Required Description
    accountId String (Path Variable) Unique entityid

    Error - response

    {
       "payload": []
    }
    

    Successful Response

    HTTP 200K. It means that the account has been deleted successfully.

    Get Account Details

    API call used to get account details for a specific account. Using the entityId that generated by previous steps.

    require 'uri'
    require 'net/http'
    
    url = URI("https://demo.mifinity.com/api/accounts/dbUMjHccVQm-YS0m2U-AvAqbnRiFyGUTg111fZheWho=")
    
    http = Net::HTTP.new(url.host, url.port)
    http.use_ssl = true
    http.verify_mode = OpenSSL::SSL::VERIFY_NONE
    
    request = Net::HTTP::Get.new(url)
    request["accept"] = 'application/json'
    request["content-type"] = 'application/json'
    request["x-api-version"] = '1'
    request["key"] = 'sQO8Q3i5-HeD7F0BqVSIN1p......qnjqMDo8Bl0GKUTvexaVm5n7g'
    
    response = http.request(request)
    puts response.read_body
    
    import http.client
    
    conn = http.client.HTTPSConnection("demo.mifinity.com")
    
    
    headers = {
        'accept': "application/json",
        'content-type': "application/json",
        'x-api-version': "1",
        'key': "sQO8Q3i5-HeD7F0BqVSIN1p......qnjqMDo8Bl0GKUTvexaVm5n7g"
        }
    
    conn.request("GET", "/api/accounts/dbUMjHccVQm-YS0m2U-AvAqbnRiFyGUTg111fZheWho=", headers)
    
    res = conn.getresponse()
    data = res.read()
    print(data.decode("utf-8"))
    
    curl -X GET \
      https://demo.mifinity.com/api/accounts/dbUMjHccVQm-YS0m2U-AvAqbnRiFyGUTg111fZheWho= \
      -H 'accept: application/json' \
      -H 'key: sQO8Q3i5-HeD7F0BqVSIN1p......qnjqMDo8Bl0GKUTvexaVm5n7g' \
      -H 'content-type: application/json' \
      -H 'x-api-version: 1' \
    
    
    
    
    <?php
    $request = new HttpRequest();
    $request->setUrl('https://demo.mifinity.com/api/accounts/dbUMjHccVQm-YS0m2U-AvAqbnRiFyGUTg111fZheWho=');
    $request->setMethod(HTTP_METH_GET);
    
    $request->setHeaders(array(
      'key' => 'sQO8Q3i5-HeD7F0BqVSIN1p......qnjqMDo8Bl0GKUTvexaVm5n7g',
      'x-api-version' => '1',
      'content-type' => 'application/json',
      'accept' => 'application/json'
    ));
    
    
    try {
      $response = $request->send();
    
      echo $response->getBody();
    } catch (HttpException $ex) {
      echo $ex;
    }
    ?>
    

    HTTP Request

    GET https://demo.mifinity.com/api/accounts/{accountId}

    Header

    Parameter Type Description
    Content-Type String Use value 'application/json'
    Accept String Use value 'application/json'
    x-api-version String Use value 1
    Key String API key

    Parameters

    Field Type Required Description
    accountId String (Path Variable) Unique accountId

    Successful response

    {
         "payload": [
            {
                "accountNumber": "50010001000056",
                "accountDescription": "Account Description",
                "balance": {
                    "amount": 0,
                    "currency": "EUR",
                    "presentationAmount": "EUR0.00"
                },
                "availableBalance": {
                    "amount": 0,
                    "currency": "EUR",
                    "presentationAmount": "EUR0.00"
                },
                "displayInfo": "50010001000056-Account Description [ 0.00 EUR ]",
                "accountHolderId": "-y9hAHGi37AAcYcZMLgXoYoCAyLpv7RzMURfLesNuQ4=",
                "accountType": "PLATFORM",
                "notificationThresholdAmount": 0,
                "accountCategory": "GAMING",
                "createdOn": "2018-09-18T13:41:51.934Z",
                "isDefault": false,
                "entityId": "XEO_sznjmzGEPtTL7Bk0t_LqSgdt_UvzgQYMRRwV704="
            }
        ]
    }
    

    Successful response

    Field Type Description
    accountNumber String The unique account number
    accountDescription String Description of the account
    balance Object Complex object containing amount, currency and persentationAmount
    avaiableBalance Object Complex object containing amount, currency and persentationAmount
    displayInfo String Display information
    accountHolderId String Unique account holder Id
    accountType String the type of account
    notificationThresholdAmount int
    createdOn String Date and time token generation timestamp
    accountCategory String Account category. Values: GAMING, TRAVEL, E_COMMERCE, REMITTANCE
    isDefault boolean default is false
    entityId String Unique entity id

    Reset an Account Password

    - Step 1 (initiate)

    Request for password reset token. By default token will be sent to account holder email address. Use provided reset token to get security questions that should be answered to reset the password. Sent security question answers and new password. If answers are correct, new password will be set. If one or more answer is wrong, error message will be returned.

    require 'uri'
    require 'net/http'
    
    url = URI("https://demo.mifinity.com/api/users/password/reset/begin-process")
    
    http = Net::HTTP.new(url.host, url.port)
    http.use_ssl = true
    http.verify_mode = OpenSSL::SSL::VERIFY_NONE
    
    request = Net::HTTP::Post.new(url)
    request["accept"] = 'application/json'
    request["content-type"] = 'application/json'
    request["x-api-version"] = '1'
    request["key"] = 'sQO8Q3i5-HeD7F0BqVSIN1p......qnjqMDo8Bl0GKUTvexaVm5n7g'
    request.body = "{\n        \"identifier\":\"LSkywalker\"\n}"
    
    response = http.request(request)
    puts response.read_body
    
    import http.client
    
    conn = http.client.HTTPSConnection("demo.mifinity.com")
    
    payload = "{\n        \"identifier\":\"LSkywalker\"\n}"
    
    headers = {
        'accept': "application/json",
        'content-type': "application/json",
        'x-api-version': "1",
        'key': "sQO8Q3i5-HeD7F0BqVSIN1p......qnjqMDo8Bl0GKUTvexaVm5n7g"
        }
    
    conn.request("POST", "/api/users/password/reset/begin-process", payload, headers)
    
    res = conn.getresponse()
    data = res.read()
    
    print(data.decode("utf-8"))
    
    curl -X POST \
      https://demo.mifinity.com/api/users/password/reset/begin-process \
      -H 'accept: application/json' \
      -H 'key: sQO8Q3i5-HeD7F0BqVSIN1p......qnjqMDo8Bl0GKUTvexaVm5n7g' \
      -H 'content-type: application/json' \
      -H 'x-api-version: 1' \
      -d '{
            "identifier":"LSkywalker"
    }'
    
    var data = JSON.stringify({
            "identifier":"LSkywalker"
    });
    
    var xhr = new XMLHttpRequest();
    xhr.withCredentials = true;
    
    xhr.addEventListener("readystatechange", function () {
      if (this.readyState === 4) {
        console.log(this.responseText);
      }
    });
    
    xhr.open("POST", "https://demo.mifinity.com/api/users/password/reset/begin-process");
    xhr.setRequestHeader("accept", "application/json");
    xhr.setRequestHeader("content-type", "application/json");
    xhr.setRequestHeader("x-api-version", "1");
    xhr.setRequestHeader("key", "sQO8Q3i5-HeD7F0BqVSIN1p......qnjqMDo8Bl0GKUTvexaVm5n7g");
    xhr.send(data); 
    
    <?php
    
    $request = new HttpRequest();
    $request->setUrl('https://demo.mifinity.com/api/users/password/reset/begin-process');
    $request->setMethod(HTTP_METH_POST);
    
    $request->setHeaders(array(
      'key' => 'sQO8Q3i5-HeD7F0BqVSIN1p......qnjqMDo8Bl0GKUTvexaVm5n7g',
      'x-api-version' => '1',
      'content-type' => 'application/json',
      'accept' => 'application/json'
    ));
    
    $request->setBody('{
            "identifier":"LSkywalker"
    }');
    
    try {
      $response = $request->send();
    
      echo $response->getBody();
    } catch (HttpException $ex) {
      echo $ex;
    }
    ?>
    

    HTTP Request

    POST https://demo.mifinity.com/api/users/password/reset/begin-process

    Header

    Parameter Type Description
    Content-Type String Use value 'application/json'
    Accept String Use value 'application/json'
    x-api-version String Use value 1
    Key String API key

    Parameters

    Field Type Required Description
    identifier String platform userName

    Successful response

    {
         "payload": []
    }
    

    Successful Response

    There is a reset password link to be sent to the email address, which contains token.

    - Step 2 (Gather Security Questions)

    If the token is correct, this call will get security questions that have to be answered to authenticate user and proceed with setting new password.

    Using the token that is sent to email address

    require 'uri'
    require 'net/http'
    
    url = URI("https://demo.mifinity.com/api/users/password/reset/security-questions/e80ede94-a99c-475d-91c1-517b7f159baf")
    
    http = Net::HTTP.new(url.host, url.port)
    http.use_ssl = true
    http.verify_mode = OpenSSL::SSL::VERIFY_NONE
    
    request = Net::HTTP::Get.new(url)
    request["accept"] = 'application/json'
    request["content-type"] = 'application/json'
    request["x-api-version"] = '1'
    request["key"] = 'sQO8Q3i5-HeD7F0BqVSIN1p......qnjqMDo8Bl0GKUTvexaVm5n7g'
    
    response = http.request(request)
    puts response.read_body
    
    import http.client
    
    conn = http.client.HTTPSConnection("demo.mifinity.com")
    
    
    headers = {
        'accept': "application/json",
        'content-type': "application/json",
        'x-api-version': "1",
        'key': "sQO8Q3i5-HeD7F0BqVSIN1p......qnjqMDo8Bl0GKUTvexaVm5n7g"
        }
    
    conn.request("GET", "/api/users/password/reset/security-questions/e80ede94-a99c-475d-91c1-517b7f159baf", headers)
    
    res = conn.getresponse()
    data = res.read()
    
    print(data.decode("utf-8"))
    
    curl -X GET \
      https://demo.mifinity.com/api/users/password/reset/security-questions/e80ede94-a99c-475d-91c1-517b7f159baf \
      -H 'accept: application/json' \
      -H 'key: sQO8Q3i5-HeD7F0BqVSIN1p......qnjqMDo8Bl0GKUTvexaVm5n7g' \
      -H 'content-type: application/json' \
      -H 'x-api-version: 1' \
    
    
    
    
    <?php
    
    $request = new HttpRequest();
    $request->setUrl('https://demo.mifinity.com/api/users/password/reset/security-questions/e80ede94-a99c-475d-91c1-517b7f159baf');
    $request->setMethod(HTTP_METH_GET);
    
    $request->setHeaders(array(
      'key' => 'sQO8Q3i5-HeD7F0BqVSIN1p......qnjqMDo8Bl0GKUTvexaVm5n7g',
      'x-api-version' => '1',
      'content-type' => 'application/json',
      'accept' => 'application/json'
    ));
    
    
    try {
      $response = $request->send();
    
      echo $response->getBody();
    } catch (HttpException $ex) {
      echo $ex;
    }
    ?>
    

    HTTP Request

    GET https://demo.mifinity.com/api/users/password/reset/security-questions/{token}

    Header

    Parameter Type Description
    Content-Type String Use value 'application/json'
    Accept String Use value 'application/json'
    x-api-version String Use value 1
    Key String API key

    Parameters

    Field Type Required Description
    token String Token is a random generated alphanumeric string defined by the system in step 1 (Path Variable)

    Successful response

    {
         "payload": [
            {
                "questionDefinitionId": "RYDOQmGj6EHD-Y8NrfnXlWJJVLNr2vcZCZskT0cRLiE=",
                "questionText": "What was the name of your first pet?",
                "languageCode": "en",
                "disabled": false
            },
            {
                "questionDefinitionId": "Iny03nhY9BmLauekZQA281X_RwUgCwJ7rPbqMck1gi4=",
                "questionText": "In what city or town was your first job?",
                "languageCode": "en",
                "disabled": false
            }
        ]
    }
    

    Successful response

    Field Type Description
    questionDefinitionId String Unique Id that maps to the selected question
    questionText String Contains the relevant question
    languageCode String code of language
    questionNumber Integer Question number (Order number)
    disabled Boolean defines whether the question is enabled or disabled

    - Step 3 (Answer Security Questions)

    Using token that generated in step 1 and newPassword for paramater to reset a new password.

    require 'uri'
    require 'net/http'
    
    url = URI("https://demo.mifinity.com/api/users/password/reset/")
    
    http = Net::HTTP.new(url.host, url.port)
    http.use_ssl = true
    http.verify_mode = OpenSSL::SSL::VERIFY_NONE
    
    request = Net::HTTP::Post.new(url)
    request["accept"] = 'application/json'
    request["content-type"] = 'application/json'
    request["x-api-version"] = '1'
    request["key"] = 'sQO8Q3i5-HeD7F0BqVSIN1p......qnjqMDo8Bl0GKUTvexaVm5n7g'
    request.body = "{\n        \"newPassword\":\"new$$password\", \n        \"token\":\"e80ede94-a99c-475d-91c1-517b7f159baf\",\n       
     \"securityQuestionAnswers\" : [{\"questionDefinitionId\":\"RYDOQmGj6EHD-Y8NrfnXlWJJVLNr2vcZCZskT0cRLiE=\", \"answer\":\"dog\"},{\"questionDefinitionId\":\"Iny03nhY9BmLauekZQA281X_RwUgCwJ7rPbqMck1gi4=\", \"answer\":\"dublin\"}] \n}"
    
    response = http.request(request)
    puts response.read_body
    
    import http.client
    
    conn = http.client.HTTPSConnection("demo.mifinity.com")
    
    payload = "{\n        \"newPassword\":\"new$$password\", \n        \"token\":\"e80ede94-a99c-475d-91c1-517b7f159baf\",\n       \"securityQuestionAnswers\" : [{\"questionDefinitionId\":\"RYDOQmGj6EHD-Y8NrfnXlWJJVLNr2vcZCZskT0cRLiE=\", \"answer\":\"dog\"},{\"questionDefinitionId\":\"Iny03nhY9BmLauekZQA281X_RwUgCwJ7rPbqMck1gi4=\", \"answer\":\"dublin\"}] \n}"
    
    headers = {
        'accept': "application/json",
        'content-type': "application/json",
        'x-api-version': "1",
        'key': "sQO8Q3i5-HeD7F0BqVSIN1p......qnjqMDo8Bl0GKUTvexaVm5n7g"
        }
    
    conn.request("POST", "/api/users/password/reset/", payload, headers)
    
    res = conn.getresponse()
    data = res.read()
    
    print(data.decode("utf-8"))
    
    curl -X POST \
      https://demo.mifinity.com/api/users/password/reset/ \
      -H 'accept: application/json' \
      -H 'key: sQO8Q3i5-HeD7F0BqVSIN1p......qnjqMDo8Bl0GKUTvexaVm5n7g' \
      -H 'content-type: application/json' \
      -H 'x-api-version: 1' \
      -d '{
           "newPassword":"new$$password", 
           "token":"e80ede94-a99c-475d-91c1-517b7f159baf",
           "securityQuestionAnswers": [
            {
                "questionDefinitionId": "RYDOQmGj6EHD-Y8NrfnXlWJJVLNr2vcZCZskT0cRLiE=",
                "answer": "dog",
            },
            {
                "questionDefinitionId": "Iny03nhY9BmLauekZQA281X_RwUgCwJ7rPbqMck1gi4=",
                "answer": "dublin",
            }
        ]
    }'
    
    var data = JSON.stringify({
            "newPassword":"new$$password", 
           "token":"e80ede94-a99c-475d-91c1-517b7f159baf",
           "securityQuestionAnswers": [
            {
                "questionDefinitionId": "RYDOQmGj6EHD-Y8NrfnXlWJJVLNr2vcZCZskT0cRLiE=",
                "answer": "dog",
            },
            {
                "questionDefinitionId": "Iny03nhY9BmLauekZQA281X_RwUgCwJ7rPbqMck1gi4=",
                "answer": "dublin",
            }
        ]
    });
    
    var xhr = new XMLHttpRequest();
    xhr.withCredentials = true;
    
    xhr.addEventListener("readystatechange", function () {
      if (this.readyState === 4) {
        console.log(this.responseText);
      }
    });
    
    xhr.open("POST", "https://demo.mifinity.com/api/users/password/reset/");
    xhr.setRequestHeader("accept", "application/json");
    xhr.setRequestHeader("content-type", "application/json");
    xhr.setRequestHeader("x-api-version", "1");
    xhr.setRequestHeader("key", "sQO8Q3i5-HeD7F0BqVSIN1p......qnjqMDo8Bl0GKUTvexaVm5n7g");
    xhr.send(data); 
    
    <?php
    
    $request = new HttpRequest();
    $request->setUrl('https://demo.mifinity.com/api/users/password/reset/');
    $request->setMethod(HTTP_METH_POST);
    
    $request->setHeaders(array(
      'key' => 'sQO8Q3i5-HeD7F0BqVSIN1p......qnjqMDo8Bl0GKUTvexaVm5n7g',
      'x-api-version' => '1',
      'content-type' => 'application/json',
      'accept' => 'application/json'
    ));
    
    $request->setBody('{
           "newPassword":"new$$password", 
           "token":"e80ede94-a99c-475d-91c1-517b7f159baf",
           "securityQuestionAnswers": [
            {
                "questionDefinitionId": "RYDOQmGj6EHD-Y8NrfnXlWJJVLNr2vcZCZskT0cRLiE=",
                "answer": "dog",
            },
            {
                "questionDefinitionId": "Iny03nhY9BmLauekZQA281X_RwUgCwJ7rPbqMck1gi4=",
                "answer": "dublin",
            }
        ]
    }');
    
    try {
      $response = $request->send();
    
      echo $response->getBody();
    } catch (HttpException $ex) {
      echo $ex;
    }
    ?>
    

    HTTP Request

    POST https://demo.mifinity.com/api/users/password/reset/

    Header

    Parameter Type Description
    Content-Type String Use value 'application/json'
    Accept String Use value 'application/json'
    x-api-version String Use value 1
    Key String API key

    Parameters

    Field Type Required Description
    newPassword String New password to be used
    token String Change password generated token (generated in step 1)
    securityQuestionAnswers List optional List of API Security Questions

    SecurityQuestion

    Field Type Required Description
    questionDefinitionId String Unique Id that maps to the selected question
    answer String
    questionText String optional Contains the relevant question
    languageCode String optional code of language
    questionNumber Integer optional Question number (Order number)
    disabled Boolean optional defines whether the question is enabled or disabled

    Successful response

    {
         "payload": []
    }
    

    Successful response

    HTTP 200K. It means that new password is changed successfully.

    Save Security Question

    Saving security question for a particular user.

    require 'uri'
    require 'net/http'
    
    url = URI("https://demo.mifinity.com/api/users/PJ71Bz9hI3SKv3Q5YBQTqUrO5fKtSDs0PzQ8MrmdlFo=/security-questions")
    
    http = Net::HTTP.new(url.host, url.port)
    http.use_ssl = true
    http.verify_mode = OpenSSL::SSL::VERIFY_NONE
    
    request = Net::HTTP::Put.new(url)
    request["accept"] = 'application/json'
    request["content-type"] = 'application/json'
    request["x-api-version"] = '1'
    request["key"] = 'sQO8Q3i5-HeD7F0BqVSIN1p......qnjqMDo8Bl0GKUTvexaVm5n7g'
    request.body = "{\n        \"newPassword\":\"new$$password\", \n       
     \"securityQuestionAnswers\" : [{\"questionDefinitionId\":\"RYDOQmGj6EHD-Y8NrfnXlWJJVLNr2vcZCZskT0cRLiE=\", \"answer\":\"dog\"},{\"questionDefinitionId\":\"Iny03nhY9BmLauekZQA281X_RwUgCwJ7rPbqMck1gi4=\", \"answer\":\"dublin\"}] \n}"
    
    response = http.request(request)
    puts response.read_body
    
    import http.client
    
    conn = http.client.HTTPSConnection("demo.mifinity.com")
    
    payload = "{\n        \"newPassword\":\"new$$password\", \n       \"securityQuestionAnswers\" : [{\"questionDefinitionId\":\"RYDOQmGj6EHD-Y8NrfnXlWJJVLNr2vcZCZskT0cRLiE=\", \"answer\":\"dog\"},{\"questionDefinitionId\":\"Iny03nhY9BmLauekZQA281X_RwUgCwJ7rPbqMck1gi4=\", \"answer\":\"dublin\"}] \n}"
    
    headers = {
        'accept': "application/json",
        'content-type': "application/json",
        'x-api-version': "1",
        'key': "sQO8Q3i5-HeD7F0BqVSIN1p......qnjqMDo8Bl0GKUTvexaVm5n7g"
        }
    
    conn.request("PUT", "/api/users/PJ71Bz9hI3SKv3Q5YBQTqUrO5fKtSDs0PzQ8MrmdlFo=/security-questions", payload, headers)
    
    res = conn.getresponse()
    data = res.read()
    
    print(data.decode("utf-8"))
    
    curl -X PUT \
      https://demo.mifinity.com/api/users/PJ71Bz9hI3SKv3Q5YBQTqUrO5fKtSDs0PzQ8MrmdlFo=/security-questions\
      -H 'accept: application/json' \
      -H 'key: sQO8Q3i5-HeD7F0BqVSIN1p......qnjqMDo8Bl0GKUTvexaVm5n7g' \
      -H 'content-type: application/json' \
      -H 'x-api-version: 1' \
      -d '{
           "newPassword":"new$$password", 
           "securityQuestionAnswers": [
            {
                "questionDefinitionId": "RYDOQmGj6EHD-Y8NrfnXlWJJVLNr2vcZCZskT0cRLiE=",
                "answer": "dog",
            },
            {
                "questionDefinitionId": "Iny03nhY9BmLauekZQA281X_RwUgCwJ7rPbqMck1gi4=",
                "answer": "dublin",
            }
        ]
    }'
    
    var data = JSON.stringify({
            "newPassword":"new$$password", 
           "securityQuestionAnswers": [
            {
                "questionDefinitionId": "RYDOQmGj6EHD-Y8NrfnXlWJJVLNr2vcZCZskT0cRLiE=",
                "answer": "dog",
            },
            {
                "questionDefinitionId": "Iny03nhY9BmLauekZQA281X_RwUgCwJ7rPbqMck1gi4=",
                "answer": "dublin",
            }
        ]
    });
    
    var xhr = new XMLHttpRequest();
    xhr.withCredentials = true;
    
    xhr.addEventListener("readystatechange", function () {
      if (this.readyState === 4) {
        console.log(this.responseText);
      }
    });
    
    xhr.open("PUT", "https://demo.mifinity.com/api/users/PJ71Bz9hI3SKv3Q5YBQTqUrO5fKtSDs0PzQ8MrmdlFo=/security-questions");
    xhr.setRequestHeader("accept", "application/json");
    xhr.setRequestHeader("content-type", "application/json");
    xhr.setRequestHeader("x-api-version", "1");
    xhr.setRequestHeader("key", "sQO8Q3i5-HeD7F0BqVSIN1p......qnjqMDo8Bl0GKUTvexaVm5n7g");
    xhr.send(data); 
    
    <?php
    
    $request = new HttpRequest();
    $request->setUrl('https://demo.mifinity.com/api/users/PJ71Bz9hI3SKv3Q5YBQTqUrO5fKtSDs0PzQ8MrmdlFo=/security-questions');
    $request->setMethod(HTTP_METH_PUT);
    
    $request->setHeaders(array(
      'key' => 'sQO8Q3i5-HeD7F0BqVSIN1p......qnjqMDo8Bl0GKUTvexaVm5n7g',
      'x-api-version' => '1',
      'content-type' => 'application/json',
      'accept' => 'application/json'
    ));
    
    $request->setBody('{
           "newPassword":"new$$password", 
           "securityQuestionAnswers": [
            {
                "questionDefinitionId": "RYDOQmGj6EHD-Y8NrfnXlWJJVLNr2vcZCZskT0cRLiE=",
                "answer": "dog",
            },
            {
                "questionDefinitionId": "Iny03nhY9BmLauekZQA281X_RwUgCwJ7rPbqMck1gi4=",
                "answer": "dublin",
            }
        ]
    }');
    
    try {
      $response = $request->send();
    
      echo $response->getBody();
    } catch (HttpException $ex) {
      echo $ex;
    }
    ?>
    

    HTTP Request

    PUT https://demo.mifinity.com/api/users/{userId}/security-questions

    Header

    Parameter Type Description
    Content-Type String Use value 'application/json'
    Accept String Use value 'application/json'
    x-api-version String Use value 1
    Key String API key

    Parameters

    Field Type Required Description
    password String The account password
    userId String Unique userId representing the user to save the question
    securityQuestionAnswers List optional List of API Security Questions. Size range:minimum of 2 characters and up to 2 characters.

    SecurityQuestion

    Field Type Required Description
    questionDefinitionId String Unique Id that maps to the selected question
    answer String the answer of security question

    Successful response

    {
         "payload": [
    
        ]
    }
    

    Successful response

    HTTP 200K. It means that security questions are saved successfully.

    Update Account Description

    Updating an eWallet Account friendly name (description). Using the unique entityId generated before and new account description for parameter.

    require 'uri'
    require 'net/http'
    
    url = URI("https://demo.mifinity.com/api/accounts/HbQDvaIwhweH6BW0FF_uSdL__FEJ7QCkw8KCfOJVNP0=")
    
    http = Net::HTTP.new(url.host, url.port)
    http.use_ssl = true
    http.verify_mode = OpenSSL::SSL::VERIFY_NONE
    
    request = Net::HTTP::Put.new(url)
    request["accept"] = 'application/json'
    request["content-type"] = 'application/json'
    request["x-api-version"] = '1'
    request["key"] = 'sQO8Q3i5-HeD7F0BqVSIN1p......qnjqMDo8Bl0GKUTvexaVm5n7g'
    request.body = "{\n        \"accountDescription\":\"specific account for Travel Europe\"\n}"
    
    response = http.request(request)
    puts response.read_body
    
    import http.client
    
    conn = http.client.HTTPSConnection("demo.mifinity.com")
    
    payload = "{\n        \"accountDescription\":\"specific account for Travel Europe\"\n}"
    
    headers = {
        'accept': "application/json",
        'content-type': "application/json",
        'x-api-version': "1",
        'key': "sQO8Q3i5-HeD7F0BqVSIN1p......qnjqMDo8Bl0GKUTvexaVm5n7g"
        }
    
    conn.request("PUT", "/api/accounts/HbQDvaIwhweH6BW0FF_uSdL__FEJ7QCkw8KCfOJVNP0=", payload, headers)
    
    res = conn.getresponse()
    data = res.read()
    
    print(data.decode("utf-8"))
    
    curl -X PUT \
      https://demo.mifinity.com/api/accounts/HbQDvaIwhweH6BW0FF_uSdL__FEJ7QCkw8KCfOJVNP0= \
      -H 'accept: application/json' \
      -H 'key: sQO8Q3i5-HeD7F0BqVSIN1p......qnjqMDo8Bl0GKUTvexaVm5n7g' \
      -H 'content-type: application/json' \
      -H 'x-api-version: 1' \
       -d '{
            "accountDescription":"specific account for Travel Europe"
    }'
    
    var data = JSON.stringify({
           "accountDescription":"specific account for Travel Europe"
    });
    
    var xhr = new XMLHttpRequest();
    xhr.withCredentials = true;
    
    xhr.addEventListener("readystatechange", function () {
      if (this.readyState === 4) {
        console.log(this.responseText);
      }
    });
    
    xhr.open("PUT", "https://demo.mifinity.com/api/accounts/HbQDvaIwhweH6BW0FF_uSdL__FEJ7QCkw8KCfOJVNP0=");
    xhr.setRequestHeader("accept", "application/json");
    xhr.setRequestHeader("content-type", "application/json");
    xhr.setRequestHeader("x-api-version", "1");
    xhr.setRequestHeader("key", "sQO8Q3i5-HeD7F0BqVSIN1p......qnjqMDo8Bl0GKUTvexaVm5n7g");
    xhr.send(data); 
    
    <?php
    
    $request = new HttpRequest();
    $request->setUrl('https://demo.mifinity.com/api/accounts/HbQDvaIwhweH6BW0FF_uSdL__FEJ7QCkw8KCfOJVNP0=');
    $request->setMethod(HTTP_METH_PUT);
    
    $request->setHeaders(array(
      'key' => 'sQO8Q3i5-HeD7F0BqVSIN1p......qnjqMDo8Bl0GKUTvexaVm5n7g',
      'x-api-version' => '1',
      'content-type' => 'application/json',
      'accept' => 'application/json'
    ));
    $request->setBody('{
            "accountDescription":"specific account for Travel Europe"
    }');
    
    try {
      $response = $request->send();
    
      echo $response->getBody();
    } catch (HttpException $ex) {
      echo $ex;
    }
    ?>
    

    HTTP Request

    PUT https://demo.mifinity.com/api/accounts/{accountId}

    Header

    Parameter Type Description
    Content-Type String Use value 'application/json'
    Accept String Use value 'application/json'
    x-api-version String Use value 1
    Key String API key

    Parameters

    Field Type Required Description
    accountDescription String The new description for the account

    Successful response

    {
         "payload": [
           {
                "accountNumber": "50010001000007",
                "accountDescription": "specific account for Travel Europe",
                "balance": {
                    "amount": 118,
                    "currency": "EUR",
                    "presentationAmount": "EUR118.00"
                },
                "availableBalance": {
                    "amount": 118,
                    "currency": "EUR",
                    "presentationAmount": "EUR118.00"
                },
                "displayInfo": "50010001000007-specific account for Travel Europe [ 118.00 EUR ]",
                "accountHolderId": "VaEKpgpPl5eNJs4RKv9BuFmICfDpgX1-OQfv2CWqX78=",
                "accountType": "PLATFORM",
                "notificationThresholdAmount": 0,
                "accountCategory": "GAMING",
                "isDefault": true,
                "entityId": "NPZMGY7K2rRIjyGpoOgbKhu2GCc7bB4u1NUQI4-m3K4="
            }
    
        ]
    }
    

    Successful response

    Field Type Description
    accountNumber String The unique account number
    accountDescription String New Description of the account
    balance Object Complex object containing amount, currency and persentationAmount
    avaiableBalance Object Complex object containing amount, currency and persentationAmount
    displayInfo String Display information
    accountHolderId String Unique account holder Id
    accountType String the type of account
    notificationThresholdAmount int changed into new value
    accountCategory String Account category. Values: GAMING, TRAVEL, E_COMMERCE, REMITTANCE
    isDefault boolean default is false
    entityId String Unique entity id

    Update Email Address

    - Step 1 (Get Token)

    Fist step is to request an new email address. A token will be emailed to the new eamil address.

    require 'uri'
    require 'net/http'
    
    url = URI("https://demo.mifinity.com/api/users/PJ71Bz9hI3SKv3Q5YBQTqUrO5fKtSDs0PzQ8MrmdlFo=/email/change/begin-process")
    
    http = Net::HTTP.new(url.host, url.port)
    http.use_ssl = true
    http.verify_mode = OpenSSL::SSL::VERIFY_NONE
    
    request = Net::HTTP::Post.new(url)
    request["accept"] = 'application/json'
    request["content-type"] = 'application/json'
    request["x-api-version"] = '1'
    request["key"] = 'sQO8Q3i5-HeD7F0BqVSIN1p......qnjqMDo8Bl0GKUTvexaVm5n7g'
    request.body = "{\n        \"password\" : \"Pa$$w0rD\", \n        \"newEmail\" : \"LSkywalker@gmail.com\"  \n}"
    
    response = http.request(request)
    puts response.read_body
    
    import http.client
    
    conn = http.client.HTTPSConnection("demo.mifinity.com")
    
    payload = "{\n        \"password\" : \"Pa$$w0rD\", \n        \"newEmail\" : \"LSkywalker@gmail.com\"  \n}"
    
    headers = {
        'accept': "application/json",
        'content-type': "application/json",
        'x-api-version': "1",
        'key': "sQO8Q3i5-HeD7F0BqVSIN1p......qnjqMDo8Bl0GKUTvexaVm5n7g"
        }
    
    conn.request("POST", "/api/users/PJ71Bz9hI3SKv3Q5YBQTqUrO5fKtSDs0PzQ8MrmdlFo=/email/change/begin-process", payload, headers)
    
    res = conn.getresponse()
    data = res.read()
    
    print(data.decode("utf-8"))
    
    curl -X POST \
      https://demo.mifinity.com/api/users/PJ71Bz9hI3SKv3Q5YBQTqUrO5fKtSDs0PzQ8MrmdlFo=/email/change/begin-process \
      -H 'accept: application/json' \
      -H 'key: sQO8Q3i5-HeD7F0BqVSIN1p......qnjqMDo8Bl0GKUTvexaVm5n7g' \
      -H 'content-type: application/json' \
      -H 'x-api-version: 1' \
      -d '{"password":"Pa$$w0rD",
            "newEmail":"LSkywalker@gmail.com"
            }'
    
    var data = JSON.stringify({
           "password":"Pa$$w0rD",
            "newEmail":"LSkywalker@gmail.com"
    });
    
    var xhr = new XMLHttpRequest();
    xhr.withCredentials = true;
    
    xhr.addEventListener("readystatechange", function () {
      if (this.readyState === 4) {
        console.log(this.responseText);
      }
    });
    
    xhr.open("POST", "https://demo.mifinity.com/api/users/PJ71Bz9hI3SKv3Q5YBQTqUrO5fKtSDs0PzQ8MrmdlFo=/email/change/begin-process");
    xhr.setRequestHeader("accept", "application/json");
    xhr.setRequestHeader("content-type", "application/json");
    xhr.setRequestHeader("x-api-version", "1");
    xhr.setRequestHeader("key", "sQO8Q3i5-HeD7F0BqVSIN1p......qnjqMDo8Bl0GKUTvexaVm5n7g");
    xhr.send(data); 
    
    <?php
    
    $request = new HttpRequest();
    $request->setUrl('https://demo.mifinity.com/api/users/PJ71Bz9hI3SKv3Q5YBQTqUrO5fKtSDs0PzQ8MrmdlFo=/email/change/begin-process');
    $request->setMethod(HTTP_METH_POST);
    
    $request->setHeaders(array(
      'key' => 'sQO8Q3i5-HeD7F0BqVSIN1p......qnjqMDo8Bl0GKUTvexaVm5n7g',
      'x-api-version' => '1',
      'content-type' => 'application/json',
      'accept' => 'application/json'
    ));
    
    $request->setBody('{
            "password":"Pa$$w0rD",
            "newEmail":"LSkywalker@gmail.com"
    }');
    
    try {
      $response = $request->send();
    
      echo $response->getBody();
    } catch (HttpException $ex) {
      echo $ex;
    }
    ?>
    

    HTTP Request

    POST https://demo.mifinity.com/api/users/{userId}/email/change/begin-process

    Header

    Parameter Type Description
    Content-Type String Use value 'application/json'
    Accept String Use value 'application/json'
    x-api-version String Use value 1
    Key String API key

    Parameters

    Field Type Required Description
    password String The password for the account
    newEmail String The new required email address

    Successful response

    {
         "payload": []
    }
    

    Successful response

    HTTP 200K. It means that the token has been sent to the new email address.

    - Step 2 (Confirmation)

    Second step is to receive the token to confirm the email change.

    require 'uri'
    require 'net/http'
    
    url = URI("https://demo.mifinity.com/api/users/email/change/confirmation")
    
    http = Net::HTTP.new(url.host, url.port)
    http.use_ssl = true
    http.verify_mode = OpenSSL::SSL::VERIFY_NONE
    
    request = Net::HTTP::Post.new(url)
    request["accept"] = 'application/json'
    request["content-type"] = 'application/json'
    request["x-api-version"] = '1'
    request["key"] = 'sQO8Q3i5-HeD7F0BqVSIN1p......qnjqMDo8Bl0GKUTvexaVm5n7g'
    request.body = "{\n        \"tokenValue\" : \"ttobQnnk5foJyHK4_C4gt9R7j-9FxxHTtYvk_fsOLy...K9_DTUvbFsM=\"  \n}"
    
    response = http.request(request)
    puts response.read_body
    
    import http.client
    
    conn = http.client.HTTPSConnection("demo.mifinity.com")
    
    payload = "{\n        \"tokenValue\" : \"ttobQnnk5foJyHK4_C4gt9R7j-9FxxHTtYvk_fsOLy...K9_DTUvbFsM=\"  \n}"
    
    headers = {
        'accept': "application/json",
        'content-type': "application/json",
        'x-api-version': "1",
        'key': "sQO8Q3i5-HeD7F0BqVSIN1p......qnjqMDo8Bl0GKUTvexaVm5n7g"
        }
    
    conn.request("POST", "/api/users/email/change/confirmation", payload, headers)
    
    res = conn.getresponse()
    data = res.read()
    
    print(data.decode("utf-8"))
    
    curl -X POST \
      https://demo.mifinity.com/api/users/email/change/confirmation \
      -H 'accept: application/json' \
      -H 'key: sQO8Q3i5-HeD7F0BqVSIN1p......qnjqMDo8Bl0GKUTvexaVm5n7g' \
      -H 'content-type: application/json' \
      -H 'x-api-version: 1' \
      -d '{
            "tokenValue":"ttobQnnk5foJyHK4_C4gt9R7j-9FxxHTtYvk_fsOLy...K9_DTUvbFsM="
            }'
    
    var data = JSON.stringify({
            "tokenValue":"ttobQnnk5foJyHK4_C4gt9R7j-9FxxHTtYvk_fsOLy...K9_DTUvbFsM="
    });
    
    var xhr = new XMLHttpRequest();
    xhr.withCredentials = true;
    
    xhr.addEventListener("readystatechange", function () {
      if (this.readyState === 4) {
        console.log(this.responseText);
      }
    });
    
    xhr.open("POST", "https://demo.mifinity.com/api/users/email/change/confirmation");
    xhr.setRequestHeader("accept", "application/json");
    xhr.setRequestHeader("content-type", "application/json");
    xhr.setRequestHeader("x-api-version", "1");
    xhr.setRequestHeader("key", "sQO8Q3i5-HeD7F0BqVSIN1p......qnjqMDo8Bl0GKUTvexaVm5n7g");
    xhr.send(data); 
    
    <?php
    
    $request = new HttpRequest();
    $request->setUrl('https://demo.mifinity.com/api/users/email/change/confirmation');
    $request->setMethod(HTTP_METH_POST);
    
    $request->setHeaders(array(
      'key' => 'sQO8Q3i5-HeD7F0BqVSIN1p......qnjqMDo8Bl0GKUTvexaVm5n7g',
      'x-api-version' => '1',
      'content-type' => 'application/json',
      'accept' => 'application/json'
    ));
    
    $request->setBody('{
            "tokenValue":"ttobQnnk5foJyHK4_C4gt9R7j-9FxxHTtYvk_fsOLy...K9_DTUvbFsM="
    }');
    
    try {
      $response = $request->send();
    
      echo $response->getBody();
    } catch (HttpException $ex) {
      echo $ex;
    }
    ?>
    

    HTTP Request

    POST https://demo.mifinity.com/api/users/email/change/confirmation

    Header

    Parameter Type Description
    Content-Type String Use value 'application/json'
    Accept String Use value 'application/json'
    x-api-version String Use value 1
    Key String API key

    Parameters

    Field Type Required Description
    tokenValue String Token value

    Successful response

    {
         "payload": []
    }
    

    Successful response

    HTTP 200K. It means that the new email address for the user account has been changed successfully.

    Lookup API Calls

    Currency Lookup

    Return all available currrencies.

    To return available currencies, use this code:

    require 'uri'
    require 'net/http'
    
    url = URI("https://demo.mifinity.com/api/currencies")
    
    http = Net::HTTP.new(url.host, url.port)
    http.use_ssl = true
    http.verify_mode = OpenSSL::SSL::VERIFY_NONE
    
    request = Net::HTTP::Get.new(url)
    request["accept"] = 'application/json'
    request["content-type"] = 'application/json'
    request["x-api-version"] = '1'
    request["key"] = 'sQO8Q3i5-HeD7F0BqVSIN1p......qnjqMDo8Bl0GKUTvexaVm5n7g',
    
    response = http.request(request)
    puts response.read_body
    
    import http.client
    
    conn = http.client.HTTPSConnection("demo.mifinitypay.com")
    
    headers = {
        'accept': "application/json",
        'content-type': "application/json",
        'x-api-version': "1",
        'key': "sQO8Q3i5-HeD7F0BqVSIN1p......qnjqMDo8Bl0GKUTvexaVm5n7g",
        }
    
    conn.request("GET", "/api/currencies",  headers)
    
    res = conn.getresponse()
    data = res.read()
    
    print(data.decode("utf-8"))
    
    # With shell, you can just pass the correct header with each request
    curl -X GET \
      https://demo.mifinity.com/api/currencies \
      -H 'accept: application/json' \
      -H 'key: sQO8Q3i5-HeD7F0BqVSIN1p......qnjqMDo8Bl0GKUTvexaVm5n7g' \
      -H 'content-type: application/json' \
      -H 'x-api-version: 1' \
    
    
    var data = "grant_type=client_credentials";
    
    var xhr = new XMLHttpRequest();
    xhr.withCredentials = true;
    
    xhr.addEventListener("readystatechange", function () {
      if (this.readyState === 4) {
        console.log(this.responseText);
      }
    });
    
    xhr.open("GET", "https://demo.mifinity.com/api/currencies");
    xhr.setRequestHeader("accept", "application/json");
    xhr.setRequestHeader("content-type", "application/json");
    xhr.setRequestHeader("x-api-version", "1");
    xhr.setRequestHeader("key", "sQO8Q3i5-HeD7F0BqVSIN1p......qnjqMDo8Bl0GKUTvexaVm5n7g");
    xhr.send(data);
    
    <?php
    
    $request = new HttpRequest();
    $request->setUrl('https://demo.mifinity.com/api/currencies');
    $request->setMethod(HTTP_METH_GET);
    
    $request->setHeaders(array(
      'key' => 'sQO8Q3i5-HeD7F0BqVSIN1p......qnjqMDo8Bl0GKUTvexaVm5n7g',
      'x-api-version' => '1',
      'content-type' => 'application/json',
      'accept' => 'application/json'
    ));
    
    try {
      $response = $request->send();
    
      echo $response->getBody();
    } catch (HttpException $ex) {
      echo $ex;
    }
    ?>
    

    HTTP Request

    GET https://demo.mifinity.com/api/currencies

    Parameter Type Description
    Content-Type String Use value 'application/json'
    Accept String Use value 'application/json'
    x-api-version String Use value 1
    Key String API key

    Successful response

    {
          "payload": [
            {
                "currencyCode": "EUR",
                "displayName": "Euro",
                "fractionDigits": 2
            },
            {
                "currencyCode": "CZK",
                "displayName": "Czech Republic Koruna",
                "fractionDigits": 2
            },
            {
                "currencyCode": "SEK",
                "displayName": "Swedish Krona",
                "fractionDigits": 2
            }
        ]
    }
    

    Successful response

    Field Type Description
    currencyCode String The code for currency
    displayName String The currency name
    fractionDigits Integer

    Get Bank Field Descriptions

    Returns bank details fields dictionary.

    To return bank details field descriptions, use this code:

    require 'uri'
    require 'net/http'
    
    url = URI("https://demo.mifinity.com/api/dictionaries/bank-details-fields")
    
    http = Net::HTTP.new(url.host, url.port)
    http.use_ssl = true
    http.verify_mode = OpenSSL::SSL::VERIFY_NONE
    
    request = Net::HTTP::Get.new(url)
    request["accept"] = 'application/json'
    request["content-type"] = 'application/json'
    request["x-api-version"] = '1'
    request["key"] = 'sQO8Q3i5-HeD7F0BqVSIN1p......qnjqMDo8Bl0GKUTvexaVm5n7g,
    
    response = http.request(request)
    puts response.read_body
    
    import http.client
    
    conn = http.client.HTTPSConnection("demo.mifinitypay.com")
    
    headers = {
        'accept': "application/json",
        'content-type': "application/json",
        'x-api-version': "1",
        'key': "sQO8Q3i5-HeD7F0BqVSIN1p......qnjqMDo8Bl0GKUTvexaVm5n7g",
        }
    
    conn.request("GET", "/api/dictionaries/bank-details-fields",  headers)
    
    res = conn.getresponse()
    data = res.read()
    
    print(data.decode("utf-8"))
    
    # With shell, you can just pass the correct header with each request
    curl -X GET \
      https://demo.mifinity.com/api/dictionaries/bank-details-fields \
      -H 'accept: application/json' \
      -H 'key: sQO8Q3i5-HeD7F0BqVSIN1p......qnjqMDo8Bl0GKUTvexaVm5n7g \
      -H 'content-type: application/json' \
      -H 'x-api-version: 1' \
    
    
    
    var xhr = new XMLHttpRequest();
    xhr.withCredentials = true;
    
    xhr.addEventListener("readystatechange", function () {
      if (this.readyState === 4) {
        console.log(this.responseText);
      }
    });
    
    xhr.open("GET", "https://demo.mifinity.com/api/dictionaries/bank-details-fields");
    xhr.setRequestHeader("accept", "application/json");
    xhr.setRequestHeader("content-type", "application/json");
    xhr.setRequestHeader("x-api-version", "1");
    xhr.setRequestHeader("key", "sQO8Q3i5-HeD7F0BqVSIN1p......qnjqMDo8Bl0GKUTvexaVm5n7g");
    
    <?php
    
    $request = new HttpRequest();
    $request->setUrl('https://demo.mifinity.com/api/dictionaries/bank-details-fields');
    $request->setMethod(HTTP_METH_GET);
    
    $request->setHeaders(array(
      'key' => 'sQO8Q3i5-HeD7F0BqVSIN1p......qnjqMDo8Bl0GKUTvexaVm5n7g',
      'x-api-version' => '1',
      'content-type' => 'application/json',
      'accept' => 'application/json'
    ));
    
    try {
      $response = $request->send();
    
      echo $response->getBody();
    } catch (HttpException $ex) {
      echo $ex;
    }
    ?>
    

    HTTP Request

    GET https://demo.mifinity.com/api/dictionaries/bank-details-fields

    Header

    Parameter Type Description
    Content-Type String Use value 'application/json'
    Accept String Use value 'application/json'
    x-api-version String Use value 1
    Key String API key

    Successful response

    {
         "payload" : [
        {
      "code" : "BANK_NAME",
      "name" : "Bank Name"
    }
      ]
    }
    

    Successful response

    Field Type Description
    code String Represent Enum Key
    name String Represent Enum value

    Parse IBAN Number

    Validates input IBAN number and returns bank details if IBAN is valid.

    require 'uri'
    require 'net/http'
    
    url = URI("https://demo.mifinity.com/api/validate/iban/NL75RABO0315142490")
    
    http = Net::HTTP.new(url.host, url.port)
    http.use_ssl = true
    http.verify_mode = OpenSSL::SSL::VERIFY_NONE
    
    request = Net::HTTP::Get.new(url)
    request["accept"] = 'application/json'
    request["content-type"] = 'application/json'
    request["x-api-version"] = '1'
    request["key"] = 'sQO8Q3i5-HeD7F0BqVSIN1p......qnjqMDo8Bl0GKUTvexaVm5n7g'
    request.body = "{\n        \"iban\":\"NL75RABO0315142490\"\n}"
    
    response = http.request(request)
    puts response.read_body
    
    import http.client
    
    conn = http.client.HTTPSConnection("demo.mifinity.com")
    
    payload = "{\n        \"iban\":\"NL75RABO0315142490\"\n}"
    
    headers = {
        'accept': "application/json",
        'content-type': "application/json",
        'x-api-version': "1",
        'key': "sQO8Q3i5-HeD7F0BqVSIN1p......qnjqMDo8Bl0GKUTvexaVm5n7g"
        }
    
    conn.request("GET", "/api/validate/iban/NL75RABO0315142490", payload, headers)
    
    res = conn.getresponse()
    data = res.read()
    
    print(data.decode("utf-8"))
    
    curl -X GET \
      https://demo.mifinity.com/api/validate/iban/NL75RABO0315142490 \
      -H 'accept: application/json' \
      -H 'key: sQO8Q3i5-HeD7F0BqVSIN1p......qnjqMDo8Bl0GKUTvexaVm5n7g \
      -H 'content-type: application/json' \
      -H 'x-api-version: 1' \
      -d '{
            "iban":"NL75RABO0315142490"
    }'
    
    var data = JSON.stringify({
            "iban":"NL75RABO0315142490"
    });
    
    var xhr = new XMLHttpRequest();
    xhr.withCredentials = true;
    
    xhr.addEventListener("readystatechange", function () {
      if (this.readyState === 4) {
        console.log(this.responseText);
      }
    });
    
    xhr.open("GET", "https://demo.mifinity.com/api/validate/iban/NL75RABO0315142490");
    xhr.setRequestHeader("accept", "application/json");
    xhr.setRequestHeader("content-type", "application/json");
    xhr.setRequestHeader("x-api-version", "1");
    xhr.setRequestHeader("key", "sQO8Q3i5-HeD7F0BqVSIN1p......qnjqMDo8Bl0GKUTvexaVm5n7g");
    xhr.send(data); 
    
    <?php
    
    $request = new HttpRequest();
    $request->setUrl('https://demo.mifinity.com/api/validate/iban/NL75RABO0315142490');
    $request->setMethod(HTTP_METH_GET);
    
    $request->setHeaders(array(
      'key' => 'sQO8Q3i5-HeD7F0BqVSIN1p......qnjqMDo8Bl0GKUTvexaVm5n7g',
      'x-api-version' => '1',
      'content-type' => 'application/json',
      'accept' => 'application/json'
    ));
    
    $request->setBody('{
            "iban":"NL75RABO0315142490"
    }');
    
    try {
      $response = $request->send();
    
      echo $response->getBody();
    } catch (HttpException $ex) {
      echo $ex;
    }
    ?>
    

    HTTP Request

    GET https://demo.mifinity.com/api/validate/iban/{iban}

    Header

    Parameter Type Description
    Content-Type String Use value 'application/json'
    Accept String Use value 'application/json'
    x-api-version String Use value 1
    Key String API key

    Parameters

    Field Type Description
    iban String (Path Variable) it's an additional number that contains extra information to help overseas banks identify your account for payments

    Successful response

    {
         "payload" : [
        {
      "iban" : "NL75RABO0315142490",
      "bankName" : "Bank Name",
      "country" : {
        "iso2" : "IE",
        "name" : "Ireland"
      },
      "city" : "San Gwann",
      "address" : "Head Office, Digital Hub, Ind. Est. LS3, LifeScience Park, , San Gwann",
      "swift" : "APAPSMT",
      "valid" : true
    }
      ]
    }
    

    Successful response

    Field Type Description
    iban String IBAN number.Size range: minimum of 34 characters and up to 34 characters.
    bankName String Bank Name
    country String Complex object containing country code: iso2 and country name
    city String Bank city
    address String Bank Address
    swift String Bank Swift Code
    valid boolean If Bank is valid or not

    Transactional API Calls

    Account to Account Transfer

    An API used to complete an account to account transcation. This API will throw a 401 error code if TOTP (aka Two Factor Auth) is enabled on the logged in user until the request is sent with a security-code header containing a valid value.

    To transfer account to account, use this code

    require 'uri'
    require 'net/http'
    
    url = URI("https://demo.mifinity.com/api/payments/acct2acct")
    
    http = Net::HTTP.new(url.host, url.port)
    http.use_ssl = true
    http.verify_mode = OpenSSL::SSL::VERIFY_NONE
    
    request = Net::HTTP::Post.new(url)
    request["accept"] = 'application/json'
    request["content-type"] = 'application/json'
    request["x-api-version"] = '1'
    request["key"] = 'sQO8Q3i5-HeD7F0BqVSIN1p......qnjqMDo8Bl0GKUTvexaVm5n7g'
    request.body = "{\n        \"money\" : {\"amount\":10, \"currency\":\"EUR\"},\n        \"sourceAccount\" : \"5001000001080652\",\n        \"destinationAccount\" : \"5001000001100815\",\n        \"description\" : \"10 EUR ACC2ACC\",\n        \"traceId\" : \"zeihwhp-43gs8iwyf7v4h5f\"\n}"
    
    response = http.request(request)
    puts response.read_body
    
    
    import requests
    
    url = "https://demo.mifinity.com/api/payments/acct2acct"
    
    payload = "{\n        \"money\" : {\"amount\":10, \"currency\":\"EUR\"},\n        \"sourceAccount\" : \"5001000001080652\",\n        \"destinationAccount\" : \"5001000001100815\",\n        \"description\" : \"10 EUR ACC2ACC\",\n        \"traceId\" : \"zeihwhp-43gs8iwyf7v4h5f\"\n}"
    headers = {
        'accept': "application/json",
        'content-type': "application/json",
        'x-api-version': "1",
        'key': "sQO8Q3i5-HeD7F0BqVSIN1p......qnjqMDo8Bl0GKUTvexaVm5n7g"
        }
    
    response = requests.request("POST", url, data=payload, headers=headers)
    
    print(response.text)
    
    curl -X POST \
      https://demo.mifinity.com/api/payments/acct2acct \
      -H 'accept: application/json' \
      -H 'content-type: application/json' \
      -H 'key: sQO8Q3i5-HeD7F0BqVSIN1p......qnjqMDo8Bl0GKUTvexaVm5n7g' \
      -H 'x-api-version: 1' \
      -d '{
            "money" : {"amount":10, "currency":"EUR"},
            "sourceAccount" : "5001000001080652",
            "destinationAccount" : "5001000001100815",
            "description" : "10 EUR ACC2ACC",
            "traceId" : "zeihwhp-43gs8iwyf7v4h5f"
    }'
    
    var data = JSON.stringify({
      "money": {
        "amount": 10,
        "currency": "EUR"
      },
      "sourceAccount": "5001000001080652",
      "destinationAccount": "5001000001100815",
      "description": "10 EUR ACC2ACC",
      "traceId": "zeihwhp-43gs8iwyf7v4h5f"
    });
    
    var xhr = new XMLHttpRequest();
    xhr.withCredentials = true;
    
    xhr.addEventListener("readystatechange", function () {
      if (this.readyState === 4) {
        console.log(this.responseText);
      }
    });
    
    xhr.open("POST", "https://demo.mifinity.com/api/payments/acct2acct");
    xhr.setRequestHeader("accept", "application/json");
    xhr.setRequestHeader("content-type", "application/json");
    xhr.setRequestHeader("x-api-version", "1");
    xhr.setRequestHeader("key", "sQO8Q3i5-HeD7F0BqVSIN1p......qnjqMDo8Bl0GKUTvexaVm5n7g");
    xhr.send(data);
    
    
    <?php
    
    $request = new HttpRequest();
    $request->setUrl('https://demo.mifinity.com/api/payments/acct2acct');
    $request->setMethod(HTTP_METH_POST);
    
    $request->setHeaders(array(
      'key' => 'sQO8Q3i5-HeD7F0BqVSIN1p......qnjqMDo8Bl0GKUTvexaVm5n7g',
      'x-api-version' => '1',
      'content-type' => 'application/json',
      'accept' => 'application/json'
    ));
    
    $request->setBody('{
            "money" : {"amount":10, "currency":"EUR"},
            "sourceAccount" : "5001000001080652",
            "destinationAccount" : "5001000001100815",
            "description" : "10 EUR ACC2ACC",
            "traceId" : "zeihwhp-43gs8iwyf7v4h5f"
    }');
    
    try {
      $response = $request->send();
    
      echo $response->getBody();
    } catch (HttpException $ex) {
      echo $ex;
    }
    ?>
    

    To perform an account to account transfer (eWallet), please use the example below replacing key and sourceAccount with the values you have from the previous steps.

    This feature is intended to transfer money to any MiFinity account. For test purposes, login into the MiFinity portal in Demo and create an account. Use the number of this newly created account as the destinationAccount.

    HTTP Request

    POST https://demo.mifinity.com/api/payments/acct2acct

    Parameter Type Description
    Content-Type String Use value 'application/json'
    Accept String Use value 'application/json'
    x-api-version String Use value 1
    Key String API key

    Parameters

    Field Type Required Description
    sourceAccount String Account number from which the amount of money will be debited
    destinationAccount String optional Account number to receive the credit
    amount Number Transaction value
    currency String Currency code (ISO 4217)
    description String optional Any description you want to assign to this operation
    traceId String Unique transaction identifier. You can assign any value
    accountPayeeId String optional Unique account Id (Path Variable)
    paymentCategoryType String optional ApiPaymentCategory is an enum,which containing GAMING_PAYOUT/REMITTANCE/REFUND/PAYROLL/EXPENSES/E_COMMERCE/TRAVEL/NOT_SET

    Successful response

    {
      "payload": [
            {
                "transactionId": "N4t0bf5GxqVL0WoyypbNXgnB7TE5NpbMuV8Z0wVPGXY=",
                "transactionReference": "69f6c395-ef54-4140-8a63-a1f869150f81",
                "traceId": "R3f3r3n)E",
                "datePosted": "2018-09-21T10:15:58.189Z",
                "sourceMoney": {
                    "amount": 10,
                    "currency": "EUR",
                    "displayable": "EUR20.00"
                },
                "destinationMoney": {
                    "amount": 10,
                    "currency": "EUR",
                    "displayable": "EUR20.00"
                },
                "exchangeRate": 1,
                "totalFees": {
                    "amount": 0,
                    "currency": "EUR",
                    "displayable": "EUR0.00"
                }
            }
        ]
    }
    

    Successful response

    Field Type Description
    transactionId EntityId Encrypted identifier of the transaction
    transactionReference String Transaction unique reference
    traceId String Identifier that has been passed to the request will be returned
    datePosted DateTime The date/time that the transaction posted.
    sourceMoney Object Complex object containing: amount(Number), currency(String) and displayable (String)
    destinationeMoney Object Complex object containing: amount(Number), currency(String) and displayable (String)
    exchangeRate Integer
    totalFee Object Complex object containing: amount(Number), currency(String) and displayable (String)

    Get Transaction Details

    API Call used to search relevant transaction of a particular account, additonal filters include data range.

    To get transaction detail, use this code:

    require 'uri'
    require 'net/http'
    
    url = URI("https://demo.mifinity.com/api/accounts/7FjySjwTibCU3puJcqkYMMZDeN4hdGnuWOREvIR8WZ0=/entries")
    
    http = Net::HTTP.new(url.host, url.port)
    http.use_ssl = true
    http.verify_mode = OpenSSL::SSL::VERIFY_NONE
    
    request = Net::HTTP::Get.new(url)
    request["accept"] = 'application/json'
    request["content-type"] = 'application/json'
    request["x-api-version"] = '1'
    request["key"] = 'sQO8Q3i5-HeD7F0BqVSIN1p......qnjqMDo8Bl0GKUTvexaVm5n7g',
    request.body = "{\n        \"fromdate\":\"2018-09-20T17:37:46.185Z\", \n        \"todate\":\"2018-09-21T10:37:46.185Z\" \n}"
    
    response = http.request(request)
    puts response.read_body
    
    import http.client
    
    conn = http.client.HTTPSConnection("demo.mifinitypay.com")
    
    payload ="{\n        \"fromdate\":\"2018-09-20T17:37:46.185Z\", \n        \"todate\":\"2018-09-21T10:37:46.185Z\" \n}"
    headers = {
        'accept': "application/json",
        'content-type': "application/json",
        'x-api-version': "1",
        'key': "sQO8Q3i5-HeD7F0BqVSIN1p......qnjqMDo8Bl0GKUTvexaVm5n7g",
        }
    
    conn.request("GET", "/api/accounts/7FjySjwTibCU3puJcqkYMMZDeN4hdGnuWOREvIR8WZ0=/entries", payload, headers)
    
    res = conn.getresponse()
    data = res.read()
    
    print(data.decode("utf-8"))
    
    # With shell, you can just pass the correct header with each request
    curl -X GET \
      https://demo.mifinity.com/api/accounts/7FjySjwTibCU3puJcqkYMMZDeN4hdGnuWOREvIR8WZ0=/entries \
      -H 'accept: application/json' \
      -H 'key: sQO8Q3i5-HeD7F0BqVSIN1p......qnjqMDo8Bl0GKUTvexaVm5n7g' \
      -H 'content-type: application/json' \
      -H 'x-api-version: 1' \
      -d '{
           "fromdate":"2018-09-20T17:37:46.185Z", 
           "todate":"2018-09-21T10:37:46.185Z"
    }'
    
    var data = JSON.stringify({
           "fromdate":"2018-09-20T17:37:46.185Z", 
           "todate":"2018-09-21T10:37:46.185Z"
    });
    
    var xhr = new XMLHttpRequest();
    xhr.withCredentials = true;
    
    xhr.addEventListener("readystatechange", function () {
      if (this.readyState === 4) {
        console.log(this.responseText);
      }
    });
    
    xhr.open("GET", "https://demo.mifinity.com/api/accounts/7FjySjwTibCU3puJcqkYMMZDeN4hdGnuWOREvIR8WZ0=/entries");
    xhr.setRequestHeader("accept", "application/json");
    xhr.setRequestHeader("content-type", "application/json");
    xhr.setRequestHeader("x-api-version", "1");
    xhr.setRequestHeader("key", "sQO8Q3i5-HeD7F0BqVSIN1p......qnjqMDo8Bl0GKUTvexaVm5n7g");
    xhr.send(data);
    
    <?php
    
    $request = new HttpRequest();
    $request->setUrl('https://demo.mifinity.com/api/accounts/7FjySjwTibCU3puJcqkYMMZDeN4hdGnuWOREvIR8WZ0=/entries');
    $request->setMethod(HTTP_METH_GET);
    
    $request->setHeaders(array(
      'key' => 'sQO8Q3i5-HeD7F0BqVSIN1p......qnjqMDo8Bl0GKUTvexaVm5n7g',
      'x-api-version' => '1',
      'content-type' => 'application/json',
      'accept' => 'application/json'
    ));
    
    $request->setBody('{
           "fromdate":"2018-09-20T17:37:46.185Z", 
           "todate":"2018-09-21T10:37:46.185Z"
    }');
    
    try {
      $response = $request->send();
    
      echo $response->getBody();
    } catch (HttpException $ex) {
      echo $ex;
    }
    ?>
    

    HTTP Request

    GET https://demo.mifinity.com/api/accounts/{accountId}/entries

    Header

    Parameter Type Description
    Content-Type String Use value 'application/json'
    Accept String Use value 'application/json'
    x-api-version String Use value 1
    Key String API key

    Parameters

    Field Type Required Description
    accoutId String Unique account Id (Path Variable)
    fromdate DataTime transactions from date (Request Parameter)
    todate DataTime transactions to date (Request Parameter)
    total long optional
    page int optional
    size int optional

    Successful response

    {
          "payload": [
            {
                "account": {
                    "accountNumber": "50010001000007",
                    "accountDescription": "specific account for Travel Europe",
                    "balance": {
                        "amount": 98,
                        "currency": "EUR",
                        "presentationAmount": "EUR98.00"
                    },
                    "availableBalance": {
                        "amount": 98,
                        "currency": "EUR",
                        "presentationAmount": "EUR98.00"
                    },
                    "displayInfo": "50010001000007-specific account for Travel Europe [ 98.00 EUR ]",
                    "accountHolderId": "9q90bBfHWdg41SYDq1fuHKrvA7nUdr26c6fJ80mPROw=",
                    "accountType": "PLATFORM",
                    "notificationThresholdAmount": 0,
                    "accountCategory": "GAMING",
                    "createdOn": "2018-09-12T10:37:46.185Z",
                    "isDefault": true,
                    "entityId": "EmYyFJ4J_YMfzwJ3Smdy0xfEAr8MC1aLud6kdA8NUp0="
                },
                "money": {
                    "amount": 1,
                    "currency": "EUR",
                    "presentationAmount": "EUR1.00"
                },
                "runningBalanceInDisplay": {
                    "amount": 119,
                    "currency": "EUR",
                    "presentationAmount": "EUR119.00"
                },
                "datePosted": "2018-09-21T09:27:08.039+01:00",
                "description": "Pegasus Card Verification",
                "eventName": "Load From VISA",
                "transactionReference": "e830ec55-6bcb-49b2-a972-400347c94b71",
                "accountFee": false
            }
        ],
        "page": {
            "size": 100,
            "page": 0,
            "total": 3
        }
    }
    

    Successful Response

    Field Type Required Description
    account Account Complex object containing account details. shown below
    money Money Complex Object Containing money amount
    runningBalanceInDisplay Money Complex Object Containing money running balance
    descripton String Transaction creation timestamp
    eventName boolean Transaction Name
    transactionReference String Transaction Reference
    accountFee boolean Defines whether entry is an account fee or not

    Account

    Field Type Description
    accountNumber String The unique account number
    accountDescription String Description of the account
    balance Object Complex object containing amount, currency and persentationAmount
    avaiableBalance Object Complex object containing amount, currency and persentationAmount
    displayInfo String Display information
    accountHolderId String Unique account holder Id
    accountType String the type of account
    notificationThresholdAmount int
    createdOn String Date and time token generation timestamp
    accountCategory String Account category. Values: GAMING, TRAVEL, E_COMMERCE, REMITTANCE
    isDefault boolean
    entityId String Unique entity id

    Money

    Field Type Required Description
    amount BigDecimal The amount of Money
    money String Currency in ISO 4217 Format
    presentationAmount String optional Consists of Currency Code and Amount

    Get Transaction History

    An API call that get a transaction history for all accounts for a particular account holder.

    To get transaction history, use this code:

    require 'uri'
    require 'net/http'
    
    url = URI("https://demo.mifinity.com/api/account-holders/N_hdbbvpUCqIxjW9tpf_GXGcXs2UBViztcbTEEcWX3Y=/accounts/entries")
    
    http = Net::HTTP.new(url.host, url.port)
    http.use_ssl = true
    http.verify_mode = OpenSSL::SSL::VERIFY_NONE
    
    request = Net::HTTP::Get.new(url)
    request["accept"] = 'application/json'
    request["content-type"] = 'application/json'
    request["x-api-version"] = '1'
    request["key"] = 'sQO8Q3i5-HeD7F0BqVSIN1p......qnjqMDo8Bl0GKUTvexaVm5n7g',
    
    response = http.request(request)
    puts response.read_body
    
    import http.client
    
    conn = http.client.HTTPSConnection("demo.mifinitypay.com")
    
    headers = {
        'accept': "application/json",
        'content-type': "application/json",
        'x-api-version': "1",
        'key': "sQO8Q3i5-HeD7F0BqVSIN1p......qnjqMDo8Bl0GKUTvexaVm5n7g",
        }
    
    conn.request("GET", "/api/account-holders/N_hdbbvpUCqIxjW9tpf_GXGcXs2UBViztcbTEEcWX3Y=/accounts/entries", headers)
    
    res = conn.getresponse()
    data = res.read()
    
    print(data.decode("utf-8"))
    
    # With shell, you can just pass the correct header with each request
    curl -X GET \
      https://demo.mifinity.com/api/account-holders/N_hdbbvpUCqIxjW9tpf_GXGcXs2UBViztcbTEEcWX3Y=/accounts/entries \
      -H 'accept: application/json' \
      -H 'key: sQO8Q3i5-HeD7F0BqVSIN1p......qnjqMDo8Bl0GKUTvexaVm5n7g' \
      -H 'content-type: application/json' \
      -H 'x-api-version: 1' \
    
    
    
    var xhr = new XMLHttpRequest();
    xhr.withCredentials = true;
    
    xhr.addEventListener("readystatechange", function () {
      if (this.readyState === 4) {
        console.log(this.responseText);
      }
    });
    
    xhr.open("GET", "https://demo.mifinity.com/api/account-holders/N_hdbbvpUCqIxjW9tpf_GXGcXs2UBViztcbTEEcWX3Y=/accounts/entries");
    xhr.setRequestHeader("accept", "application/json");
    xhr.setRequestHeader("content-type", "application/json");
    xhr.setRequestHeader("x-api-version", "1");
    xhr.setRequestHeader("key", "sQO8Q3i5-HeD7F0BqVSIN1p......qnjqMDo8Bl0GKUTvexaVm5n7g");
    
    <?php
    
    $request = new HttpRequest();
    $request->setUrl('https://demo.mifinity.com/api/account-holders/N_hdbbvpUCqIxjW9tpf_GXGcXs2UBViztcbTEEcWX3Y=/accounts/entries');
    $request->setMethod(HTTP_METH_GET);
    
    $request->setHeaders(array(
      'key' => 'sQO8Q3i5-HeD7F0BqVSIN1p......qnjqMDo8Bl0GKUTvexaVm5n7g',
      'x-api-version' => '1',
      'content-type' => 'application/json',
      'accept' => 'application/json'
    ));
    
    try {
      $response = $request->send();
    
      echo $response->getBody();
    } catch (HttpException $ex) {
      echo $ex;
    }
    ?>
    

    HTTP Request

    GET https://demo.mifinity.com/api/account-holders/{accountHolderId}/accounts/entries

    Header

    Parameter Type Description
    Content-Type String Use value 'application/json'
    Accept String Use value 'application/json'
    x-api-version String Use value 1
    Key String API key

    Parameters

    Field Type Required Description
    accoutHolderId String Unique account Holder Id (Path Variable)
    fromdate DataTime optional transactions from date (Request Parameter)
    todate DataTime optional transactions to date (Request Parameter)
    DateTime DataTime optional transactions from date
    UUID string optional specific transaction reference
    total long optional
    page int optional
    size int optional

    Successful response

    {
         "payload": [
            {
                "account": {
                    "accountNumber": "50010001000007",
                    "accountDescription": "specific account for Travel Europe",
                    "balance": {
                        "amount": 98,
                        "currency": "EUR",
                        "presentationAmount": "EUR98.00"
                    },
                    "availableBalance": {
                        "amount": 98,
                        "currency": "EUR",
                        "presentationAmount": "EUR98.00"
                    },
                    "displayInfo": "50010001000007-specific account for Travel Europe [ 98.00 EUR ]",
                    "accountHolderId": "9q90bBfHWdg41SYDq1fuHKrvA7nUdr26c6fJ80mPROw=",
                    "accountType": "PLATFORM",
                    "notificationThresholdAmount": 0,
                    "accountCategory": "GAMING",
                    "createdOn": "2018-09-12T10:37:46.185Z",
                    "isDefault": true,
                    "entityId": "EmYyFJ4J_YMfzwJ3Smdy0xfEAr8MC1aLud6kdA8NUp0="
                },
                "money": {
                    "amount": 1,
                    "currency": "EUR",
                    "presentationAmount": "EUR1.00"
                },
                "runningBalanceInDisplay": {
                    "amount": 119,
                    "currency": "EUR",
                    "presentationAmount": "EUR119.00"
                },
                "datePosted": "2018-09-21T09:27:08.039+01:00",
                "description": "Pegasus Card Verification",
                "eventName": "Load From VISA",
                "transactionReference": "e830ec55-6bcb-49b2-a972-400347c94b71",
                "accountFee": false
            }
        ],
        "page": {
            "size": 100,
            "page": 0,
            "total": 3
        }
    }
    

    Successful Response

    Field Type Description
    account Account Complex object containing account details. shown below
    money Money Complex Object Containing money amount
    runningBalanceInDisplay Money Complex Object Containing money running balance
    descripton String Transaction creation timestamp
    eventName boolean Transaction Name
    transactionReference String Transaction Reference
    accountFee boolean Defines whether entry is an account fee or not

    Account

    Field Type Description
    accountNumber String The unique account number
    accountDescription String Description of the account
    balance Object Complex object containing amount, currency and persentationAmount
    avaiableBalance Object Complex object containing amount, currency and persentationAmount
    displayInfo String Display information
    accountHolderId String Unique account holder Id
    accountType String the type of account
    notificationThresholdAmount int
    createdOn String Date and time token generation timestamp
    accountCategory String Account category. Values: GAMING, TRAVEL, E_COMMERCE, REMITTANCE
    isDefault boolean
    entityId String Unique entity id

    Money

    Field Type Description
    amount BigDecimal The amount of Money
    money String Currency in ISO 4217 Format
    presentationAmount String Consists of Currency Code and Amount

    Get Transaction Status

    An API call used to return the transaction status of a particular transaction.

    To get transaction Status, use this code:

    require 'uri'
    require 'net/http'
    
    url = URI("https://demo.mifinity.com/api/transactions/69f6c395-ef54-4140-8a63-a1f869150f81/status")
    
    http = Net::HTTP.new(url.host, url.port)
    http.use_ssl = true
    http.verify_mode = OpenSSL::SSL::VERIFY_NONE
    
    request = Net::HTTP::Get.new(url)
    request["accept"] = 'application/json'
    request["content-type"] = 'application/json'
    request["x-api-version"] = '1'
    request["key"] = 'sQO8Q3i5-HeD7F0BqVSIN1p......qnjqMDo8Bl0GKUTvexaVm5n7g',
    
    response = http.request(request)
    puts response.read_body
    
    import http.client
    
    conn = http.client.HTTPSConnection("demo.mifinitypay.com")
    
    headers = {
        'accept': "application/json",
        'content-type': "application/json",
        'x-api-version': "1",
        'key': "sQO8Q3i5-HeD7F0BqVSIN1p......qnjqMDo8Bl0GKUTvexaVm5n7g",
        }
    
    conn.request("GET", "/api/transactions/69f6c395-ef54-4140-8a63-a1f869150f81/status", headers)
    
    res = conn.getresponse()
    data = res.read()
    
    print(data.decode("utf-8"))
    
    # With shell, you can just pass the correct header with each request
    curl -X GET \
      https://demo.mifinity.com/api/transactions/69f6c395-ef54-4140-8a63-a1f869150f81/status \
      -H 'accept: application/json' \
      -H 'key: sQO8Q3i5-HeD7F0BqVSIN1p......qnjqMDo8Bl0GKUTvexaVm5n7g' \
      -H 'content-type: application/json' \
      -H 'x-api-version: 1' \
    
    
    
    var xhr = new XMLHttpRequest();
    xhr.withCredentials = true;
    
    xhr.addEventListener("readystatechange", function () {
      if (this.readyState === 4) {
        console.log(this.responseText);
      }
    });
    
    xhr.open("GET", "https://demo.mifinity.com/api/transactions/69f6c395-ef54-4140-8a63-a1f869150f81/status");
    xhr.setRequestHeader("accept", "application/json");
    xhr.setRequestHeader("content-type", "application/json");
    xhr.setRequestHeader("x-api-version", "1");
    xhr.setRequestHeader("key", "sQO8Q3i5-HeD7F0BqVSIN1p......qnjqMDo8Bl0GKUTvexaVm5n7g");
    
    <?php
    
    $request = new HttpRequest();
    $request->setUrl('https://demo.mifinity.com/api/transactions/69f6c395-ef54-4140-8a63-a1f869150f81/status');
    $request->setMethod(HTTP_METH_GET);
    
    $request->setHeaders(array(
      'key' => 'sQO8Q3i5-HeD7F0BqVSIN1p......qnjqMDo8Bl0GKUTvexaVm5n7g',
      'x-api-version' => '1',
      'content-type' => 'application/json',
      'accept' => 'application/json'
    ));
    
    try {
      $response = $request->send();
    
      echo $response->getBody();
    } catch (HttpException $ex) {
      echo $ex;
    }
    ?>
    

    HTTP Request

    GET https://demo.mifinity.com/api/transactions/{transactionReference}/status

    Header

    Parameter Type Description
    Content-Type String Use value 'application/json'
    Accept String Use value 'application/json'
    x-api-version String Use value 1
    Key String API key

    Parameters

    Field Type Required Description
    TrasactionReference String Unique transaction id identifier (Path Variable)

    Successful response

    {
          "payload": [
             {
                "transactionReference": "69f6c395-ef54-4140-8a63-a1f869150f81",
                "transactionStatus": 3,
                "transactionStatusDescription": "Submitted",
                "transactionLastUpdated": "2018-09-21T10:15:58.189Z",
                "traceId": "R3f3r3n)E"
            }
        ]
    }
    

    Successful Response

    Field Type Description
    transactionReference String Transaction Reference
    transactionStatus Integer Transaction status
    transactionStatusDescription String Transaction description
    transactionLastUpdated DateTime
    traceId String Trace Id of original request

    Pay Any Bank

    An API call used to complete an payment to any bank. This API will throw a 401 error code if TOTP is enabled on the logged in user until the request is sent with a security-code header containing a valid value.

    To perform a Pay Any Bank transaction, please use the example below replacing key and sourceAccount with the values you have from the previous steps.

    Pay special attention to the fields object. You can use fake data in the demo environment. However, in production check with your business contact which fields are required by the destination account's country. Every country has different requirements for bank transactions.

    You should change parameters called Money, BankPayee and fields according to different countries. The details are shown in each country.

    To do a PAB , use this code

    require 'uri'
    require 'net/http'
    
    url = URI("https://demo.mifinity.com/api/payments/pab")
    
    http = Net::HTTP.new(url.host, url.port)
    http.use_ssl = true
    http.verify_mode = OpenSSL::SSL::VERIFY_NONE
    
    request = Net::HTTP::Post.new(url)
    request["accept"] = 'application/json'
    request["content-type"] = 'application/json'
    request["x-api-version"] = '1'
    request["key"] = 'sQO8Q3i5-HeD7F0BqVSIN1p......qnjqMDo8Bl0GKUTvexaVm5n7g'
    request.body = "{\n        \"money\" : {\"amount\":10, \"currency\":\"EUR\"},\n        \"description\" : \"10 EUR PAB\",\n        \"sourceAccount\" : \"5001000001080652\",\n        \"traceId\" : \"zeihwhp-43gs8iwyf7v4h9k\",\n        \"bankPayee\": {\n          \"country\": \"IE\",\n          \"currency\": \"EUR\",\n          \"description\": \"bank payment description\",\n          \"fields\": {\n            \"IBAN\": \"IE29AIBK93115212345678\",\n            \"BIC\": \"BOFIIE2D\",\n            \"BENEFICIARY_ADDRESS_COUNTRY_ISO_CODE\": \"IE\", \n            \"CUSTOMER_NAME\": \"Customer Name\",\n            \"BANK_NAME\": \"Bank of Ireland\"\n          }\n        }\n}"
    
    response = http.request(request)
    puts response.read_body
    
    import requests
    
    url = "https://demo.mifinity.com/api/payments/pab"
    
    payload = "{\n        \"money\" : {\"amount\":10, \"currency\":\"EUR\"},\n        \"description\" : \"10 EUR PAB\",\n        \"sourceAccount\" : \"5001000001080652\",\n        \"traceId\" : \"zeihwhp-43gs8iwyf7v4h9k\",\n        \"bankPayee\": {\n          \"country\": \"IE\",\n          \"currency\": \"EUR\",\n          \"description\": \"bank payment description\",\n          \"fields\": {\n            \"IBAN\": \"IE29AIBK93115212345678\",\n            \"BIC\": \"BOFIIE2D\",\n            \"BENEFICIARY_ADDRESS_COUNTRY_ISO_CODE\": \"IE\", \n            \"CUSTOMER_NAME\": \"Customer Name\",\n            \"BANK_NAME\": \"Bank of Ireland\"\n          }\n        }\n}"
    headers = {
        'accept': "application/json",
        'content-type': "application/json",
        'x-api-version': "1",
        'key': "sQO8Q3i5-HeD7F0BqVSIN1p......qnjqMDo8Bl0GKUTvexaVm5n7g"
        }
    
    response = requests.request("POST", url, data=payload, headers=headers)
    
    print(response.text)
    
    curl -X POST \
      https://demo.mifinity.com/api/payments/pab \
      -H 'accept: application/json' \
      -H 'content-type: application/json' \
      -H 'key: sQO8Q3i5-HeD7F0BqVSIN1p......qnjqMDo8Bl0GKUTvexaVm5n7g' \
      -H 'x-api-version: 1' \
      -d '{
            "money" : {"amount":10, "currency":"EUR"},
            "description" : "10 EUR PAB",
            "sourceAccount" : "5001000001080652",
            "traceId" : "zeihwhp-43gs8iwyf7v4h9k",
            "bankPayee": {
              "country": "IE",
              "currency": "EUR",
              "description": "bank payment description",
              "fields": {
                "IBAN": "IE29AIBK93115212345678",
                "BIC": "BOFIIE2D",
                "BENEFICIARY_ADDRESS_COUNTRY_ISO_CODE":"IE",
                "CUSTOMER_NAME": "Customer Name",
                "BANK_NAME": "Bank of Ireland"
              }
            }
    }'
    
    var data = JSON.stringify({
      "money": {
        "amount": 10,
        "currency": "EUR"
      },
      "description": "10 EUR PAB",
      "sourceAccount": "5001000001080652",
      "traceId": "zeihwhp-43gs8iwyf7v4h9k",
      "bankPayee": {
        "country": "IE",
        "currency": "EUR",
        "description": "bank payment description",
        "fields": {
          "IBAN": "IE29AIBK93115212345678",
          "BIC": "BOFIIE2D",
          "BENEFICIARY_ADDRESS_COUNTRY_ISO_CODE":"IE",
          "CUSTOMER_NAME": "Customer Name",
          "BANK_NAME": "Bank of Ireland"
        }
      }
    });
    
    var xhr = new XMLHttpRequest();
    xhr.withCredentials = true;
    
    xhr.addEventListener("readystatechange", function () {
      if (this.readyState === 4) {
        console.log(this.responseText);
      }
    });
    
    xhr.open("POST", "https://demo.mifinity.com/api/payments/pab");
    xhr.setRequestHeader("accept", "application/json");
    xhr.setRequestHeader("content-type", "application/json");
    xhr.setRequestHeader("x-api-version", "1");
    xhr.setRequestHeader("key", "sQO8Q3i5-HeD7F0BqVSIN1p......qnjqMDo8Bl0GKUTvexaVm5n7g");
    xhr.send(data);
    
    <?php
    
    $request = new HttpRequest();
    $request->setUrl('https://demo.mifinity.com/api/payments/pab');
    $request->setMethod(HTTP_METH_POST);
    
    $request->setHeaders(array(
      'key' => 'sQO8Q3i5-HeD7F0BqVSIN1p......qnjqMDo8Bl0GKUTvexaVm5n7g',
      'x-api-version' => '1',
      'content-type' => 'application/json',
      'accept' => 'application/json'
    ));
    
    $request->setBody('{
            "money" : {"amount":10, "currency":"EUR"},
            "description" : "10 EUR PAB",
            "sourceAccount" : "5001000001080652",
            "traceId" : "zeihwhp-43gs8iwyf7v4h9k",
            "bankPayee": {
              "country": "IE",
              "currency": "EUR",
              "description": "bank payment description",
              "fields": {
                "IBAN": "IE29AIBK93115212345678",
                "BIC": "BOFIIE2D",
                "BENEFICIARY_ADDRESS_COUNTRY_ISO_CODE":"IE",
                "CUSTOMER_NAME": "Customer Name",
                "BANK_NAME": "Bank of Ireland"
              }
            }
    }');
    
    try {
      $response = $request->send();
    
      echo $response->getBody();
    } catch (HttpException $ex) {
      echo $ex;
    }
    ?>
    

    HTTP Request

    POST https://demo.mifinity.com/api/payments/pab

    Header

    Parameter Type Description
    Content-Type String Use value 'application/json'
    Accept String Use value 'application/json'
    x-api-version String Use value 1
    Key String API key

    Parameters

    Field Type Required Description
    sourceAccount String Account number from which the amount of money will be debited
    money Money Transaction value
    description String Any description you want to assign to this operation
    traceId String Unique transaction identifier. You can assign any value
    bankPayee BankPayee Destination account and destination bank data. In demo you can use fake data
    executionMode String optional ExcutionMode isan enum, which containing STANDRAD/URGENT/TARGET/SAME_DAY_VALUE
    paymentCategoryType String optional ApiPaymentCategory is an enum,which containing GAMING_PAYOUT/REMITTANCE/REFUND/PAYROLL/EXPENSES/E_COMMERCE/TRAVEL/NOT_SET

    Money

    Field Type Required Description
    amount Number Transaction value
    currency String Currency code (ISO 4217)

    BankPayee

    Field Type Required Description
    country String Bank payee country code
    currency String Bank Payee Currency
    entityId String optional BankPayee unique identification number
    description String optional Any description you want to assign to this operation
    fields Map Map of type String

    fields

    Field Type Required Description
    IBAN String Bank IBAN
    BIC String Bank BIC
    CUSTOMER_NAME String Bank customer name
    BANK_NAME String Bank Name
    BENEFICIARY_ADDRESS_COUNTRY_ISO_CODE String Country code

    Successful response

    {
    
        "payload": [
            {
                "transactionId": "6PX0FjAufQSJ9eEMzjdyuMpFeR4vXI_Ln08rgzdvO-I=",
                "transactionReference": "4c9f3bf3-1c92-4d79-bbf0-b3d85cee2980",
                "traceId": "82595452748399303479",
                "datePosted": "2018-09-24T09:53:52.158Z",
                "sourceMoney": {
                    "amount": 10,
                    "currency": "EUR",
                    "displayable": "EUR10.00"
                },
                "destinationMoney": {
                    "amount": 10,
                    "currency": "EUR",
                    "displayable": "EUR10.00"
                },
                "exchangeRate": 1,
                "totalFees": {
                    "amount": 0,
                    "currency": "EUR",
                    "displayable": "EUR0.00"
                }
            }
        ]
    }
    

    Successful Response

    Field Type Description
    transactionId EntityId Encrypted identifier of the transaction
    transactionReference String Transaction unique reference
    traceId String Identifier that has been passed to the request will be returned
    datePosted DateTime The date/time that the transaction posted.
    sourceMoney Object Complex object containing: amount(Number), currency(String) and displayable (String)
    destinationeMoney Object Complex object containing: amount(Number), currency(String) and displayable (String)
    exchangeRate Integer
    totalFee Object Complex object containing: amount(Number), currency(String) and displayable (String)

    1. Argentina

    require 'uri'
    require 'net/http'
    
    url = URI("https://demo.mifinity.com/api/payments/pab")
    
    http = Net::HTTP.new(url.host, url.port)
    http.use_ssl = true
    http.verify_mode = OpenSSL::SSL::VERIFY_NONE
    
    request = Net::HTTP::Post.new(url)
    request["accept"] = 'application/json'
    request["content-type"] = 'application/json'
    request["x-api-version"] = '1'
    request["key"] = 'sQO8Q3i5-HeD7F0BqVSIN1p......qnjqMDo8Bl0GKUTvexaVm5n7g'
    request.body = "{\n        \"money\" : {\"amount\":10, \"currency\":\"ARS\"},
    \n        \"description\" : \"10 ARS PAB\",
    \n        \"sourceAccount\" : \"5001000001080652\",
    \n        \"traceId\" : \"zeihwhp-43gs8iwyf7v4h9k\",
    \n        \"bankPayee\": {\n          \"country\": \"AR\",
    \n          \"currency\": \"ARS\",
    \n          \"description\": \"bank payment description\",
    \n          \"fields\": {\n            \"ACCOUNT_NUMBER\": \"0145806057668127441234\",
    \n            \"PERSONAL_ID_NUMBER\": \"12345678\", 
    \n            \"ACCOUNT_TYPE\": \"1\", 
    \n            \"CUSTOMER_NAME\": \"Customer Name\",
    \n            \"BANK_NAME\": \"Name of Bank\"\n          }\n        }\n}"
    
    response = http.request(request)
    puts response.read_body
    
    import requests
    
    url = "https://demo.mifinity.com/api/payments/pab"
    
    payload = "{\n        \"money\" : {\"amount\":10, \"currency\":\"ARS\"},\
    \n        \"description\" : \"10 ARS PAB\",\
    \n        \"sourceAccount\" : \"5001000001080652\",\
    \n        \"traceId\" : \"zeihwhp-43gs8iwyf7v4h9k\",\
    \n        \"bankPayee\": {\n          \"country\": \"AR\",\
    \n          \"currency\": \"ARS\", \
    \n          \"description\": \"bank payment description\", \
    \n          \"fields\": {\n            \"ACCOUNT_NUMBER\": \"0145806057668127441234\", \
    \n            \"PERSONAL_ID_NUMBER\": \"12345678\", \
    \n            \"ACCOUNT_TYPE\": \"1\", \
    \n            \"CUSTOMER_NAME\": \"Customer Name\", \
    \n            \"BANK_NAME\": \"Name of Bank\"\n          }\n        }\n}"
    
    headers = {
        'accept': "application/json",
        'content-type': "application/json",
        'x-api-version': "1",
        'key': "sQO8Q3i5-HeD7F0BqVSIN1p......qnjqMDo8Bl0GKUTvexaVm5n7g"
        }
    
    response = requests.request("POST", url, data=payload, headers=headers)
    
    print(response.text)
    
    curl -X POST \
      https://demo.mifinity.com/api/payments/pab \
      -H 'accept: application/json' \
      -H 'content-type: application/json' \
      -H 'key: sQO8Q3i5-HeD7F0BqVSIN1p......qnjqMDo8Bl0GKUTvexaVm5n7g' \
      -H 'x-api-version: 1' \
      -d '{
            "money" : {"amount":10, "currency":"ARS"},
            "description" : "10 ARS PAB",
            "sourceAccount" : "5001000001080652",
            "traceId" : "zeihwhp-43gs8iwyf7v4h9k",
            "bankPayee": {
              "country": "AR",
              "currency": "ARS",
              "description": "bank payment description",
              "fields": {
                "ACCOUNT_NUMBER": "0145806057668127441234",
                "PERSONAL_ID_NUMBER": "12345678",
                "ACCOUNT_TYPE": "1",
                "CUSTOMER_NAME": "Customer Name",
                "BANK_NAME": "Name of Bank"
              }
            }
    }'
    
    var data = JSON.stringify({
      "money": {
        "amount": 10,
        "currency": "ARS"
      },
      "description": "10 ARS PAB",
      "sourceAccount": "5001000001080652",
      "traceId": "zeihwhp-43gs8iwyf7v4h9k",
      "bankPayee": {
        "country": "AR",
        "currency": "ARS",
        "description": "bank payment description",
        "fields": {
                "ACCOUNT_NUMBER": "0145806057668127441234",
                "PERSONAL_ID_NUMBER": "12345678",
                "ACCOUNT_TYPE": "1",
                "CUSTOMER_NAME": "Customer Name",
                "BANK_NAME": "Name of Bank"
              }
      }
    });
    
    var xhr = new XMLHttpRequest();
    xhr.withCredentials = true;
    
    xhr.addEventListener("readystatechange", function () {
      if (this.readyState === 4) {
        console.log(this.responseText);
      }
    });
    
    xhr.open("POST", "https://demo.mifinity.com/api/payments/pab");
    xhr.setRequestHeader("accept", "application/json");
    xhr.setRequestHeader("content-type", "application/json");
    xhr.setRequestHeader("x-api-version", "1");
    xhr.setRequestHeader("key", "sQO8Q3i5-HeD7F0BqVSIN1p......qnjqMDo8Bl0GKUTvexaVm5n7g");
    xhr.send(data);
    
    <?php
    
    $request = new HttpRequest();
    $request->setUrl('https://demo.mifinity.com/api/payments/pab');
    $request->setMethod(HTTP_METH_POST);
    
    $request->setHeaders(array(
      'key' => 'sQO8Q3i5-HeD7F0BqVSIN1p......qnjqMDo8Bl0GKUTvexaVm5n7g',
      'x-api-version' => '1',
      'content-type' => 'application/json',
      'accept' => 'application/json'
    ));
    
    $request->setBody('{
       "money": {
        "amount": 10,
        "currency": "ARS"
      },
      "description": "10 ARS PAB",
      "sourceAccount": "5001000001080652",
      "traceId": "zeihwhp-43gs8iwyf7v4h9k",
      "bankPayee": {
        "country": "AR",
        "currency": "ARS",
        "description": "bank payment description",
        "fields": {
                "ACCOUNT_NUMBER": "0145806057668127441234",
                "PERSONAL_ID_NUMBER": "12345678",
                "ACCOUNT_TYPE": "1",
                "CUSTOMER_NAME": "Customer Name",
                "BANK_NAME": "Name of Bank"
              }
            }
    }');
    
    try {
      $response = $request->send();
    
      echo $response->getBody();
    } catch (HttpException $ex) {
      echo $ex;
    }
    ?>
    

    Money

    Field Type Required Description
    amount Number Transaction value
    currency String Currency code (ISO 4217): ARS

    BankPayee

    Field Type Required Description
    country String Bank payee country code: AR
    currency String Bank Payee Currency: ARS
    entityId String optional BankPayee unique identification number
    description String optional Any description you want to assign to this operation
    fields Map Map of type String

    fields

    Field Type Required Description
    ACCOUNT_NUMBER String CBU (22 digits)
    PERSONAL_ID_NUMBER String DNI: 8 digits, numeric or CUIT: 11 digits, numeric
    ACCOUNT_TYPE String 0: checking account or 1: savings account
    CUSTOMER_NAME String Bank customer name
    BANK_NAME String Bank Name

    Successful response

    {
    
        "payload": [
            {
                "transactionId": "6PX0FjAufQSJ9eEMzjdyuMpFeR4vXI_Ln08rgzdvO-I=",
                "transactionReference": "4c9f3bf3-1c92-4d79-bbf0-b3d85cee2980",
                "traceId": "82595452748399303479",
                "datePosted": "2018-09-24T09:53:52.158Z",
                "sourceMoney": {
                    "amount": 10,
                    "currency": "ARS",
                    "displayable": "ARS10.00"
                },
                "destinationMoney": {
                    "amount": 10,
                    "currency": "ARS",
                    "displayable": "ARS10.00"
                },
                "exchangeRate": 1,
                "totalFees": {
                    "amount": 0,
                    "currency": "ARS",
                    "displayable": "ARS0.00"
                }
            }
        ]
    }
    

    2. Austria

    require 'uri'
    require 'net/http'
    
    url = URI("https://demo.mifinity.com/api/payments/pab")
    
    http = Net::HTTP.new(url.host, url.port)
    http.use_ssl = true
    http.verify_mode = OpenSSL::SSL::VERIFY_NONE
    
    request = Net::HTTP::Post.new(url)
    request["accept"] = 'application/json'
    request["content-type"] = 'application/json'
    request["x-api-version"] = '1'
    request["key"] = 'sQO8Q3i5-HeD7F0BqVSIN1p......qnjqMDo8Bl0GKUTvexaVm5n7g'
    request.body = "{\n        \"money\" : {\"amount\":10, \"currency\":\"EUR\"},
    \n        \"description\" : \"10 EUR PAB\",
    \n        \"sourceAccount\" : \"5001000001080652\",
    \n        \"traceId\" : \"zeihwhp-43gs8iwyf7v4h9k\",
    \n        \"bankPayee\": {\n          \"country\": \"AT\",
    \n          \"currency\": \"EUR\",
    \n          \"description\": \"bank payment description\",
    \n          \"fields\": {\n            \"IBAN": \"AT483200000012345864\",
    \n            \"BIC\": \"HSEEAT2K\", 
    \n            \"BENEFICIARY_ADDRESS_COUNTRY_ISO_CODE\": \"AT\", 
    \n            \"CUSTOMER_NAME\": \"Customer Name\",
    \n            \"BANK_NAME\": \"Name of Bank\"\n          }\n        }\n}"
    
    response = http.request(request)
    puts response.read_body
    
    import requests
    
    url = "https://demo.mifinity.com/api/payments/pab"
    
    payload =  "{\n        \"money\" : {\"amount\":10, \"currency\":\"EUR\"}, \
    \n        \"description\" : \"10 EUR PAB\", \
    \n        \"sourceAccount\" : \"5001000001080652\", \
    \n        \"traceId\" : \"zeihwhp-43gs8iwyf7v4h9k\", \
    \n        \"bankPayee\": {\n          \"country\": \"AT\", \
    \n          \"currency\": \"EUR\", \
    \n          \"description\": \"bank payment description\", \
    \n          \"fields\": {\n            \"IBAN\": \"AT483200000012345864\", \
    \n            \"BIC\": \"HSEEAT2K\", \
    \n            \"BENEFICIARY_ADDRESS_COUNTRY_ISO_CODE\": \"AT\", \
    \n            \"CUSTOMER_NAME\": \"Customer Name\", \
    \n            \"BANK_NAME\": \"Name of Bank\"\n          }\n        }\n}"
    
    headers = {
        'accept': "application/json",
        'content-type': "application/json",
        'x-api-version': "1",
        'key': "sQO8Q3i5-HeD7F0BqVSIN1p......qnjqMDo8Bl0GKUTvexaVm5n7g"
        }
    
    response = requests.request("POST", url, data=payload, headers=headers)
    
    print(response.text)
    
    curl -X POST \
      https://demo.mifinity.com/api/payments/pab \
      -H 'accept: application/json' \
      -H 'content-type: application/json' \
      -H 'key: sQO8Q3i5-HeD7F0BqVSIN1p......qnjqMDo8Bl0GKUTvexaVm5n7g' \
      -H 'x-api-version: 1' \
      -d '{
            "money" : {"amount":10, "currency":"EUR"},
            "description" : "10 EUR PAB",
            "sourceAccount" : "5001000001080652",
            "traceId" : "zeihwhp-43gs8iwyf7v4h9k",
            "bankPayee": {
              "country": "AT",
              "currency": "EUR",
              "description": "bank payment description",
              "fields": {
                "IBAN":"AT483200000012345864",
                "BIC": "HSEEAT2K",
                "BENEFICIARY_ADDRESS_COUNTRY_ISO_CODE":"AT",
                "CUSTOMER_NAME": "Customer Name",
                "BANK_NAME": "Name of Bank"
              }
            }
    }'
    
    var data = JSON.stringify({
    
            "money" : {"amount":10, "currency":"EUR"},
            "description" : "10 EUR PAB",
            "sourceAccount" : "5001000001080652",
            "traceId" : "zeihwhp-43gs8iwyf7v4h9k",
            "bankPayee": {
              "country": "AT",
              "currency": "EUR",
              "description": "bank payment description",
              "fields": {
                "IBAN":"AT483200000012345864",
                "BIC": "HSEEAT2K",
                "BENEFICIARY_ADDRESS_COUNTRY_ISO_CODE":"AT",
                "CUSTOMER_NAME": "Customer Name",
                "BANK_NAME": "Name of Bank"
              }
      }
    });
    
    var xhr = new XMLHttpRequest();
    xhr.withCredentials = true;
    
    xhr.addEventListener("readystatechange", function () {
      if (this.readyState === 4) {
        console.log(this.responseText);
      }
    });
    
    xhr.open("POST", "https://demo.mifinity.com/api/payments/pab");
    xhr.setRequestHeader("accept", "application/json");
    xhr.setRequestHeader("content-type", "application/json");
    xhr.setRequestHeader("x-api-version", "1");
    xhr.setRequestHeader("key", "sQO8Q3i5-HeD7F0BqVSIN1p......qnjqMDo8Bl0GKUTvexaVm5n7g");
    xhr.send(data);
    
    <?php
    
    $request = new HttpRequest();
    $request->setUrl('https://demo.mifinity.com/api/payments/pab');
    $request->setMethod(HTTP_METH_POST);
    
    $request->setHeaders(array(
      'key' => 'sQO8Q3i5-HeD7F0BqVSIN1p......qnjqMDo8Bl0GKUTvexaVm5n7g',
      'x-api-version' => '1',
      'content-type' => 'application/json',
      'accept' => 'application/json'
    ));
    
    $request->setBody('{
    
            "money" : {"amount":10, "currency":"EUR"},
            "description" : "10 EUR PAB",
            "sourceAccount" : "5001000001080652",
            "traceId" : "zeihwhp-43gs8iwyf7v4h9k",
            "bankPayee": {
              "country": "AT",
              "currency": "EUR",
              "description": "bank payment description",
              "fields": {
               "IBAN":"AT483200000012345864",
                "BIC": "HSEEAT2K",
                "BENEFICIARY_ADDRESS_COUNTRY_ISO_CODE":"AT",
                "CUSTOMER_NAME": "Customer Name",
                "BANK_NAME": "Name of Bank"
              }
            }
    }');
    
    try {
      $response = $request->send();
    
      echo $response->getBody();
    } catch (HttpException $ex) {
      echo $ex;
    }
    ?>
    

    Money

    Field Type Required Description
    amount Number Transaction value
    currency String Currency code (ISO 4217): EUR

    BankPayee

    Field Type Required Description
    country String Bank payee country code: AT
    currency String Bank Payee Currency: EUR
    entityId String optional BankPayee unique identification number
    description String optional Any description you want to assign to this operation
    fields Map Map of type String

    fields

    Field Type Required Description
    IBAN String Bank IBAN Alphanumeric (20)
    BIC String Bank BIC: Alphanumeric (Min 8, Max 11)
    CUSTOMER_NAME String Bank customer name
    BANK_NAME String Bank Name
    BENEFICIARY_ADDRESS_COUNTRY_ISO_CODE String Country code

    Successful response

    {
    
        "payload": [
            {
                "transactionId": "6PX0FjAufQSJ9eEMzjdyuMpFeR4vXI_Ln08rgzdvO-I=",
                "transactionReference": "4c9f3bf3-1c92-4d79-bbf0-b3d85cee2980",
                "traceId": "82595452748399303479",
                "datePosted": "2018-09-24T09:53:52.158Z",
                "sourceMoney": {
                    "amount": 10,
                    "currency": "EUR",
                    "displayable": "EUR10.00"
                },
                "destinationMoney": {
                    "amount": 10,
                    "currency": "EUR",
                    "displayable": "EUR10.00"
                },
                "exchangeRate": 1,
                "totalFees": {
                    "amount": 0,
                    "currency": "EUR",
                    "displayable": "EUR0.00"
                }
            }
        ]
    }
    

    3. Australia

    require 'uri'
    require 'net/http'
    
    url = URI("https://demo.mifinity.com/api/payments/pab")
    
    http = Net::HTTP.new(url.host, url.port)
    http.use_ssl = true
    http.verify_mode = OpenSSL::SSL::VERIFY_NONE
    
    request = Net::HTTP::Post.new(url)
    request["accept"] = 'application/json'
    request["content-type"] = 'application/json'
    request["x-api-version"] = '1'
    request["key"] = 'sQO8Q3i5-HeD7F0BqVSIN1p......qnjqMDo8Bl0GKUTvexaVm5n7g'
    request.body = "{\n        \"money\" : {\"amount\":10, \"currency\":\"AUD\"},
    \n        \"description\" : \"10 AUD PAB\",
    \n        \"sourceAccount\" : \"5001000001080652\",
    \n        \"traceId\" : \"zeihwhp-43gs8iwyf7v4h9k\",
    \n        \"bankPayee\": {\n          \"country\": \"AU\",
    \n          \"currency\": \"AUD\",
    \n          \"description\": \"bank payment description\",
    \n          \"fields\": {\n            \"ACCOUNT_NUMBER\": \"014580605\",
    \n            \"BANK_CODE\": \"012204\",
    \n            \"BIC\": \"AMPBAU2S\", 
    \n            \"CUSTOMER_ADDRESS_1\": \"asdsasadsadsadas\", 
    \n            \"CUSTOMER_CITY\": \"city\", 
    \n            \"BENEFICIARY_ADDRESS_COUNTRY_ISO_CODE\": \"AU\",
     \n            \"CUSTOMER_NAME\": \"Customer Name\",
     \n            \"BANK_NAME\": \"Name of Bank\"\n          }\n        }\n}"
    
    response = http.request(request)
    puts response.read_body
    
    import requests
    
    url = "https://demo.mifinity.com/api/payments/pab"
    
    payload = "{\n        \"money\" : {\"amount\":10, \"currency\":\"AUD\"}, \
    \n        \"description\" : \"10 AUD PAB\", \
    \n        \"sourceAccount\" : \"5001000001080652\", \
    \n        \"traceId\" : \"zeihwhp-43gs8iwyf7v4h9k\", \
    \n        \"bankPayee\": {\n          \"country\": \"AU\", \
    \n          \"currency\": \"AUD\", \
    \n          \"description\": \"bank payment description\", \
    \n          \"fields\": {\n            \"ACCOUNT_NUMBER\": \"014580605\", \
    \n            \"BANK_CODE\": \"012204\", \
    \n            \"BIC\": \"AMPBAU2S\", \
    \n            \"CUSTOMER_ADDRESS_1\": \"asdsasadsadsadas\", \
    \n            \"CUSTOMER_CITY\": \"city\", \
    \n            \"CUSTOMER_NAME\": \"Customer Name\", \
    \n            \"BENEFICIARY_ADDRESS_COUNTRY_ISO_CODE\": \"AU\", \
    \n            \"BANK_NAME\": \"Name of Bank\"\n          }\n      }\n}"
    
    headers = {
        'accept': "application/json",
        'content-type': "application/json",
        'x-api-version': "1",
        'key': "sQO8Q3i5-HeD7F0BqVSIN1p......qnjqMDo8Bl0GKUTvexaVm5n7g"
        }
    
    response = requests.request("POST", url, data=payload, headers=headers)
    
    print(response.text)
    
    curl -X POST \
      https://demo.mifinity.com/api/payments/pab \
      -H 'accept: application/json' \
      -H 'content-type: application/json' \
      -H 'key: sQO8Q3i5-HeD7F0BqVSIN1p......qnjqMDo8Bl0GKUTvexaVm5n7g' \
      -H 'x-api-version: 1' \
      -d '{
            "money" : {"amount":10, "currency":"AUD"},
            "description" : "10 AUD PAB",
            "sourceAccount" : "5001000001080652",
            "traceId" : "zeihwhp-43gs8iwyf7v4h9k",
            "bankPayee": {
              "country": "AU",
              "currency": "AUD",
              "description": "bank payment description",
              "fields": {
                "ACCOUNT_NUMBER": "014580605",
                "BANK_CODE": "012204",
                "BIC": "AMPBAU2S",
                "CUSTOMER_ADDRESS_1": "asdsasadsadsadas",
                "CUSTOMER_CITY": "city",
                "BENEFICIARY_ADDRESS_COUNTRY_ISO_CODE":"AU", 
                "CUSTOMER_NAME": "Customer Name",
                "BANK_NAME": "Name of Bank"
              }
            }
    }'
    
    var data = JSON.stringify({
      "money": {
        "amount": 10,
        "currency": "AUD"
      },
      "description": "10 AUD PAB",
      "sourceAccount": "5001000001080652",
      "traceId": "zeihwhp-43gs8iwyf7v4h9k",
      "bankPayee": {
        "country": "AU",
        "currency": "AUD",
        "description": "bank payment description",
        "fields": {
                "ACCOUNT_NUMBER": "014580605",
                "BANK_CODE": "012204",
                "BIC": "AMPBAU2S",
                "CUSTOMER_ADDRESS_1": "asdsasadsadsadas",
                "CUSTOMER_CITY": "city",
                "BENEFICIARY_ADDRESS_COUNTRY_ISO_CODE":"AU", 
                "CUSTOMER_NAME": "Customer Name",
                "BANK_NAME": "Name of Bank"
              }
      }
    });
    
    var xhr = new XMLHttpRequest();
    xhr.withCredentials = true;
    
    xhr.addEventListener("readystatechange", function () {
      if (this.readyState === 4) {
        console.log(this.responseText);
      }
    });
    
    xhr.open("POST", "https://demo.mifinity.com/api/payments/pab");
    xhr.setRequestHeader("accept", "application/json");
    xhr.setRequestHeader("content-type", "application/json");
    xhr.setRequestHeader("x-api-version", "1");
    xhr.setRequestHeader("key", "sQO8Q3i5-HeD7F0BqVSIN1p......qnjqMDo8Bl0GKUTvexaVm5n7g");
    xhr.send(data);
    
    <?php
    
    $request = new HttpRequest();
    $request->setUrl('https://demo.mifinity.com/api/payments/pab');
    $request->setMethod(HTTP_METH_POST);
    
    $request->setHeaders(array(
      'key' => 'sQO8Q3i5-HeD7F0BqVSIN1p......qnjqMDo8Bl0GKUTvexaVm5n7g',
      'x-api-version' => '1',
      'content-type' => 'application/json',
      'accept' => 'application/json'
    ));
    
    $request->setBody('{
            "money" : {"amount":10, "currency":"AUD"},
            "description" : "10 AUD PAB",
            "sourceAccount" : "5001000001080652",
            "traceId" : "zeihwhp-43gs8iwyf7v4h9k",
            "bankPayee": {
              "country": "AU",
              "currency": "AUD",
              "fields": {
                "ACCOUNT_NUMBER": "014580605",
                "BANK_CODE": "012204",
                "BIC": "AMPBAU2S",
                "CUSTOMER_ADDRESS_1": "asdsasadsadsadas",
                "CUSTOMER_CITY": "city",
                "BENEFICIARY_ADDRESS_COUNTRY_ISO_CODE":"AU", 
                "CUSTOMER_NAME": "Customer Name",
                "BANK_NAME": "Name of Bank"
              }
            }
    }');
    
    try {
      $response = $request->send();
    
      echo $response->getBody();
    } catch (HttpException $ex) {
      echo $ex;
    }
    ?>
    

    Money

    Field Type Required Description
    amount Number Transaction value
    currency String Currency code (ISO 4217): AUD

    BankPayee

    Field Type Required Description
    country String Bank payee country code: AU
    currency String Bank Payee Currency: AUD
    entityId String optional BankPayee unique identification number
    description String optional Any description you want to assign to this operation
    fields Map Map of type String

    fields

    Field Type Required Description
    ACCOUNT_NUMBER String (5 - 9 digits)
    BANK_CODE String (6 digits)Eg, 012204
    BIC String Bank BIC: Alphanumeric (Min 8, Max 11)
    CUSTOMER_CITY String Alphanumeric (Max 25 characters
    CUSTOMER_ADDRESS_1 String Alphanumeric (Max 25 characters
    CUSTOMER_NAME String Bank customer name
    BANK_NAME String Bank Name
    BENEFICIARY_ADDRESS_COUNTRY_ISO_CODE String Country code

    Successful response

    {
    
        "payload": [
            {
                "transactionId": "6PX0FjAufQSJ9eEMzjdyuMpFeR4vXI_Ln08rgzdvO-I=",
                "transactionReference": "4c9f3bf3-1c92-4d79-bbf0-b3d85cee2980",
                "traceId": "82595452748399303479",
                "datePosted": "2018-09-24T09:53:52.158Z",
                "sourceMoney": {
                    "amount": 10,
                    "currency": "AUD",
                    "displayable": "AUD10.00"
                },
                "destinationMoney": {
                    "amount": 10,
                    "currency": "AUD",
                    "displayable": "AUD10.00"
                },
                "exchangeRate": 1,
                "totalFees": {
                    "amount": 0,
                    "currency": "AUD",
                    "displayable": "AUD0.00"
                }
            }
        ]
    }
    

    4. Belgium

    require 'uri'
    require 'net/http'
    
    url = URI("https://demo.mifinity.com/api/payments/pab")
    
    http = Net::HTTP.new(url.host, url.port)
    http.use_ssl = true
    http.verify_mode = OpenSSL::SSL::VERIFY_NONE
    
    request = Net::HTTP::Post.new(url)
    request["accept"] = 'application/json'
    request["content-type"] = 'application/json'
    request["x-api-version"] = '1'
    request["key"] = 'sQO8Q3i5-HeD7F0BqVSIN1p......qnjqMDo8Bl0GKUTvexaVm5n7g'
    request.body = "{\n        \"money\" : {\"amount\":10, \"currency\":\"EUR\"},
    \n        \"description\" : \"10 EUR PAB\", 
    \n        \"sourceAccount\" : \"5001000001080652\",
    \n        \"traceId\" : \"zeihwhp-43gs8iwyf7v4h9k\",
    \n        \"bankPayee\": {\n          \"country\": \"BE\",
    \n          \"currency\": \"EUR\",
    \n          \"description\": \"bank payment description\",
    \n          \"fields\": {\n            \"IBAN\": \"BE71096123456769\",
    \n            \"BIC\": \"ABNABE2A\", 
    \n            \"BENEFICIARY_ADDRESS_COUNTRY_ISO_CODE\": \"BE\", 
    \n            \"CUSTOMER_NAME\": \"Customer Name\",
    \n            \"BANK_NAME\": \"Name of Bank\"\n          }\n        }\n}"
    
    response = http.request(request)
    puts response.read_body
    
    import requests
    
    url = "https://demo.mifinity.com/api/payments/pab"
    
    payload = "{\n        \"money\" : {\"amount\":10, \"currency\":\"EUR\"}, \
    \n        \"description\" : \"10 EUR PAB\", \
    \n        \"sourceAccount\" : \"5001000001080652\", \
    \n        \"traceId\" : \"zeihwhp-43gs8iwyf7v4h9k\", \
    \n        \"bankPayee\": {\n          \"country\": \"BE\", \
    \n          \"currency\": \"EUR\", \
    \n          \"description\": \"bank payment description\", \
    \n          \"fields\": {\n            \"IBAN\": \"BE71096123456769\", \
    \n            \"BIC\": \"ABNABE2A\", \
    \n            \"BENEFICIARY_ADDRESS_COUNTRY_ISO_CODE\": \"BE\", \
    \n            \"CUSTOMER_NAME\": \"Customer Name\", \
    \n            \"BANK_NAME\": \"Name of Bank\"\n          }\n        }\n}"
    headers = {
        'accept': "application/json",
        'content-type': "application/json",
        'x-api-version': "1",
        'key': "sQO8Q3i5-HeD7F0BqVSIN1p......qnjqMDo8Bl0GKUTvexaVm5n7g"
        }
    
    response = requests.request("POST", url, data=payload, headers=headers)
    
    print(response.text)
    
    curl -X POST \
      https://demo.mifinity.com/api/payments/pab \
      -H 'accept: application/json' \
      -H 'content-type: application/json' \
      -H 'key: sQO8Q3i5-HeD7F0BqVSIN1p......qnjqMDo8Bl0GKUTvexaVm5n7g' \
      -H 'x-api-version: 1' \
      -d '{
            "money" : {"amount":10, "currency":"EUR"},
            "description" : "10 EUR PAB",
            "sourceAccount" : "5001000001080652",
            "traceId" : "zeihwhp-43gs8iwyf7v4h9k",
            "bankPayee": {
              "country": "BE",
              "currency": "EUR",
              "description": "bank payment description",
              "fields": {
                "IBAN": "BE71096123456769",
                "BIC": "ABNABE2A",
                "BENEFICIARY_ADDRESS_COUNTRY_ISO_CODE":"BE",
                "CUSTOMER_NAME": "Customer Name",
                "BANK_NAME": "Name of Bank"
              }
            }
    }'
    
    var data = JSON.stringify({
      "money": {
        "amount": 10,
        "currency": "EUR"
      },
      "description": "10 EUR PAB",
      "sourceAccount": "5001000001080652",
      "traceId": "zeihwhp-43gs8iwyf7v4h9k",
      "bankPayee": {
        "country": "BE",
        "currency": "EUR",
        "description": "bank payment description",
        "fields": {
          "IBAN": "BE71096123456769",
          "BIC": "ABNABE2A",
          "BENEFICIARY_ADDRESS_COUNTRY_ISO_CODE":"BE",
          "CUSTOMER_NAME": "Customer Name",
          "BANK_NAME": "Name of Bank"
        }
      }
    });
    
    var xhr = new XMLHttpRequest();
    xhr.withCredentials = true;
    
    xhr.addEventListener("readystatechange", function () {
      if (this.readyState === 4) {
        console.log(this.responseText);
      }
    });
    
    xhr.open("POST", "https://demo.mifinity.com/api/payments/pab");
    xhr.setRequestHeader("accept", "application/json");
    xhr.setRequestHeader("content-type", "application/json");
    xhr.setRequestHeader("x-api-version", "1");
    xhr.setRequestHeader("key", "sQO8Q3i5-HeD7F0BqVSIN1p......qnjqMDo8Bl0GKUTvexaVm5n7g");
    xhr.send(data);
    
    <?php
    
    $request = new HttpRequest();
    $request->setUrl('https://demo.mifinity.com/api/payments/pab');
    $request->setMethod(HTTP_METH_POST);
    
    $request->setHeaders(array(
      'key' => 'sQO8Q3i5-HeD7F0BqVSIN1p......qnjqMDo8Bl0GKUTvexaVm5n7g',
      'x-api-version' => '1',
      'content-type' => 'application/json',
      'accept' => 'application/json'
    ));
    
    $request->setBody('{
            "money" : {"amount":10, "currency":"EUR"},
            "description" : "10 EUR PAB",
            "sourceAccount" : "5001000001080652",
            "traceId" : "zeihwhp-43gs8iwyf7v4h9k",
            "bankPayee": {
              "country": "BE",
              "currency": "EUR",
              "description": "bank payment description",
              "fields": {
                "IBAN": "BE71096123456769",
                "BIC": "ABNABE2A",
                "BENEFICIARY_ADDRESS_COUNTRY_ISO_CODE":"BE",
                "CUSTOMER_NAME": "Customer Name",
                "BANK_NAME": "Name of Bank"
              }
            }
    }');
    
    try {
      $response = $request->send();
    
      echo $response->getBody();
    } catch (HttpException $ex) {
      echo $ex;
    }
    ?>
    

    Money

    Field Type Required Description
    amount Number Transaction value
    currency String Currency code (ISO 4217): EUR

    BankPayee

    Field Type Required Description
    country String Bank payee country code: BE
    currency String Bank Payee Currency: EUR
    entityId String optional BankPayee unique identification number
    description String optional Any description you want to assign to this operation
    fields Map Map of type String

    fields

    Field Type Required Description
    IBAN String Bank IBAN: Alphanumeric (16)
    BIC String Bank BIC: Alphanumeric (Min 8, Max 11)
    CUSTOMER_NAME String Bank customer name
    BANK_NAME String Bank Name
    BENEFICIARY_ADDRESS_COUNTRY_ISO_CODE String Country code

    Successful response

    {
    
        "payload": [
            {
                "transactionId": "6PX0FjAufQSJ9eEMzjdyuMpFeR4vXI_Ln08rgzdvO-I=",
                "transactionReference": "4c9f3bf3-1c92-4d79-bbf0-b3d85cee2980",
                "traceId": "82595452748399303479",
                "datePosted": "2018-09-24T09:53:52.158Z",
                "sourceMoney": {
                    "amount": 10,
                    "currency": "EUR",
                    "displayable": "EUR10.00"
                },
                "destinationMoney": {
                    "amount": 10,
                    "currency": "EUR",
                    "displayable": "EUR10.00"
                },
                "exchangeRate": 1,
                "totalFees": {
                    "amount": 0,
                    "currency": "EUR",
                    "displayable": "EUR0.00"
                }
            }
        ]
    }
    

    5. Bulgaria

    5.1. BGN currency example

    require 'uri'
    require 'net/http'
    
    url = URI("https://demo.mifinity.com/api/payments/pab")
    
    http = Net::HTTP.new(url.host, url.port)
    http.use_ssl = true
    http.verify_mode = OpenSSL::SSL::VERIFY_NONE
    
    request = Net::HTTP::Post.new(url)
    request["accept"] = 'application/json'
    request["content-type"] = 'application/json'
    request["x-api-version"] = '1'
    request["key"] = 'sQO8Q3i5-HeD7F0BqVSIN1p......qnjqMDo8Bl0GKUTvexaVm5n7g'
    request.body = "{\n        \"money\" : {\"amount\":10, \"currency\":\"BGN\"},
    \n        \"description\" : \"10 BGN PAB\",
    \n        \"sourceAccount\" : \"5001000001080652\",
    \n        \"traceId\" : \"zeihwhp-43gs8iwyf7v4h9k\",
    \n        \"bankPayee\": {\n          \"country\": \"BG\",
    \n          \"currency\": \"BGN\",
    \n          \"description\": \"bank payment description\",
    \n          \"fields\": {\n            \"IBAN\": \"BG18RZBB91550123456789\",
    \n            \"BIC\": \"BUINBGSF\",  
    \n            \"CUSTOMER_NAME\": \"Customer Name\",
    \n            \"BANK_NAME\": \"Name of Bank\"\n          }\n        }\n}"
    
    response = http.request(request)
    puts response.read_body
    
    import requests
    
    url = "https://demo.mifinity.com/api/payments/pab"
    
    payload = "{\n        \"money\" : {\"amount\":10, \"currency\":\"BGN\"}, \
    \n        \"description\" : \"10 BGN PAB\", \
    \n        \"sourceAccount\" : \"5001000001080652\", \
    \n        \"traceId\" : \"zeihwhp-43gs8iwyf7v4h9k\", \
    \n        \"bankPayee\": {\n          \"country\": \"BG\", \
    \n          \"currency\": \"BGN\",\n          \"description\": \"bank payment description\", \
    \n          \"fields\": {\n            \"IBAN\": \"BG18RZBB91550123456789\", \
    \n            \"BIC\": \"BUINBGSF\",  \
    \n            \"CUSTOMER_NAME\": \"Customer Name\", \
    \n            \"BANK_NAME\": \"Name of Bank\"\n          }\n        }\n}"
    
    headers = {
        'accept': "application/json",
        'content-type': "application/json",
        'x-api-version': "1",
        'key': "sQO8Q3i5-HeD7F0BqVSIN1p......qnjqMDo8Bl0GKUTvexaVm5n7g"
        }
    
    response = requests.request("POST", url, data=payload, headers=headers)
    
    print(response.text)
    
    curl -X POST \
      https://demo.mifinity.com/api/payments/pab \
      -H 'accept: application/json' \
      -H 'content-type: application/json' \
      -H 'key: sQO8Q3i5-HeD7F0BqVSIN1p......qnjqMDo8Bl0GKUTvexaVm5n7g' \
      -H 'x-api-version: 1' \
      -d '{
            "money" : {"amount":10, "currency":"BGN"},
            "description" : "10 BGN PAB",
            "sourceAccount" : "5001000001080652",
            "traceId" : "zeihwhp-43gs8iwyf7v4h9k",
            "bankPayee": {
              "country": "BG",
              "currency": "BGN",
              "description": "bank payment description",
              "fields": {
                "IBAN": "BG18RZBB91550123456789",
                "BIC": "BUINBGSF",
                "CUSTOMER_NAME": "Customer Name",
                "BANK_NAME": "Name of Bank"
              }
            }
    }'
    
    var data = JSON.stringify({
      "money": {
        "amount": 10,
        "currency": "BGN"
      },
      "description": "10 BGN PAB",
      "sourceAccount": "5001000001080652",
      "traceId": "zeihwhp-43gs8iwyf7v4h9k",
      "bankPayee": {
        "country": "BG",
        "currency": "BGN",
        "description": "bank payment description",
        "fields": {
          "IBAN": "BG18RZBB91550123456789",
          "BIC": "BUINBGSF",
          "CUSTOMER_NAME": "Customer Name",
          "BANK_NAME": "Name of Bank"
        }
      }
    });
    
    var xhr = new XMLHttpRequest();
    xhr.withCredentials = true;
    
    xhr.addEventListener("readystatechange", function () {
      if (this.readyState === 4) {
        console.log(this.responseText);
      }
    });
    
    xhr.open("POST", "https://demo.mifinity.com/api/payments/pab");
    xhr.setRequestHeader("accept", "application/json");
    xhr.setRequestHeader("content-type", "application/json");
    xhr.setRequestHeader("x-api-version", "1");
    xhr.setRequestHeader("key", "sQO8Q3i5-HeD7F0BqVSIN1p......qnjqMDo8Bl0GKUTvexaVm5n7g");
    xhr.send(data);
    
    <?php
    
    $request = new HttpRequest();
    $request->setUrl('https://demo.mifinity.com/api/payments/pab');
    $request->setMethod(HTTP_METH_POST);
    
    $request->setHeaders(array(
      'key' => 'sQO8Q3i5-HeD7F0BqVSIN1p......qnjqMDo8Bl0GKUTvexaVm5n7g',
      'x-api-version' => '1',
      'content-type' => 'application/json',
      'accept' => 'application/json'
    ));
    
    $request->setBody('{
            "money": {
        "amount": 10,
        "currency": "BGN"
      },
      "description": "10 BGN PAB",
      "sourceAccount": "5001000001080652",
      "traceId": "zeihwhp-43gs8iwyf7v4h9k",
      "bankPayee": {
        "country": "BG",
        "currency": "BGN",
        "description": "bank payment description",
        "fields": {
          "IBAN": "BG18RZBB91550123456789",
          "BIC": "BUINBGSF",
          "CUSTOMER_NAME": "Customer Name",
          "BANK_NAME": "Name of Bank"
        }
            }
    }');
    
    try {
      $response = $request->send();
    
      echo $response->getBody();
    } catch (HttpException $ex) {
      echo $ex;
    }
    ?>
    

    Money

    Field Type Required Description
    amount Number Transaction value
    currency String Currency code (ISO 4217): BGN

    BankPayee

    Field Type Required Description
    country String Bank payee country code: BG
    currency String Bank Payee Currency: BGN
    entityId String optional BankPayee unique identification number
    description String optional Any description you want to assign to this operation
    fields Map Map of type String

    fields

    Field Type Required Description
    IBAN String Bank IBAN: Alphanumeric (22)
    BIC String Bank BIC: Alphanumeric (Min 8, Max 11)
    CUSTOMER_NAME String Bank customer name
    BANK_NAME String Bank Name

    Successful response

    {
    
        "payload": [
            {
                "transactionId": "6PX0FjAufQSJ9eEMzjdyuMpFeR4vXI_Ln08rgzdvO-I=",
                "transactionReference": "4c9f3bf3-1c92-4d79-bbf0-b3d85cee2980",
                "traceId": "82595452748399303479",
                "datePosted": "2018-09-24T09:53:52.158Z",
                "sourceMoney": {
                    "amount": 10,
                    "currency": "BGN",
                    "displayable": "BGN10.00"
                },
                "destinationMoney": {
                    "amount": 10,
                    "currency": "BGN",
                    "displayable": "BGN10.00"
                },
                "exchangeRate": 1,
                "totalFees": {
                    "amount": 0,
                    "currency": "BGN",
                    "displayable": "BGN0.00"
                }
            }
        ]
    }
    

    5.2. EUR currency example

    require 'uri'
    require 'net/http'
    
    url = URI("https://demo.mifinity.com/api/payments/pab")
    
    http = Net::HTTP.new(url.host, url.port)
    http.use_ssl = true
    http.verify_mode = OpenSSL::SSL::VERIFY_NONE
    
    request = Net::HTTP::Post.new(url)
    request["accept"] = 'application/json'
    request["content-type"] = 'application/json'
    request["x-api-version"] = '1'
    request["key"] = 'sQO8Q3i5-HeD7F0BqVSIN1p......qnjqMDo8Bl0GKUTvexaVm5n7g'
    request.body = "{\n        \"money\" : {\"amount\":10, \"currency\":\"EUR\"},
    \n        \"description\" : \"10 EUR PAB\",
    \n        \"sourceAccount\" : \"5001000001080652\",
    \n        \"traceId\" : \"zeihwhp-43gs8iwyf7v4h9k\",
    \n        \"bankPayee\": {\n          \"country\": \"BG\",
    \n          \"currency\": \"EUR\",
    \n          \"description\": \"bank payment description\",
    \n          \"fields\": {\n            \"IBAN\": \"BG18RZBB91550123456789\",
    \n            \"BIC\": \"BUINBGSF\",
    \n            \"BENEFICIARY_ADDRESS_COUNTRY_ISO_CODE\": \"BG\",
    \n            \"CUSTOMER_NAME\": \"Customer Name\",
    \n            \"BANK_NAME\": \"Name of Bank\"\n          }\n        }\n}"
    
    response = http.request(request)
    puts response.read_body
    
    import requests
    
    url = "https://demo.mifinity.com/api/payments/pab"
    
    payload = "{\n        \"money\" : {\"amount\":10, \"currency\":\"EUR\"}, \
    \n        \"description\" : \"10 EUR PAB\", \
    \n        \"sourceAccount\" : \"5001000001080652\", \
    \n        \"traceId\" : \"zeihwhp-43gs8iwyf7v4h9k\", \
    \n        \"bankPayee\": {\n          \"country\": \"BG\", \
    \n          \"currency\": \"EUR\", \
    \n          \"description\": \"bank payment description\", \
    \n          \"fields\": {\n            \"IBAN\": \"BG18RZBB91550123456789\", \
    \n            \"BIC\": \"BUINBGSF\", \
     \n            \"BENEFICIARY_ADDRESS_COUNTRY_ISO_CODE\": \"BG\", \
     \n            \"CUSTOMER_NAME\": \"Customer Name\", \
     \n            \"BANK_NAME\": \"Name of Bank\"\n          }\n        }\n}"
    
    headers = {
        'accept': "application/json",
        'content-type': "application/json",
        'x-api-version': "1",
        'key': "sQO8Q3i5-HeD7F0BqVSIN1p......qnjqMDo8Bl0GKUTvexaVm5n7g"
        }
    
    response = requests.request("POST", url, data=payload, headers=headers)
    
    print(response.text)
    
    curl -X POST \
      https://demo.mifinity.com/api/payments/pab \
      -H 'accept: application/json' \
      -H 'content-type: application/json' \
      -H 'key: sQO8Q3i5-HeD7F0BqVSIN1p......qnjqMDo8Bl0GKUTvexaVm5n7g' \
      -H 'x-api-version: 1' \
      -d '{
            "money" : {"amount":10, "currency":"EUR"},
            "description" : "10 EUR PAB",
            "sourceAccount" : "5001000001080652",
            "traceId" : "zeihwhp-43gs8iwyf7v4h9k",
            "bankPayee": {
              "country": "BG",
              "currency": "EUR",
              "description": "bank payment description",
              "fields": {
                "IBAN": "BG18RZBB91550123456789",
                "BIC": "BUINBGSF",
                "BENEFICIARY_ADDRESS_COUNTRY_ISO_CODE":"BG", 
                "CUSTOMER_NAME": "Customer Name",
                "BANK_NAME": "Name of Bank"
              }
            }
    }'
    
    var data = JSON.stringify({
            "money" : {"amount":10, "currency":"EUR"},
            "description" : "10 EUR PAB",
            "sourceAccount" : "5001000001080652",
            "traceId" : "zeihwhp-43gs8iwyf7v4h9k",
            "bankPayee": {
              "country": "BG",
              "currency": "EUR",
              "description": "bank payment description",
              "fields": {
                "IBAN": "BG18RZBB91550123456789",
                "BIC": "BUINBGSF",
                "BENEFICIARY_ADDRESS_COUNTRY_ISO_CODE":"BG", 
                "CUSTOMER_NAME": "Customer Name",
                "BANK_NAME": "Name of Bank"
              }
        }
      }
    });
    
    var xhr = new XMLHttpRequest();
    xhr.withCredentials = true;
    
    xhr.addEventListener("readystatechange", function () {
      if (this.readyState === 4) {
        console.log(this.responseText);
      }
    });
    
    xhr.open("POST", "https://demo.mifinity.com/api/payments/pab");
    xhr.setRequestHeader("accept", "application/json");
    xhr.setRequestHeader("content-type", "application/json");
    xhr.setRequestHeader("x-api-version", "1");
    xhr.setRequestHeader("key", "sQO8Q3i5-HeD7F0BqVSIN1p......qnjqMDo8Bl0GKUTvexaVm5n7g");
    xhr.send(data);
    
    <?php
    
    $request = new HttpRequest();
    $request->setUrl('https://demo.mifinity.com/api/payments/pab');
    $request->setMethod(HTTP_METH_POST);
    
    $request->setHeaders(array(
      'key' => 'sQO8Q3i5-HeD7F0BqVSIN1p......qnjqMDo8Bl0GKUTvexaVm5n7g',
      'x-api-version' => '1',
      'content-type' => 'application/json',
      'accept' => 'application/json'
    ));
    
    $request->setBody('{
            "money" : {"amount":10, "currency":"EUR"},
            "description" : "10 EUR PAB",
            "sourceAccount" : "5001000001080652",
            "traceId" : "zeihwhp-43gs8iwyf7v4h9k",
            "bankPayee": {
              "country": "BG",
              "currency": "EUR",
              "description": "bank payment description",
              "fields": {
                "IBAN": "BG18RZBB91550123456789",
                "BIC": "BUINBGSF",
                "BENEFICIARY_ADDRESS_COUNTRY_ISO_CODE":"BG", 
                "CUSTOMER_NAME": "Customer Name",
                "BANK_NAME": "Name of Bank"
              }
        }
            }
    }');
    
    try {
      $response = $request->send();
    
      echo $response->getBody();
    } catch (HttpException $ex) {
      echo $ex;
    }
    ?>
    

    Money

    Field Type Required Description
    amount Number Transaction value
    currency String Currency code (ISO 4217): EUR

    BankPayee

    Field Type Required Description
    country String Bank payee country code: BG
    currency String Bank Payee Currency: EUR
    entityId String optional BankPayee unique identification number
    description String optional Any description you want to assign to this operation
    fields Map Map of type String

    fields

    Field Type Required Description
    IBAN String Bank IBAN: Alphanumeric (22)
    BIC String Bank BIC: Alphanumeric (Min 8, Max 11)
    CUSTOMER_NAME String Bank customer name
    BANK_NAME String Bank Name
    BENEFICIARY_ADDRESS_COUNTRY_ISO_CODE String Country code

    Successful response

    {
    
        "payload": [
            {
                "transactionId": "6PX0FjAufQSJ9eEMzjdyuMpFeR4vXI_Ln08rgzdvO-I=",
                "transactionReference": "4c9f3bf3-1c92-4d79-bbf0-b3d85cee2980",
                "traceId": "82595452748399303479",
                "datePosted": "2018-09-24T09:53:52.158Z",
                "sourceMoney": {
                    "amount": 10,
                    "currency": "EUR",
                    "displayable": "EUR10.00"
                },
                "destinationMoney": {
                    "amount": 10,
                    "currency": "EUR",
                    "displayable": "EUR10.00"
                },
                "exchangeRate": 1,
                "totalFees": {
                    "amount": 0,
                    "currency": "EUR",
                    "displayable": "EUR0.00"
                }
            }
        ]
    }
    

    6. Brazil

    require 'uri'
    require 'net/http'
    
    url = URI("https://demo.mifinity.com/api/payments/pab")
    
    http = Net::HTTP.new(url.host, url.port)
    http.use_ssl = true
    http.verify_mode = OpenSSL::SSL::VERIFY_NONE
    
    request = Net::HTTP::Post.new(url)
    request["accept"] = 'application/json'
    request["content-type"] = 'application/json'
    request["x-api-version"] = '1'
    request["key"] = 'sQO8Q3i5-HeD7F0BqVSIN1p......qnjqMDo8Bl0GKUTvexaVm5n7g'
    request.body = "{\n        \"money\" : {\"amount\":10, \"currency\":\"BRL\"},
    \n        \"description\" : \"10 BRL PAB\",
    \n        \"sourceAccount\" : \"5001000001080652\",
    \n        \"traceId\" : \"zeihwhp-43gs8iwyf7v4h9k\",
    \n        \"bankPayee\": {\n          \"country\": \"BR\",
    \n          \"currency\": \"BRL\",
    \n          \"description\": \"bank payment description\",
    \n          \"fields\": {\n            \"ACCOUNT_NUMBER\": \"014580605766\",
    \n            \"BRANCH_CODE\": \"12345\",
    \n            \"PERSONAL_ID_NUMBER\": \"12345678901\",
     \n            \"ACCOUNT_TYPE\": \"1\",  
     \n            \"CUSTOMER_NAME\": \"Customer Name\",
     \n            \"BANK_NAME\": \"Name of Bank\"\n          }\n        }\n}"
    
    response = http.request(request)
    puts response.read_body
    
    import requests
    
    url = "https://demo.mifinity.com/api/payments/pab"
    
    payload = "{\n        \"money\" : {\"amount\":10, \"currency\":\"BRL\"}, \
    \n        \"description\" : \"10 BRL PAB\", \
    \n        \"sourceAccount\" : \"5001000001080652\", \
    \n        \"traceId\" : \"zeihwhp-43gs8iwyf7v4h9k\", \
    \n        \"bankPayee\": {\n          \"country\": \"BR\", \
    \n          \"currency\": \"BRL\", \
    \n          \"description\": \"bank payment description\", \
    \n          \"fields\": {\n            \"ACCOUNT_NUMBER\": \"014580605766\", \
    \n            \"BRANCH_CODE\": \"12345\", \
    \n            \"PERSONAL_ID_NUMBER\": \"12345678901\", \
    \n            \"ACCOUNT_TYPE\": \"1\",   \
    \n            \"CUSTOMER_NAME\": \"Customer Name\", \
    \n            \"BANK_NAME\": \"Name of Bank\"\n          }\n        }\n}"
    
    headers = {
        'accept': "application/json",
        'content-type': "application/json",
        'x-api-version': "1",
        'key': "sQO8Q3i5-HeD7F0BqVSIN1p......qnjqMDo8Bl0GKUTvexaVm5n7g"
        }
    
    response = requests.request("POST", url, data=payload, headers=headers)
    
    print(response.text)
    
    curl -X POST \
      https://demo.mifinity.com/api/payments/pab \
      -H 'accept: application/json' \
      -H 'content-type: application/json' \
      -H 'key: sQO8Q3i5-HeD7F0BqVSIN1p......qnjqMDo8Bl0GKUTvexaVm5n7g' \
      -H 'x-api-version: 1' \
      -d '{
            "money" : {"amount":10, "currency":"BRL"},
            "description" : "10 BRL PAB",
            "sourceAccount" : "5001000001080652",
            "traceId" : "zeihwhp-43gs8iwyf7v4h9k",
            "bankPayee": {
              "country": "BR",
              "currency": "BRL",
              "description": "bank payment description",
              "fields": {
                "ACCOUNT_NUMBER": "014580605766",
                "BRANCH_CODE": "12345",
                "PERSONAL_ID_NUMBER": "12345678901",
                "ACCOUNT_TYPE": "1",
                "CUSTOMER_NAME": "Customer Name",
                "BANK_NAME": "Name of Bank"
            }
    }'
    
    var data = JSON.stringify({
      "money": {
        "amount": 10,
        "currency": "BRL"
      },
      "description": "10 BRL PAB",
      "sourceAccount": "5001000001080652",
      "traceId": "zeihwhp-43gs8iwyf7v4h9k",
      "bankPayee": {
        "country": "BR",
        "currency": "BRL",
        "description": "bank payment description",
        "fields": {
         "ACCOUNT_NUMBER": "014580605766",
                "BRANCH_CODE": "12345",
                "PERSONAL_ID_NUMBER": "12345678901",
                "ACCOUNT_TYPE": "1",
                "CUSTOMER_NAME": "Customer Name",
                "BANK_NAME": "Name of Bank"
        }
      }
    });
    
    var xhr = new XMLHttpRequest();
    xhr.withCredentials = true;
    
    xhr.addEventListener("readystatechange", function () {
      if (this.readyState === 4) {
        console.log(this.responseText);
      }
    });
    
    xhr.open("POST", "https://demo.mifinity.com/api/payments/pab");
    xhr.setRequestHeader("accept", "application/json");
    xhr.setRequestHeader("content-type", "application/json");
    xhr.setRequestHeader("x-api-version", "1");
    xhr.setRequestHeader("key", "sQO8Q3i5-HeD7F0BqVSIN1p......qnjqMDo8Bl0GKUTvexaVm5n7g");
    xhr.send(data);
    
    <?php
    
    $request = new HttpRequest();
    $request->setUrl('https://demo.mifinity.com/api/payments/pab');
    $request->setMethod(HTTP_METH_POST);
    
    $request->setHeaders(array(
      'key' => 'sQO8Q3i5-HeD7F0BqVSIN1p......qnjqMDo8Bl0GKUTvexaVm5n7g',
      'x-api-version' => '1',
      'content-type' => 'application/json',
      'accept' => 'application/json'
    ));
    
    $request->setBody('{
            "money": {
        "amount": 10,
        "currency": "BRL"
      },
      "description": "10 BRL PAB",
      "sourceAccount": "5001000001080652",
      "traceId": "zeihwhp-43gs8iwyf7v4h9k",
      "bankPayee": {
        "country": "BR",
        "currency": "BRL",
        "description": "bank payment description",
        "fields": {
               "ACCOUNT_NUMBER": "014580605766",
                "BRANCH_CODE": "12345",
                "PERSONAL_ID_NUMBER": "12345678901",
                "ACCOUNT_TYPE": "1",
                "CUSTOMER_NAME": "Customer Name",
                "BANK_NAME": "Name of Bank"
        }
            }
    }');
    
    try {
      $response = $request->send();
    
      echo $response->getBody();
    } catch (HttpException $ex) {
      echo $ex;
    }
    ?>
    

    Money

    Field Type Required Description
    amount Number Transaction value
    currency String Currency code (ISO 4217): BRL

    BankPayee

    Field Type Required Description
    country String Bank payee country code: BR
    currency String Bank Payee Currency: BRL
    entityId String optional BankPayee unique identification number
    description String optional Any description you want to assign to this operation
    fields Map Map of type String

    fields

    Field Type Required Description
    ACCOUNT_NUMBER String (6 - 12 digits)
    BRANCH_CODE String (4 or 5 digits)
    PERSONAL_ID_NUMBER String CPF: 11 digits, numeric or CPNJ: 13 digits, numeric
    ACCOUNT_TYPE String 0: checking account or 1: savings account
    CUSTOMER_NAME String Bank customer name
    BANK_NAME String Bank Name

    Successful response

    {
    
        "payload": [
            {
                "transactionId": "6PX0FjAufQSJ9eEMzjdyuMpFeR4vXI_Ln08rgzdvO-I=",
                "transactionReference": "4c9f3bf3-1c92-4d79-bbf0-b3d85cee2980",
                "traceId": "82595452748399303479",
                "datePosted": "2018-09-24T09:53:52.158Z",
                "sourceMoney": {
                    "amount": 10,
                    "currency": "BRL",
                    "displayable": "BRL10.00"
                },
                "destinationMoney": {
                    "amount": 10,
                    "currency": "BRL",
                    "displayable": "BRL10.00"
                },
                "exchangeRate": 1,
                "totalFees": {
                    "amount": 0,
                    "currency": "BRL",
                    "displayable": "BRL0.00"
                }
            }
        ]
    }
    

    7. Canada

    require 'uri'
    require 'net/http'
    
    url = URI("https://demo.mifinity.com/api/payments/pab")
    
    http = Net::HTTP.new(url.host, url.port)
    http.use_ssl = true
    http.verify_mode = OpenSSL::SSL::VERIFY_NONE
    
    request = Net::HTTP::Post.new(url)
    request["accept"] = 'application/json'
    request["content-type"] = 'application/json'
    request["x-api-version"] = '1'
    request["key"] = 'sQO8Q3i5-HeD7F0BqVSIN1p......qnjqMDo8Bl0GKUTvexaVm5n7g'
    request.body = "{\n        \"money\" : {\"amount\":10, \"currency\":\"CAD\"},
    \n        \"description\" : \"10 CAD PAB\",
    \n        \"sourceAccount\" : \"5001000001080652\",
    \n        \"traceId\" : \"zeihwhp-43gs8iwyf7v4h9k\",
    \n        \"bankPayee\": {\n          \"country\": \"CA\",
    \n          \"currency\": \"CAD\",
    \n          \"description\": \"bank payment description\",
    \n          \"fields\": {\n            \"ACCOUNT_NUMBER\": \"0145806\",
    \n            \"BANK_CODE\": \"123\", 
    \n            \"BRANCH_CODE\": \"12345\",   
    \n            \"CUSTOMER_NAME\": \"Customer Name\",
    \n            \"BANK_NAME\": \"Name of Bank\"\n          }\n        }\n}"
    
    response = http.request(request)
    puts response.read_body
    
    import requests
    
    url = "https://demo.mifinity.com/api/payments/pab"
    
    payload = "{\n        \"money\" : {\"amount\":10, \"currency\":\"CAD\"}, \
    \n        \"description\" : \"10 CAD PAB\", \
    \n        \"sourceAccount\" : \"5001000001080652\", \
    \n        \"traceId\" : \"zeihwhp-43gs8iwyf7v4h9k\", \
    \n        \"bankPayee\": {\n          \"country\": \"CA\", \
    \n          \"currency\": \"CAD\", \
    \n          \"description\": \"bank payment description\", \
    \n          \"fields\": {\n            \"ACCOUNT_NUMBER\": \"0145806\", \
    \n            \"BANK_CODE\": \"123\", \
    \n            \"BRANCH_CODE\": \"12345\", \
    \n            \"CUSTOMER_NAME\": \"Customer Name\", \
    \n            \"BANK_NAME\": \"Name of Bank\"\n          }\n        }\n}"
    
    headers = {
        'accept': "application/json",
        'content-type': "application/json",
        'x-api-version': "1",
        'key': "sQO8Q3i5-HeD7F0BqVSIN1p......qnjqMDo8Bl0GKUTvexaVm5n7g"
        }
    
    response = requests.request("POST", url, data=payload, headers=headers)
    
    print(response.text)
    
    curl -X POST \
      https://demo.mifinity.com/api/payments/pab \
      -H 'accept: application/json' \
      -H 'content-type: application/json' \
      -H 'key: sQO8Q3i5-HeD7F0BqVSIN1p......qnjqMDo8Bl0GKUTvexaVm5n7g' \
      -H 'x-api-version: 1' \
      -d '{
            "money" : {"amount":10, "currency":"CAD"},
            "description" : "10 CAD PAB",
            "sourceAccount" : "5001000001080652",
            "traceId" : "zeihwhp-43gs8iwyf7v4h9k",
            "bankPayee": {
              "country": "CA",
              "currency": "CAD",
              "description": "bank payment description",
              "fields": {
                 "ACCOUNT_NUMBER": "0145806",
                "BANK_CODE": "123",
                "BRANCH_CODE": "12345",
                "CUSTOMER_NAME": "Customer Name",
                "BANK_NAME": "Name of Bank"
              }
            }
    }'
    
    var data = JSON.stringify({
      "money": {
        "amount": 10,
        "currency": "CAD"
      },
      "description": "10 CAD PAB",
      "sourceAccount": "5001000001080652",
      "traceId": "zeihwhp-43gs8iwyf7v4h9k",
      "bankPayee": {
        "country": "CA",
        "currency": "CAD",
        "description": "bank payment description",
        "fields": {
         "ACCOUNT_NUMBER": "0145806",
                "BANK_CODE": "123",
                "BRANCH_CODE": "12345",
                "CUSTOMER_NAME": "Customer Name",
                "BANK_NAME": "Name of Bank"
        }
      }
    });
    
    var xhr = new XMLHttpRequest();
    xhr.withCredentials = true;
    
    xhr.addEventListener("readystatechange", function () {
      if (this.readyState === 4) {
        console.log(this.responseText);
      }
    });
    
    xhr.open("POST", "https://demo.mifinity.com/api/payments/pab");
    xhr.setRequestHeader("accept", "application/json");
    xhr.setRequestHeader("content-type", "application/json");
    xhr.setRequestHeader("x-api-version", "1");
    xhr.setRequestHeader("key", "sQO8Q3i5-HeD7F0BqVSIN1p......qnjqMDo8Bl0GKUTvexaVm5n7g");
    xhr.send(data);
    
    <?php
    
    $request = new HttpRequest();
    $request->setUrl('https://demo.mifinity.com/api/payments/pab');
    $request->setMethod(HTTP_METH_POST);
    
    $request->setHeaders(array(
      'key' => 'sQO8Q3i5-HeD7F0BqVSIN1p......qnjqMDo8Bl0GKUTvexaVm5n7g',
      'x-api-version' => '1',
      'content-type' => 'application/json',
      'accept' => 'application/json'
    ));
    
    $request->setBody('{
            "money": {
        "amount": 10,
        "currency": "CAD"
      },
      "description": "10 CAD PAB",
      "sourceAccount": "5001000001080652",
      "traceId": "zeihwhp-43gs8iwyf7v4h9k",
      "bankPayee": {
        "country": "CA",
        "currency": "CAD",
        "description": "bank payment description",
        "fields": {
                "ACCOUNT_NUMBER": "0145806",
                "BANK_CODE": "123",
                "BRANCH_CODE": "12345",
                "CUSTOMER_NAME": "Customer Name",
                "BANK_NAME": "Name of Bank"
        }
            }
    }');
    
    try {
      $response = $request->send();
    
      echo $response->getBody();
    } catch (HttpException $ex) {
      echo $ex;
    }
    ?>
    

    Money

    Field Type Required Description
    amount Number Transaction value
    currency String Currency code (ISO 4217): CAD

    BankPayee

    Field Type Required Description
    country String Bank payee country code: CA
    currency String Bank Payee Currency: CAD
    entityId String optional BankPayee unique identification number
    description String optional Any description you want to assign to this operation
    fields Map Map of type String

    fields

    Field Type Required Description
    ACCOUNT_NUMBER String (7 digits)
    BANK_CODE String normally 3 digits
    BRANCH_CODE String normally 5 digits (transit code)
    CUSTOMER_NAME String Bank customer name
    BANK_NAME String Bank Name

    Successful response

    {
    
        "payload": [
            {
                "transactionId": "6PX0FjAufQSJ9eEMzjdyuMpFeR4vXI_Ln08rgzdvO-I=",
                "transactionReference": "4c9f3bf3-1c92-4d79-bbf0-b3d85cee2980",
                "traceId": "82595452748399303479",
                "datePosted": "2018-09-24T09:53:52.158Z",
                "sourceMoney": {
                    "amount": 10,
                    "currency": "CAD",
                    "displayable": "CAD10.00"
                },
                "destinationMoney": {
                    "amount": 10,
                    "currency": "CAD",
                    "displayable": "CAD10.00"
                },
                "exchangeRate": 1,
                "totalFees": {
                    "amount": 0,
                    "currency": "CAD",
                    "displayable": "CAD0.00"
                }
            }
        ]
    }
    

    8. Switzerland

    8.1. CHF currency example

    require 'uri'
    require 'net/http'
    
    url = URI("https://demo.mifinity.com/api/payments/pab")
    
    http = Net::HTTP.new(url.host, url.port)
    http.use_ssl = true
    http.verify_mode = OpenSSL::SSL::VERIFY_NONE
    
    request = Net::HTTP::Post.new(url)
    request["accept"] = 'application/json'
    request["content-type"] = 'application/json'
    request["x-api-version"] = '1'
    request["key"] = 'sQO8Q3i5-HeD7F0BqVSIN1p......qnjqMDo8Bl0GKUTvexaVm5n7g'
    request.body = "{\n        \"money\" : {\"amount\":10, \"currency\":\"CHF\"},
    \n        \"description\" : \"10 CHF PAB\",
    \n        \"sourceAccount\" : \"5001000001080652\",
    \n        \"traceId\" : \"zeihwhp-43gs8iwyf7v4h9k\",
    \n        \"bankPayee\": {\n          \"country\": \"CH\",
    \n          \"currency\": \"CHF\",
    \n          \"description\": \"bank payment description\",
    \n          \"fields\": {\n            \"IBAN\": \"CH5604835012345678009\",
    \n            \"BIC\": \"KBAGCH22\",
    \n            \"CUSTOMER_ADDRESS_1\": \"asdsasadsadsadas\", 
    \n            \"CUSTOMER_CITY\": \"city\", 
    \n            \"BENEFICIARY_ADDRESS_COUNTRY_ISO_CODE\": \"CH\",
     \n            \"CUSTOMER_NAME\": \"Customer Name\",
     \n            \"BANK_NAME\": \"Name of Bank\"\n          }\n        }\n}"
    
    response = http.request(request)
    puts response.read_body
    
    import requests
    
    url = "https://demo.mifinity.com/api/payments/pab"
    
    payload = "{\n        \"money\" : {\"amount\":10, \"currency\":\"CHF\"}, \
    \n        \"description\" : \"10 CHF PAB\", \
    \n        \"sourceAccount\" : \"5001000001080652\", \
    \n        \"traceId\" : \"zeihwhp-43gs8iwyf7v4h9k\", \
    \n        \"bankPayee\": {\n          \"country\": \"CH\", \
    \n          \"currency\": \"CHF\", \
    \n          \"description\": \"bank payment description\", \
    \n          \"fields\": {\n            \"IBAN\": \"CH5604835012345678009\", \
    \n            \"BIC\": \"KBAGCH22\", \
    \n            \"CUSTOMER_ADDRESS_1\": \"asdsasadsadsadas\", \
    \n            \"CUSTOMER_CITY\": \"city\", \
     \n            \"BENEFICIARY_ADDRESS_COUNTRY_ISO_CODE\": \"CH\", \
     \n            \"CUSTOMER_NAME\": \"Customer Name\", \
     \n            \"BANK_NAME\": \"Name of Bank\"\n          }\n        }\n}"
    
    headers = {
        'accept': "application/json",
        'content-type': "application/json",
        'x-api-version': "1",
        'key': "sQO8Q3i5-HeD7F0BqVSIN1p......qnjqMDo8Bl0GKUTvexaVm5n7g"
        }
    
    response = requests.request("POST", url, data=payload, headers=headers)
    
    print(response.text)
    
    curl -X POST \
      https://demo.mifinity.com/api/payments/pab \
      -H 'accept: application/json' \
      -H 'content-type: application/json' \
      -H 'key: sQO8Q3i5-HeD7F0BqVSIN1p......qnjqMDo8Bl0GKUTvexaVm5n7g' \
      -H 'x-api-version: 1' \
      -d '{
            "money" : {"amount":10, "currency":"CHF"},
            "description" : "10 CHF PAB",
            "sourceAccount" : "5001000001080652",
            "traceId" : "zeihwhp-43gs8iwyf7v4h9k",
            "bankPayee": {
              "country": "CH",
              "currency": "CHF",
              "description": "bank payment description",
              "fields": {
                "IBAN": "CH5604835012345678009",
                "BIC": "KBAGCH22",
                 "CUSTOMER_ADDRESS_1": "asdsasadsadsadas",
                "CUSTOMER_CITY": "city",
                "BENEFICIARY_ADDRESS_COUNTRY_ISO_CODE":"CH",
                "CUSTOMER_NAME": "Customer Name",
                "BANK_NAME": "Name of Bank"
              }
            }
    }'
    
    var data = JSON.stringify({
      "money": {
        "amount": 10,
        "currency": "CHF"
      },
      "description": "10 CHF PAB",
      "sourceAccount": "5001000001080652",
      "traceId": "zeihwhp-43gs8iwyf7v4h9k",
      "bankPayee": {
        "country": "CH",
        "currency": "CHF",
        "description": "bank payment description",
        "fields": {
          "IBAN": "CH5604835012345678009",
          "BIC": "KBAGCH22",
          "CUSTOMER_ADDRESS_1": "asdsasadsadsadas",
          "CUSTOMER_CITY": "city",
          "BENEFICIARY_ADDRESS_COUNTRY_ISO_CODE":"CH",
          "CUSTOMER_NAME": "Customer Name",
          "BANK_NAME": "Name of Bank"
        }
      }
    });
    
    var xhr = new XMLHttpRequest();
    xhr.withCredentials = true;
    
    xhr.addEventListener("readystatechange", function () {
      if (this.readyState === 4) {
        console.log(this.responseText);
      }
    });
    
    xhr.open("POST", "https://demo.mifinity.com/api/payments/pab");
    xhr.setRequestHeader("accept", "application/json");
    xhr.setRequestHeader("content-type", "application/json");
    xhr.setRequestHeader("x-api-version", "1");
    xhr.setRequestHeader("key", "sQO8Q3i5-HeD7F0BqVSIN1p......qnjqMDo8Bl0GKUTvexaVm5n7g");
    xhr.send(data);
    
    <?php
    
    $request = new HttpRequest();
    $request->setUrl('https://demo.mifinity.com/api/payments/pab');
    $request->setMethod(HTTP_METH_POST);
    
    $request->setHeaders(array(
      'key' => 'sQO8Q3i5-HeD7F0BqVSIN1p......qnjqMDo8Bl0GKUTvexaVm5n7g',
      'x-api-version' => '1',
      'content-type' => 'application/json',
      'accept' => 'application/json'
    ));
    
    $request->setBody('{
            "money": {
        "amount": 10,
        "currency": "CHF"
      },
      "description": "10 CHF PAB",
      "sourceAccount": "5001000001080652",
      "traceId": "zeihwhp-43gs8iwyf7v4h9k",
      "bankPayee": {
        "country": "CH",
        "currency": "CHF",
        "description": "bank payment description",
        "fields": {
          "IBAN": "CH5604835012345678009",
          "BIC": "KBAGCH22",
          "CUSTOMER_ADDRESS_1": "asdsasadsadsadas",
          "CUSTOMER_CITY": "city",
          "BENEFICIARY_ADDRESS_COUNTRY_ISO_CODE":"CH",
          "CUSTOMER_NAME": "Customer Name",
          "BANK_NAME": "Name of Bank"
        }
            }
    }');
    
    try {
      $response = $request->send();
    
      echo $response->getBody();
    } catch (HttpException $ex) {
      echo $ex;
    }
    ?>
    

    Money

    Field Type Required Description
    amount Number Transaction value
    currency String Currency code (ISO 4217): CHF

    BankPayee

    Field Type Required Description
    country String Bank payee country code: CH
    currency String Bank Payee Currency: CHF
    entityId String optional BankPayee unique identification number
    description String optional Any description you want to assign to this operation
    fields Map Map of type String

    fields

    Field Type Required Description
    IBAN String Bank IBAN: Alphanumeric (21)
    BIC String Bank BIC: Alphanumeric (Min 8, Max 11)
    CUSTOMER_CITY String Alphanumeric (Max 25 characters
    CUSTOMER_ADDRESS_1 String Alphanumeric (Max 25 characters
    CUSTOMER_NAME String Bank customer name
    BANK_NAME String Bank Name
    BENEFICIARY_ADDRESS_COUNTRY_ISO_CODE String Country code

    Successful response

    {
    
        "payload": [
            {
                "transactionId": "6PX0FjAufQSJ9eEMzjdyuMpFeR4vXI_Ln08rgzdvO-I=",
                "transactionReference": "4c9f3bf3-1c92-4d79-bbf0-b3d85cee2980",
                "traceId": "82595452748399303479",
                "datePosted": "2018-09-24T09:53:52.158Z",
                "sourceMoney": {
                    "amount": 10,
                    "currency": "CHF",
                    "displayable": "CHF10.00"
                },
                "destinationMoney": {
                    "amount": 10,
                    "currency": "CHF",
                    "displayable": "CHF10.00"
                },
                "exchangeRate": 1,
                "totalFees": {
                    "amount": 0,
                    "currency": "CHF",
                    "displayable": "CHF0.00"
                }
            }
        ]
    }
    

    8.2. EUR currency example

    require 'uri'
    require 'net/http'
    
    url = URI("https://demo.mifinity.com/api/payments/pab")
    
    http = Net::HTTP.new(url.host, url.port)
    http.use_ssl = true
    http.verify_mode = OpenSSL::SSL::VERIFY_NONE
    
    request = Net::HTTP::Post.new(url)
    request["accept"] = 'application/json'
    request["content-type"] = 'application/json'
    request["x-api-version"] = '1'
    request["key"] = 'sQO8Q3i5-HeD7F0BqVSIN1p......qnjqMDo8Bl0GKUTvexaVm5n7g'
    request.body = "{\n        \"money\" : {\"amount\":10, \"currency\":\"EUR\"},
    \n        \"description\" : \"10 EUR PAB\",
    \n        \"sourceAccount\" : \"5001000001080652\",
    \n        \"traceId\" : \"zeihwhp-43gs8iwyf7v4h9k\",
    \n        \"bankPayee\": {\n          \"country\": \"CH\",
    \n          \"currency\": \"EUR\",
    \n          \"description\": \"bank payment description\",
    \n          \"fields\": {\n            \"IBAN\": \"CH5604835012345678009\",
    \n            \"BIC\": \"KBAGCH22\",
     \n            \"BENEFICIARY_ADDRESS_COUNTRY_ISO_CODE\": \"CH\", 
     \n            \"CUSTOMER_NAME\": \"Customer Name\",
     \n            \"BANK_NAME\": \"Name of Bank\"\n          }\n        }\n}"
    
    response = http.request(request)
    puts response.read_body
    
    import requests
    
    url = "https://demo.mifinity.com/api/payments/pab"
    
    payload = "{\n        \"money\" : {\"amount\":10, \"currency\":\"EUR\"}, \
    \n        \"description\" : \"10 EUR PAB\", \
    \n        \"sourceAccount\" : \"5001000001080652\", \
    \n        \"traceId\" : \"zeihwhp-43gs8iwyf7v4h9k\", \
    \n        \"bankPayee\": {\n          \"country\": \"CH\", \
    \n          \"currency\": \"EUR\", \
    \n          \"description\": \"bank payment description\", \
    \n          \"fields\": {\n            \"IBAN\": \"CH5604835012345678009\", \
    \n            \"BIC\": \"KBAGCH22\", \
     \n            \"BENEFICIARY_ADDRESS_COUNTRY_ISO_CODE\": \"CH\", \
     \n            \"CUSTOMER_NAME\": \"Customer Name\", \
     \n            \"BANK_NAME\": \"Name of Bank\"\n          }\n        }\n}"
    
    headers = {
        'accept': "application/json",
        'content-type': "application/json",
        'x-api-version': "1",
        'key': "sQO8Q3i5-HeD7F0BqVSIN1p......qnjqMDo8Bl0GKUTvexaVm5n7g"
        }
    
    response = requests.request("POST", url, data=payload, headers=headers)
    
    print(response.text)
    
    curl -X POST \
      https://demo.mifinity.com/api/payments/pab \
      -H 'accept: application/json' \
      -H 'content-type: application/json' \
      -H 'key: sQO8Q3i5-HeD7F0BqVSIN1p......qnjqMDo8Bl0GKUTvexaVm5n7g' \
      -H 'x-api-version: 1' \
      -d '{
            "money" : {"amount":10, "currency":"EUR"},
            "description" : "10 EUR PAB",
            "sourceAccount" : "5001000001080652",
            "traceId" : "zeihwhp-43gs8iwyf7v4h9k",
            "bankPayee": {
              "country": "CH",
              "currency": "EUR",
              "description": "bank payment description",
              "fields": {
                "IBAN": "CH5604835012345678009",
                "BIC": "KBAGCH22",
                "BENEFICIARY_ADDRESS_COUNTRY_ISO_CODE":"CH",
                "CUSTOMER_NAME": "Customer Name",
                "BANK_NAME": "Name of Bank"
              }
            }
    }'
    
    var data = JSON.stringify({
      "money": {
        "amount": 10,
        "currency": "EUR"
      },
      "description": "10 EUR PAB",
      "sourceAccount": "5001000001080652",
      "traceId": "zeihwhp-43gs8iwyf7v4h9k",
      "bankPayee": {
        "country": "CH",
        "currency": "EUR",
        "description": "bank payment description",
        "fields": {
          "IBAN": "CH5604835012345678009",
          "BIC": "KBAGCH22",
          "BENEFICIARY_ADDRESS_COUNTRY_ISO_CODE":"CH",
          "CUSTOMER_NAME": "Customer Name",
          "BANK_NAME": "Name of Bank"
        }
      }
    });
    
    var xhr = new XMLHttpRequest();
    xhr.withCredentials = true;
    
    xhr.addEventListener("readystatechange", function () {
      if (this.readyState === 4) {
        console.log(this.responseText);
      }
    });
    
    xhr.open("POST", "https://demo.mifinity.com/api/payments/pab");
    xhr.setRequestHeader("accept", "application/json");
    xhr.setRequestHeader("content-type", "application/json");
    xhr.setRequestHeader("x-api-version", "1");
    xhr.setRequestHeader("key", "sQO8Q3i5-HeD7F0BqVSIN1p......qnjqMDo8Bl0GKUTvexaVm5n7g");
    xhr.send(data);
    
    <?php
    
    $request = new HttpRequest();
    $request->setUrl('https://demo.mifinity.com/api/payments/pab');
    $request->setMethod(HTTP_METH_POST);
    
    $request->setHeaders(array(
      'key' => 'sQO8Q3i5-HeD7F0BqVSIN1p......qnjqMDo8Bl0GKUTvexaVm5n7g',
      'x-api-version' => '1',
      'content-type' => 'application/json',
      'accept' => 'application/json'
    ));
    
    $request->setBody('{
            "money": {
        "amount": 10,
        "currency": "EUR"
      },
      "description": "10 EUR PAB",
      "sourceAccount": "5001000001080652",
      "traceId": "zeihwhp-43gs8iwyf7v4h9k",
      "bankPayee": {
        "country": "CH",
        "currency": "EUR",
        "description": "bank payment description",
        "fields": {
          "IBAN": "CH5604835012345678009",
          "BIC": "KBAGCH22",
          "BENEFICIARY_ADDRESS_COUNTRY_ISO_CODE":"CH",
          "CUSTOMER_NAME": "Customer Name",
          "BANK_NAME": "Name of Bank"
        }
            }
    }');
    
    try {
      $response = $request->send();
    
      echo $response->getBody();
    } catch (HttpException $ex) {
      echo $ex;
    }
    ?>
    

    Money

    Field Type Required Description
    amount Number Transaction value
    currency String Currency code (ISO 4217): EUR

    BankPayee

    Field Type Required Description
    country String Bank payee country code: CH
    currency String Bank Payee Currency: EUR
    entityId String optional BankPayee unique identification number
    description String optional Any description you want to assign to this operation
    fields Map Map of type String

    fields

    Field Type Required Description
    IBAN String Bank IBAN: Alphanumeric (21)
    BIC String Bank BIC: Alphanumeric (Min 8, Max 11)
    CUSTOMER_NAME String Bank customer name
    BANK_NAME String Bank Name
    BENEFICIARY_ADDRESS_COUNTRY_ISO_CODE String Country code

    Successful response

    {
    
        "payload": [
            {
                "transactionId": "6PX0FjAufQSJ9eEMzjdyuMpFeR4vXI_Ln08rgzdvO-I=",
                "transactionReference": "4c9f3bf3-1c92-4d79-bbf0-b3d85cee2980",
                "traceId": "82595452748399303479",
                "datePosted": "2018-09-24T09:53:52.158Z",
                "sourceMoney": {
                    "amount": 10,
                    "currency": "EUR",
                    "displayable": "EUR10.00"
                },
                "destinationMoney": {
                    "amount": 10,
                    "currency": "EUR",
                    "displayable": "EUR10.00"
                },
                "exchangeRate": 1,
                "totalFees": {
                    "amount": 0,
                    "currency": "EUR",
                    "displayable": "EUR0.00"
                }
            }
        ]
    }
    

    9. Chile

    require 'uri'
    require 'net/http'
    
    url = URI("https://demo.mifinity.com/api/payments/pab")
    
    http = Net::HTTP.new(url.host, url.port)
    http.use_ssl = true
    http.verify_mode = OpenSSL::SSL::VERIFY_NONE
    
    request = Net::HTTP::Post.new(url)
    request["accept"] = 'application/json'
    request["content-type"] = 'application/json'
    request["x-api-version"] = '1'
    request["key"] = 'sQO8Q3i5-HeD7F0BqVSIN1p......qnjqMDo8Bl0GKUTvexaVm5n7g'
    request.body = "{\n        \"money\" : {\"amount\":10, \"currency\":\"CLP\"},
    \n        \"description\" : \"10 CLP PAB\",
    \n        \"sourceAccount\" : \"5001000001080652\",
    \n        \"traceId\" : \"zeihwhp-43gs8iwyf7v4h9k\",
    \n        \"bankPayee\": {\n          \"country\": \"CL\",
    \n          \"currency\": \"CLP\",
    \n          \"description\": \"bank payment description\",
    \n          \"fields\": {\n            \"ACCOUNT_NUMBER\": \"0145806057668124\",
    \n            \"PERSONAL_ID_NUMBER\": \"12345678\", 
    \n            \"ACCOUNT_TYPE\": \"1\", 
    \n            \"CUSTOMER_NAME\": \"Customer Name\",
    \n            \"BANK_NAME\": \"Name of Bank\"\n          }\n       }\n}"
    
    response = http.request(request)
    puts response.read_body
    
    import requests
    
    url = "https://demo.mifinity.com/api/payments/pab"
    
    payload = "{\n        \"money\" : {\"amount\":10, \"currency\":\"CLP\"}, \
    \n        \"description\" : \"10 CLP PAB\", \
    \n        \"sourceAccount\" : \"5001000001080652\", \
    \n        \"traceId\" : \"zeihwhp-43gs8iwyf7v4h9k\", \
    \n        \"bankPayee\": {\n          \"country\": \"CL\", \
    \n          \"currency\": \"CLP\", \
    \n          \"description\": \"bank payment description\", \
    \n          \"fields\": {\n            \"ACCOUNT_NUMBER\": \"0145806057668124\", \
    \n            \"PERSONAL_ID_NUMBER\": \"12345678\", \
    \n            \"ACCOUNT_TYPE\": \"1\",  \
    \n            \"CUSTOMER_NAME\": \"Customer Name\", \
    \n            \"BANK_NAME\": \"Name of Bank\"\n          }\n       }\n}"
    
    headers = {
        'accept': "application/json",
        'content-type': "application/json",
        'x-api-version': "1",
        'key': "sQO8Q3i5-HeD7F0BqVSIN1p......qnjqMDo8Bl0GKUTvexaVm5n7g"
        }
    
    response = requests.request("POST", url, data=payload, headers=headers)
    
    print(response.text)
    
    curl -X POST \
      https://demo.mifinity.com/api/payments/pab \
      -H 'accept: application/json' \
      -H 'content-type: application/json' \
      -H 'key: sQO8Q3i5-HeD7F0BqVSIN1p......qnjqMDo8Bl0GKUTvexaVm5n7g' \
      -H 'x-api-version: 1' \
      -d '{
            "money" : {"amount":10, "currency":"CLP"},
            "description" : "10 CLP PAB",
            "sourceAccount" : "5001000001080652",
            "traceId" : "zeihwhp-43gs8iwyf7v4h9k",
            "bankPayee": {
              "country": "CL",
              "currency": "CLP",
              "description": "bank payment description",
              "fields": {
                "ACCOUNT_NUMBER": "0145806057668124",
                "PERSONAL_ID_NUMBER": "12345678",
                "ACCOUNT_TYPE": "1",
                "CUSTOMER_NAME": "Customer Name",
                "BANK_NAME": "Name of Bank"
              }
            }
    }'
    
    var data = JSON.stringify({
       "money" : {"amount":10, "currency":"CLP"},
            "description" : "10 CLP PAB",
            "sourceAccount" : "5001000001080652",
            "traceId" : "zeihwhp-43gs8iwyf7v4h9k",
            "bankPayee": {
              "country": "CL",
              "currency": "CLP",
              "description": "bank payment description",
              "fields": {
                "ACCOUNT_NUMBER": "0145806057668124",
                "PERSONAL_ID_NUMBER": "12345678",
                "ACCOUNT_TYPE": "1",
                "CUSTOMER_NAME": "Customer Name",
                "BANK_NAME": "Name of Bank"
              }
      }
    });
    
    var xhr = new XMLHttpRequest();
    xhr.withCredentials = true;
    
    xhr.addEventListener("readystatechange", function () {
      if (this.readyState === 4) {
        console.log(this.responseText);
      }
    });
    
    xhr.open("POST", "https://demo.mifinity.com/api/payments/pab");
    xhr.setRequestHeader("accept", "application/json");
    xhr.setRequestHeader("content-type", "application/json");
    xhr.setRequestHeader("x-api-version", "1");
    xhr.setRequestHeader("key", "sQO8Q3i5-HeD7F0BqVSIN1p......qnjqMDo8Bl0GKUTvexaVm5n7g");
    xhr.send(data);
    
    <?php
    
    $request = new HttpRequest();
    $request->setUrl('https://demo.mifinity.com/api/payments/pab');
    $request->setMethod(HTTP_METH_POST);
    
    $request->setHeaders(array(
      'key' => 'sQO8Q3i5-HeD7F0BqVSIN1p......qnjqMDo8Bl0GKUTvexaVm5n7g',
      'x-api-version' => '1',
      'content-type' => 'application/json',
      'accept' => 'application/json'
    ));
    
    $request->setBody('{
            "money" : {"amount":10, "currency":"CLP"},
            "description" : "10 CLP PAB",
            "sourceAccount" : "5001000001080652",
            "traceId" : "zeihwhp-43gs8iwyf7v4h9k",
            "bankPayee": {
              "country": "CL",
              "currency": "CLP",
              "description": "bank payment description",
              "fields": {
                "ACCOUNT_NUMBER": "0145806057668124",
                "PERSONAL_ID_NUMBER": "12345678",
                "ACCOUNT_TYPE": "1",
                "CUSTOMER_NAME": "Customer Name",
                "BANK_NAME": "Name of Bank"
              }
            }
    }');
    
    try {
      $response = $request->send();
    
      echo $response->getBody();
    } catch (HttpException $ex) {
      echo $ex;
    }
    ?>
    

    Money

    Field Type Required Description
    amount Number Transaction value
    currency String Currency code (ISO 4217): CLP

    BankPayee

    Field Type Required Description
    country String Bank payee country code: CL
    currency String Bank Payee Currency: CLP
    entityId String optional BankPayee unique identification number
    description String optional Any description you want to assign to this operation
    fields Map Map of type String

    fields

    Field Type Required Description
    ACCOUNT_NUMBER String (4-16 digits)
    PERSONAL_ID_NUMBER String RUT: 8 or 9 alphanumeric characters
    ACCOUNT_TYPE String 0: checking account or 1: savings account
    CUSTOMER_NAME String Bank customer name
    BANK_NAME String Bank Name

    Successful response

    {
    
        "payload": [
            {
                "transactionId": "6PX0FjAufQSJ9eEMzjdyuMpFeR4vXI_Ln08rgzdvO-I=",
                "transactionReference": "4c9f3bf3-1c92-4d79-bbf0-b3d85cee2980",
                "traceId": "82595452748399303479",
                "datePosted": "2018-09-24T09:53:52.158Z",
                "sourceMoney": {
                    "amount": 10,
                    "currency": "CLP",
                    "displayable": "CLP10.00"
                },
                "destinationMoney": {
                    "amount": 10,
                    "currency": "CLP",
                    "displayable": "CLP10.00"
                },
                "exchangeRate": 1,
                "totalFees": {
                    "amount": 0,
                    "currency": "CLP",
                    "displayable": "CLP0.00"
                }
            }
        ]
    }
    

    10. Colombia

    require 'uri'
    require 'net/http'
    
    url = URI("https://demo.mifinity.com/api/payments/pab")
    
    http = Net::HTTP.new(url.host, url.port)
    http.use_ssl = true
    http.verify_mode = OpenSSL::SSL::VERIFY_NONE
    
    request = Net::HTTP::Post.new(url)
    request["accept"] = 'application/json'
    request["content-type"] = 'application/json'
    request["x-api-version"] = '1'
    request["key"] = 'sQO8Q3i5-HeD7F0BqVSIN1p......qnjqMDo8Bl0GKUTvexaVm5n7g'
    request.body = "{\n        \"money\" : {\"amount\":10, \"currency\":\"COP\"},
    \n        \"description\" : \"10 COP PAB\",
    \n        \"sourceAccount\" : \"5001000001080652\",
    \n        \"traceId\" : \"zeihwhp-43gs8iwyf7v4h9k\",
    \n        \"bankPayee\": {\n          \"country\": \"CO\",
    \n          \"currency\": \"COP\",
    \n          \"description\": \"bank payment description\",
    \n          \"fields\": {\n            \"ACCOUNT_NUMBER\": \"014580605766\",
    \n            \"PERSONAL_ID_NUMBER\": \"12345678\", 
    \n            \"ACCOUNT_TYPE\": \"1\",  
    \n            \"CUSTOMER_NAME\": \"Customer Name\",
    \n            \"BANK_NAME\": \"Name of Bank\"\n          }\n      }\n}"
    
    response = http.request(request)
    puts response.read_body
    
    import requests
    
    url = "https://demo.mifinity.com/api/payments/pab"
    
    payload = "{\n        \"money\" : {\"amount\":10, \"currency\":\"COP\"}, \
    \n        \"description\" : \"10 COP PAB\", \
    \n        \"sourceAccount\" : \"5001000001080652\", \
    \n        \"traceId\" : \"zeihwhp-43gs8iwyf7v4h9k\", \
    \n        \"bankPayee\": {\n          \"country\": \"CO\", \
    \n          \"currency\": \"COP\", \
    \n          \"description\": \"bank payment description\", \
    \n          \"fields\":  {\n            \"ACCOUNT_NUMBER\": \"014580605766\", \
    \n            \"PERSONAL_ID_NUMBER\": \"12345678\", \
    \n            \"ACCOUNT_TYPE\": \"1\", \
     \n            \"CUSTOMER_NAME\": \"Customer Name\", \
     \n            \"BANK_NAME\": \"Name of Bank\"\n          }\n       }\n}"
    
    headers = {
        'accept': "application/json",
        'content-type': "application/json",
        'x-api-version': "1",
        'key': "sQO8Q3i5-HeD7F0BqVSIN1p......qnjqMDo8Bl0GKUTvexaVm5n7g"
        }
    
    response = requests.request("POST", url, data=payload, headers=headers)
    
    print(response.text)
    
    curl -X POST \
      https://demo.mifinity.com/api/payments/pab \
      -H 'accept: application/json' \
      -H 'content-type: application/json' \
      -H 'key: sQO8Q3i5-HeD7F0BqVSIN1p......qnjqMDo8Bl0GKUTvexaVm5n7g' \
      -H 'x-api-version: 1' \
      -d '{
            "money" : {"amount":10, "currency":"COP"},
            "description" : "10 COP PAB",
            "sourceAccount" : "5001000001080652",
            "traceId" : "zeihwhp-43gs8iwyf7v4h9k",
            "bankPayee": {
              "country": "CO",
              "currency": "COP",
              "description": "bank payment description",
              "fields": {
                "ACCOUNT_NUMBER": "014580605766",
                "PERSONAL_ID_NUMBER": "12345678",
                "ACCOUNT_TYPE": "1",
                "CUSTOMER_NAME": "Customer Name",
                "BANK_NAME": "Name of Bank"
              }
            }
    }'
    
    var data = JSON.stringify({
      "money" : {"amount":10, "currency":"COP"},
            "description" : "10 COP PAB",
            "sourceAccount" : "5001000001080652",
            "traceId" : "zeihwhp-43gs8iwyf7v4h9k",
            "bankPayee": {
              "country": "CO",
              "currency": "COP",
              "description": "bank payment description",
              "fields": {
                 "ACCOUNT_NUMBER": "014580605766",
                "PERSONAL_ID_NUMBER": "12345678",
                "ACCOUNT_TYPE": "1",
                "CUSTOMER_NAME": "Customer Name",
                "BANK_NAME": "Name of Bank"
              }
      }
    });
    
    var xhr = new XMLHttpRequest();
    xhr.withCredentials = true;
    
    xhr.addEventListener("readystatechange", function () {
      if (this.readyState === 4) {
        console.log(this.responseText);
      }
    });
    
    xhr.open("POST", "https://demo.mifinity.com/api/payments/pab");
    xhr.setRequestHeader("accept", "application/json");
    xhr.setRequestHeader("content-type", "application/json");
    xhr.setRequestHeader("x-api-version", "1");
    xhr.setRequestHeader("key", "sQO8Q3i5-HeD7F0BqVSIN1p......qnjqMDo8Bl0GKUTvexaVm5n7g");
    xhr.send(data);
    
    <?php
    
    $request = new HttpRequest();
    $request->setUrl('https://demo.mifinity.com/api/payments/pab');
    $request->setMethod(HTTP_METH_POST);
    
    $request->setHeaders(array(
      'key' => 'sQO8Q3i5-HeD7F0BqVSIN1p......qnjqMDo8Bl0GKUTvexaVm5n7g',
      'x-api-version' => '1',
      'content-type' => 'application/json',
      'accept' => 'application/json'
    ));
    
    $request->setBody('{
            "money" : {"amount":10, "currency":"COP"},
            "description" : "10 COP PAB",
            "sourceAccount" : "5001000001080652",
            "traceId" : "zeihwhp-43gs8iwyf7v4h9k",
            "bankPayee": {
              "country": "CO",
              "currency": "COP",
              "description": "bank payment description",
              "fields": {
                "ACCOUNT_NUMBER": "014580605766",
                "PERSONAL_ID_NUMBER": "12345678",
                "ACCOUNT_TYPE": "1",
                "CUSTOMER_NAME": "Customer Name",
                "BANK_NAME": "Name of Bank"
              }
            }
    }');
    
    try {
      $response = $request->send();
    
      echo $response->getBody();
    } catch (HttpException $ex) {
      echo $ex;
    }
    ?>
    

    Money

    Field Type Required Description
    amount Number Transaction value
    currency String Currency code (ISO 4217): COP

    BankPayee

    Field Type Required Description
    country String Bank payee country code: CO
    currency String Bank Payee Currency: COP
    entityId String optional BankPayee unique identification number
    description String optional Any description you want to assign to this operation
    fields Map Map of type String

    fields

    Field Type Required Description
    ACCOUNT_NUMBER String (8-12 digits)
    PERSONAL_ID_NUMBER String Cedula de Ciudadania "CC": 8 - 10 digits, numeric
    ACCOUNT_TYPE String 0: checking account or 1: savings account
    CUSTOMER_NAME String Bank customer name
    BANK_NAME String Bank Name

    Successful response

    {
    
        "payload": [
            {
                "transactionId": "6PX0FjAufQSJ9eEMzjdyuMpFeR4vXI_Ln08rgzdvO-I=",
                "transactionReference": "4c9f3bf3-1c92-4d79-bbf0-b3d85cee2980",
                "traceId": "82595452748399303479",
                "datePosted": "2018-09-24T09:53:52.158Z",
                "sourceMoney": {
                    "amount": 10,
                    "currency": "COP",
                    "displayable": "COP10.00"
                },
                "destinationMoney": {
                    "amount": 10,
                    "currency": "COP",
                    "displayable": "COP10.00"
                },
                "exchangeRate": 1,
                "totalFees": {
                    "amount": 0,
                    "currency": "COP",
                    "displayable": "COP0.00"
                }
            }
        ]
    }
    

    11. Costa Rica

    require 'uri'
    require 'net/http'
    
    url = URI("https://demo.mifinity.com/api/payments/pab")
    
    http = Net::HTTP.new(url.host, url.port)
    http.use_ssl = true
    http.verify_mode = OpenSSL::SSL::VERIFY_NONE
    
    request = Net::HTTP::Post.new(url)
    request["accept"] = 'application/json'
    request["content-type"] = 'application/json'
    request["x-api-version"] = '1'
    request["key"] = 'sQO8Q3i5-HeD7F0BqVSIN1p......qnjqMDo8Bl0GKUTvexaVm5n7g'
    request.body = "{\n        \"money\" : {\"amount\":10, \"currency\":\"CRC\"},
    \n        \"description\" : \"10 CRC PAB\",
    \n        \"sourceAccount\" : \"5001000001080652\",
    \n        \"traceId\" : \"zeihwhp-43gs8iwyf7v4h9k\",
    \n        \"bankPayee\": {\n          \"country\": \"CR\",
    \n          \"currency\": \"CRC\",
    \n          \"description\": \"bank payment description\",
    \n          \"fields\": {\n            \"ACCOUNT_NUMBER\": \"01458060576681200\",
    \n            \"PERSONAL_ID_NUMBER\": \"123456789\",
     \n            \"ACCOUNT_TYPE\": \"1\",  
      \n            \"CUSTOMER_NAME\": \"Customer Name\",
      \n            \"BANK_NAME\": \"Name of Bank\"\n          }\n        }\n}"
    
    response = http.request(request)
    puts response.read_body
    
    import requests
    
    url = "https://demo.mifinity.com/api/payments/pab"
    
    payload = "{\n        \"money\" : {\"amount\":10, \"currency\":\"CRC\"}, \
    \n        \"description\" : \"10 CRC PAB\", \
    \n        \"sourceAccount\" : \"5001000001080652\", \
    \n        \"traceId\" : \"zeihwhp-43gs8iwyf7v4h9k\", \
    \n        \"bankPayee\": {\n          \"country\": \"CR\", \
    \n          \"currency\": \"CRC\", \
    \n          \"description\": \"bank payment description\", \
    \n          \"fields\": {\n            \"ACCOUNT_NUMBER\": \"01458060576681200\", \
    \n            \"PERSONAL_ID_NUMBER\": \"123456789\", \
    \n            \"ACCOUNT_TYPE\": \"1\",  \
    \n            \"CUSTOMER_NAME\": \"Customer Name\", \
    \n            \"BANK_NAME\": \"Name of Bank\"\n          }\n        }\n}"
    
    headers = {
        'accept': "application/json",
        'content-type': "application/json",
        'x-api-version': "1",
        'key': "sQO8Q3i5-HeD7F0BqVSIN1p......qnjqMDo8Bl0GKUTvexaVm5n7g"
        }
    
    response = requests.request("POST", url, data=payload, headers=headers)
    
    print(response.text)
    
    curl -X POST \
      https://demo.mifinity.com/api/payments/pab \
      -H 'accept: application/json' \
      -H 'content-type: application/json' \
      -H 'key: sQO8Q3i5-HeD7F0BqVSIN1p......qnjqMDo8Bl0GKUTvexaVm5n7g' \
      -H 'x-api-version: 1' \
      -d '{
            "money" : {"amount":10, "currency":"CRC"},
            "description" : "10 CRC PAB",
            "sourceAccount" : "5001000001080652",
            "traceId" : "zeihwhp-43gs8iwyf7v4h9k",
            "bankPayee": {
              "country": "CR",
              "currency": "CRC",
              "description": "bank payment description",
              "fields": {
                 "ACCOUNT_NUMBER": "01458060576681200",
                "PERSONAL_ID_NUMBER": "123456789",
                "ACCOUNT_TYPE": "1",
                "CUSTOMER_NAME": "Customer Name",
                "BANK_NAME": "Name of Bank"
              }
            }
    }'
    
    var data = JSON.stringify({
       "money" : {"amount":10, "currency":"CRC"},
            "description" : "10 CRC PAB",
            "sourceAccount" : "5001000001080652",
            "traceId" : "zeihwhp-43gs8iwyf7v4h9k",
            "bankPayee": {
              "country": "CR",
              "currency": "CRC",
              "description": "bank payment description",
              "fields": {
                "ACCOUNT_NUMBER": "01458060576681200",
                "PERSONAL_ID_NUMBER": "123456789",
                "ACCOUNT_TYPE": "1",
                "CUSTOMER_NAME": "Customer Name",
                "BANK_NAME": "Name of Bank"
              }
      }
    });
    
    var xhr = new XMLHttpRequest();
    xhr.withCredentials = true;
    
    xhr.addEventListener("readystatechange", function () {
      if (this.readyState === 4) {
        console.log(this.responseText);
      }
    });
    
    xhr.open("POST", "https://demo.mifinity.com/api/payments/pab");
    xhr.setRequestHeader("accept", "application/json");
    xhr.setRequestHeader("content-type", "application/json");
    xhr.setRequestHeader("x-api-version", "1");
    xhr.setRequestHeader("key", "sQO8Q3i5-HeD7F0BqVSIN1p......qnjqMDo8Bl0GKUTvexaVm5n7g");
    xhr.send(data);
    
    <?php
    
    $request = new HttpRequest();
    $request->setUrl('https://demo.mifinity.com/api/payments/pab');
    $request->setMethod(HTTP_METH_POST);
    
    $request->setHeaders(array(
      'key' => 'sQO8Q3i5-HeD7F0BqVSIN1p......qnjqMDo8Bl0GKUTvexaVm5n7g',
      'x-api-version' => '1',
      'content-type' => 'application/json',
      'accept' => 'application/json'
    ));
    
    $request->setBody('{
            "money" : {"amount":10, "currency":"CRC"},
            "description" : "10 CRC PAB",
            "sourceAccount" : "5001000001080652",
            "traceId" : "zeihwhp-43gs8iwyf7v4h9k",
            "bankPayee": {
              "country": "CR",
              "currency": "CRC",
              "description": "bank payment description",
              "fields": {
                 "ACCOUNT_NUMBER": "01458060576681200",
                "PERSONAL_ID_NUMBER": "123456789",
                "ACCOUNT_TYPE": "1",
                "CUSTOMER_NAME": "Customer Name",
                "BANK_NAME": "Name of Bank"
              }
            }
    }');
    
    try {
      $response = $request->send();
    
      echo $response->getBody();
    } catch (HttpException $ex) {
      echo $ex;
    }
    ?>
    

    Money

    Field Type Required Description
    amount Number Transaction value
    currency String Currency code (ISO 4217): CRC

    BankPayee

    Field Type Required Description
    country String Bank payee country code: CR
    currency String Bank Payee Currency: CRC
    entityId String optional BankPayee unique identification number
    description String optional Any description you want to assign to this operation
    fields Map Map of type String

    fields

    Field Type Required Description
    ACCOUNT_NUMBER String 17 digits local account number (SINPE)
    PERSONAL_ID_NUMBER String Cedula de Identidad: 9-10 digits, numeric
    ACCOUNT_TYPE String 0: checking account or 1: savings account
    CUSTOMER_NAME String Bank customer name
    BANK_NAME String Bank Name

    Successful response

    {
    
        "payload": [
            {
                "transactionId": "6PX0FjAufQSJ9eEMzjdyuMpFeR4vXI_Ln08rgzdvO-I=",
                "transactionReference": "4c9f3bf3-1c92-4d79-bbf0-b3d85cee2980",
                "traceId": "82595452748399303479",
                "datePosted": "2018-09-24T09:53:52.158Z",
                "sourceMoney": {
                    "amount": 10,
                    "currency": "CRC",
                    "displayable": "CRCP10.00"
                },
                "destinationMoney": {
                    "amount": 10,
                    "currency": "CRC",
                    "displayable": "CRCP10.00"
                },
                "exchangeRate": 1,
                "totalFees": {
                    "amount": 0,
                    "currency": "CRC",
                    "displayable": "CRC0.00"
                }
            }
        ]
    }
    

    12. Cyprus

    require 'uri'
    require 'net/http'
    
    url = URI("https://demo.mifinity.com/api/payments/pab")
    
    http = Net::HTTP.new(url.host, url.port)
    http.use_ssl = true
    http.verify_mode = OpenSSL::SSL::VERIFY_NONE
    
    request = Net::HTTP::Post.new(url)
    request["accept"] = 'application/json'
    request["content-type"] = 'application/json'
    request["x-api-version"] = '1'
    request["key"] = 'sQO8Q3i5-HeD7F0BqVSIN1p......qnjqMDo8Bl0GKUTvexaVm5n7g'
    request.body = "{\n        \"money\" : {\"amount\":10, \"currency\":\"EUR\"},
    \n        \"description\" : \"10 EUR PAB\",
    \n        \"sourceAccount\" : \"5001000001080652\",
    \n        \"traceId\" : \"zeihwhp-43gs8iwyf7v4h9k\",
    \n        \"bankPayee\": {\n          \"country\": \"CY\",
    \n          \"currency\": \"EUR\",
    \n          \"description\": \"bank payment description\",
    \n          \"fields\": {\n            \"IBAN\": \"CY21002001950000357001234567\",
    \n            \"BIC\": \"ALFACY2N\", 
    \n            \"BENEFICIARY_ADDRESS_COUNTRY_ISO_CODE\": \"CY\", 
    \n            \"CUSTOMER_NAME\": \"Customer Name\",
    \n            \"BANK_NAME\": \"Name of Bank\"\n          }\n        }\n}"
    
    response = http.request(request)
    puts response.read_body
    
    import requests
    
    url = "https://demo.mifinity.com/api/payments/pab"
    
    payload = "{\n        \"money\" : {\"amount\":10, \"currency\":\"EUR\"}, \
    \n        \"description\" : \"10 EUR PAB\", \
    \n        \"sourceAccount\" : \"5001000001080652\", \
    \n        \"traceId\" : \"zeihwhp-43gs8iwyf7v4h9k\", \
    \n        \"bankPayee\": {\n          \"country\": \"CY\", \
    \n          \"currency\": \"EUR\", \
    \n          \"description\": \"bank payment description\", \
    \n          \"fields\": {\n            \"IBAN\": \"CY21002001950000357001234567\", \
    \n            \"BIC\": \"ALFACY2N\", \
    \n            \"BENEFICIARY_ADDRESS_COUNTRY_ISO_CODE\": \"CY\", \
    \n            \"CUSTOMER_NAME\": \"Customer Name\", \
    \n            \"BANK_NAME\": \"Name of Bank\"\n          }\n        }\n}"
    
    headers = {
        'accept': "application/json",
        'content-type': "application/json",
        'x-api-version': "1",
        'key': "sQO8Q3i5-HeD7F0BqVSIN1p......qnjqMDo8Bl0GKUTvexaVm5n7g"
        }
    
    response = requests.request("POST", url, data=payload, headers=headers)
    
    print(response.text)
    
    curl -X POST \
      https://demo.mifinity.com/api/payments/pab \
      -H 'accept: application/json' \
      -H 'content-type: application/json' \
      -H 'key: sQO8Q3i5-HeD7F0BqVSIN1p......qnjqMDo8Bl0GKUTvexaVm5n7g' \
      -H 'x-api-version: 1' \
      -d '{
            "money" : {"amount":10, "currency":"EUR"},
            "description" : "10 EUR PAB",
            "sourceAccount" : "5001000001080652",
            "traceId" : "zeihwhp-43gs8iwyf7v4h9k",
            "bankPayee": {
              "country": "CY",
              "currency": "EUR",
              "description": "bank payment description",
              "fields": {
                "IBAN": "CY21002001950000357001234567",
                "BIC": "ALFACY2N",
                "BENEFICIARY_ADDRESS_COUNTRY_ISO_CODE":"CY",
                "CUSTOMER_NAME": "Customer Name",
                "BANK_NAME": "Name of Bank"
              }
            }
    }'
    
    var data = JSON.stringify({
      "money": {
        "amount": 10,
        "currency": "EUR"
      },
      "description": "10 EUR PAB",
      "sourceAccount": "5001000001080652",
      "traceId": "zeihwhp-43gs8iwyf7v4h9k",
      "bankPayee": {
        "country": "CY",
        "currency": "EUR",
        "description": "bank payment description",
        "fields": {
          "IBAN": "CY21002001950000357001234567",
          "BIC": "ALFACY2N",
          "BENEFICIARY_ADDRESS_COUNTRY_ISO_CODE":"CY",
          "CUSTOMER_NAME": "Customer Name",
          "BANK_NAME": "Name of Bank"
        }
      }
    });
    
    var xhr = new XMLHttpRequest();
    xhr.withCredentials = true;
    
    xhr.addEventListener("readystatechange", function () {
      if (this.readyState === 4) {
        console.log(this.responseText);
      }
    });
    
    xhr.open("POST", "https://demo.mifinity.com/api/payments/pab");
    xhr.setRequestHeader("accept", "application/json");
    xhr.setRequestHeader("content-type", "application/json");
    xhr.setRequestHeader("x-api-version", "1");
    xhr.setRequestHeader("key", "sQO8Q3i5-HeD7F0BqVSIN1p......qnjqMDo8Bl0GKUTvexaVm5n7g");
    xhr.send(data);
    
    <?php
    
    $request = new HttpRequest();
    $request->setUrl('https://demo.mifinity.com/api/payments/pab');
    $request->setMethod(HTTP_METH_POST);
    
    $request->setHeaders(array(
      'key' => 'sQO8Q3i5-HeD7F0BqVSIN1p......qnjqMDo8Bl0GKUTvexaVm5n7g',
      'x-api-version' => '1',
      'content-type' => 'application/json',
      'accept' => 'application/json'
    ));
    
    $request->setBody('{
            "money" : {"amount":10, "currency":"EUR"},
            "description" : "10 EUR PAB",
            "sourceAccount" : "5001000001080652",
            "traceId" : "zeihwhp-43gs8iwyf7v4h9k",
            "bankPayee": {
              "country": "CY",
              "currency": "EUR",
              "description": "bank payment description",
              "fields": {
                "IBAN": "CY21002001950000357001234567",
                "BIC": "ALFACY2N",
                "BENEFICIARY_ADDRESS_COUNTRY_ISO_CODE":"CY",
                "CUSTOMER_NAME": "Customer Name",
                "BANK_NAME": "Name of Bank"
              }
            }
    }');
    
    try {
      $response = $request->send();
    
      echo $response->getBody();
    } catch (HttpException $ex) {
      echo $ex;
    }
    ?>
    

    Money

    Field Type Required Description
    amount Number Transaction value
    currency String Currency code (ISO 4217): EUR

    BankPayee

    Field Type Required Description
    country String Bank payee country code: CY
    currency String Bank Payee Currency: EUR
    entityId String optional BankPayee unique identification number
    description String optional Any description you want to assign to this operation
    fields Map Map of type String

    fields

    Field Type Required Description
    IBAN String Bank IBAN: Alphanumeric (28)
    BIC String Bank BIC: Alphanumeric (Min 8, Max 11)
    CUSTOMER_NAME String Bank customer name
    BANK_NAME String Bank Name
    BENEFICIARY_ADDRESS_COUNTRY_ISO_CODE String Country code

    Successful response

    {
    
        "payload": [
            {
                "transactionId": "6PX0FjAufQSJ9eEMzjdyuMpFeR4vXI_Ln08rgzdvO-I=",
                "transactionReference": "4c9f3bf3-1c92-4d79-bbf0-b3d85cee2980",
                "traceId": "82595452748399303479",
                "datePosted": "2018-09-24T09:53:52.158Z",
                "sourceMoney": {
                    "amount": 10,
                    "currency": "EUR",
                    "displayable": "EUR10.00"
                },
                "destinationMoney": {
                    "amount": 10,
                    "currency": "EUR",
                    "displayable": "EUR10.00"
                },
                "exchangeRate": 1,
                "totalFees": {
                    "amount": 0,
                    "currency": "EUR",
                    "displayable": "EUR0.00"
                }
            }
        ]
    }
    

    13. Czech Republic

    13.1. CZK currency example

    require 'uri'
    require 'net/http'
    
    url = URI("https://demo.mifinity.com/api/payments/pab")
    
    http = Net::HTTP.new(url.host, url.port)
    http.use_ssl = true
    http.verify_mode = OpenSSL::SSL::VERIFY_NONE
    
    request = Net::HTTP::Post.new(url)
    request["accept"] = 'application/json'
    request["content-type"] = 'application/json'
    request["x-api-version"] = '1'
    request["key"] = 'sQO8Q3i5-HeD7F0BqVSIN1p......qnjqMDo8Bl0GKUTvexaVm5n7g'
    request.body = "{\n        \"money\" : {\"amount\":10, \"currency\":\"CZK\"},
    \n        \"description\" : \"10 CZK PAB\",
    \n        \"sourceAccount\" : \"5001000001080652\",
    \n        \"traceId\" : \"zeihwhp-43gs8iwyf7v4h9k\",
    \n        \"bankPayee\": {\n          \"country\": \"CZ\",
    \n          \"currency\": \"CZK\",
    \n          \"description\": \"bank payment description\",
    \n          \"fields\":  {\n            \"ACCOUNT_NUMBER\": \"0145806057668127\",
    \n            \"BANK_CODE\": \"0122\",
    \n            \"IBAN\": \"CZ5508000000001234567899\", 
    \n            \"BIC\": \"AIRACZP\", 
    \n            \"CUSTOMER_ADDRESS_1\": \"asdsasadsadsadas\", 
    \n            \"CUSTOMER_CITY\": \"city\",  
    \n            \"BENEFICIARY_ADDRESS_COUNTRY_ISO_CODE\": \"CZ\", 
    \n            \"CUSTOMER_NAME\": \"Customer Name\",
    \n            \"BANK_NAME\": \"Name of Bank\"\n          }\n       }\n}"
    
    response = http.request(request)
    puts response.read_body
    
    import requests
    
    url = "https://demo.mifinity.com/api/payments/pab"
    
    payload ="{\n        \"money\" : {\"amount\":10, \"currency\":\"CZK\"}, \
    \n        \"description\" : \"10 CZK PAB\", \
    \n        \"sourceAccount\" : \"5001000001080652\", \
    \n        \"traceId\" : \"zeihwhp-43gs8iwyf7v4h9k\", \
    \n        \"bankPayee\": {\n          \"country\": \"CZ\", \
    \n          \"currency\": \"CZK\", \
    \n          \"description\": \"bank payment description\", \
    \n          \"fields\":  {\n            \"ACCOUNT_NUMBER\": \"0145806057668127\", \
    \n            \"BANK_CODE\": \"0122\", \
    \n            \"IBAN\": \"CZ5508000000001234567899\", \
    \n            \"BIC\": \"AIRACZP\", \
    \n            \"CUSTOMER_ADDRESS_1\": \"asdsasadsadsadas\", \
    \n            \"CUSTOMER_CITY\": \"city\",  \
    \n            \"BENEFICIARY_ADDRESS_COUNTRY_ISO_CODE\": \"CZ\",  \
     \n            \"CUSTOMER_NAME\": \"Customer Name\", \
     \n            \"BANK_NAME\": \"Name of Bank\"\n          }\n       }\n}"
    
    headers = {
        'accept': "application/json",
        'content-type': "application/json",
        'x-api-version': "1",
        'key': "sQO8Q3i5-HeD7F0BqVSIN1p......qnjqMDo8Bl0GKUTvexaVm5n7g"
        }
    
    response = requests.request("POST", url, data=payload, headers=headers)
    
    print(response.text)
    
    curl -X POST \
      https://demo.mifinity.com/api/payments/pab \
      -H 'accept: application/json' \
      -H 'content-type: application/json' \
      -H 'key: sQO8Q3i5-HeD7F0BqVSIN1p......qnjqMDo8Bl0GKUTvexaVm5n7g' \
      -H 'x-api-version: 1' \
      -d '{
            "money" : {"amount":10, "currency":"CZK"},
            "description" : "10 CZK PAB",
            "sourceAccount" : "5001000001080652",
            "traceId" : "zeihwhp-43gs8iwyf7v4h9k",
            "bankPayee": {
              "country": "CZ",
              "currency": "CZK",
              "description": "bank payment description",
              "fields": {
                "ACCOUNT_NUMBER": "0145806057668127",
                "BANK_CODE": "0122",
                "IBAN": "CZ5508000000001234567899",
                "BIC": "AIRACZPP",
                "CUSTOMER_ADDRESS_1": "asdsasadsadsadas",
                "CUSTOMER_CITY": "city",
                "BENEFICIARY_ADDRESS_COUNTRY_ISO_CODE":"CZ",
                "CUSTOMER_NAME": "Customer Name",
                "BANK_NAME": "Name of Bank"
              }
            }
    }'
    
    var data = JSON.stringify({
            "money" : {"amount":10, "currency":"CZK"},
            "description" : "10 CZK PAB",
            "sourceAccount" : "5001000001080652",
            "traceId" : "zeihwhp-43gs8iwyf7v4h9k",
            "bankPayee": {
              "country": "CZ",
              "currency": "CZK",
              "description": "bank payment description",
              "fields": {
                "ACCOUNT_NUMBER": "0145806057668127",
                "BANK_CODE": "0122",
                "IBAN": "CZ5508000000001234567899",
                "BIC": "AIRACZPP",
                "CUSTOMER_ADDRESS_1": "asdsasadsadsadas",
                "CUSTOMER_CITY": "city",
                "BENEFICIARY_ADDRESS_COUNTRY_ISO_CODE":"CZ",
                "CUSTOMER_NAME": "Customer Name",
                "BANK_NAME": "Name of Bank"
              }
      }
    });
    
    var xhr = new XMLHttpRequest();
    xhr.withCredentials = true;
    
    xhr.addEventListener("readystatechange", function () {
      if (this.readyState === 4) {
        console.log(this.responseText);
      }
    });
    
    xhr.open("POST", "https://demo.mifinity.com/api/payments/pab");
    xhr.setRequestHeader("accept", "application/json");
    xhr.setRequestHeader("content-type", "application/json");
    xhr.setRequestHeader("x-api-version", "1");
    xhr.setRequestHeader("key", "sQO8Q3i5-HeD7F0BqVSIN1p......qnjqMDo8Bl0GKUTvexaVm5n7g");
    xhr.send(data);
    
    <?php
    
    $request = new HttpRequest();
    $request->setUrl('https://demo.mifinity.com/api/payments/pab');
    $request->setMethod(HTTP_METH_POST);
    
    $request->setHeaders(array(
      'key' => 'sQO8Q3i5-HeD7F0BqVSIN1p......qnjqMDo8Bl0GKUTvexaVm5n7g',
      'x-api-version' => '1',
      'content-type' => 'application/json',
      'accept' => 'application/json'
    ));
    
    $request->setBody('{
           "money" : {"amount":10, "currency":"CZK"},
            "description" : "10 CZK PAB",
            "sourceAccount" : "5001000001080652",
            "traceId" : "zeihwhp-43gs8iwyf7v4h9k",
            "bankPayee": {
              "country": "CZ",
              "currency": "CZK",
              "description": "bank payment description",
              "fields": {
                "ACCOUNT_NUMBER": "0145806057668127",
                "BANK_CODE": "0122",
                "IBAN": "CZ5508000000001234567899",
                "BIC": "AIRACZPP",
                "CUSTOMER_ADDRESS_1": "asdsasadsadsadas",
                "CUSTOMER_CITY": "city",
                "BENEFICIARY_ADDRESS_COUNTRY_ISO_CODE":"CZ",
                "CUSTOMER_NAME": "Customer Name",
                "BANK_NAME": "Name of Bank"
              }
            }
    }');
    
    try {
      $response = $request->send();
    
      echo $response->getBody();
    } catch (HttpException $ex) {
      echo $ex;
    }
    ?>
    

    Money

    Field Type Required Description
    amount Number Transaction value
    currency String Currency code (ISO 4217): CZK

    BankPayee

    Field Type Required Description
    country String Bank payee country code: CZ
    currency String Bank Payee Currency: CZK
    entityId String optional BankPayee unique identification number
    description String optional Any description you want to assign to this operation
    fields Map Map of type String

    fields

    Field Type Required Description
    ACCOUNT_NUMBER String (up to 16 digits)
    BANK_CODE String 4 digits
    IBAN String Bank IBAN: Alphanumeric (24)
    BIC String Bank BIC: Alphanumeric (Min 8, Max 11)
    CUSTOMER_CITY String Alphanumeric (Max 25 characters
    CUSTOMER_ADDRESS_1 String Alphanumeric (Max 25 characters
    CUSTOMER_NAME String Bank customer name
    BANK_NAME String Bank Name
    BENEFICIARY_ADDRESS_COUNTRY_ISO_CODE String Country code

    Successful response

    {
    
        "payload": [
            {
                "transactionId": "6PX0FjAufQSJ9eEMzjdyuMpFeR4vXI_Ln08rgzdvO-I=",
                "transactionReference": "4c9f3bf3-1c92-4d79-bbf0-b3d85cee2980",
                "traceId": "82595452748399303479",
                "datePosted": "2018-09-24T09:53:52.158Z",
                "sourceMoney": {
                    "amount": 10,
                    "currency": "CZK",
                    "displayable": "CZK10.00"
                },
                "destinationMoney": {
                    "amount": 10,
                    "currency": "CZK",
                    "displayable": "CZK10.00"
                },
                "exchangeRate": 1,
                "totalFees": {
                    "amount": 0,
                    "currency": "CZK",
                    "displayable": "CZK0.00"
                }
            }
        ]
    }
    

    13.2. EUR currency example

    require 'uri'
    require 'net/http'
    
    url = URI("https://demo.mifinity.com/api/payments/pab")
    
    http = Net::HTTP.new(url.host, url.port)
    http.use_ssl = true
    http.verify_mode = OpenSSL::SSL::VERIFY_NONE
    
    request = Net::HTTP::Post.new(url)
    request["accept"] = 'application/json'
    request["content-type"] = 'application/json'
    request["x-api-version"] = '1'
    request["key"] = 'sQO8Q3i5-HeD7F0BqVSIN1p......qnjqMDo8Bl0GKUTvexaVm5n7g'
    request.body = "{\n        \"money\" : {\"amount\":10, \"currency\":\"EUR\"},
    \n        \"description\" : \"10 EUR PAB\",
    \n        \"sourceAccount\" : \"5001000001080652\",
    \n        \"traceId\" : \"zeihwhp-43gs8iwyf7v4h9k\",
    \n        \"bankPayee\": {\n          \"country\": \"CZ\",
    \n          \"currency\": \"EUR\",
    \n          \"description\": \"bank payment description\",
    \n          \"fields\":  {\n            \"IBAN\": \"CZ5508000000001234567899\", 
    \n            \"BIC\": \"AIRACZP\",  
    \n            \"BENEFICIARY_ADDRESS_COUNTRY_ISO_CODE\": \"CZ\", 
    \n            \"CUSTOMER_NAME\": \"Customer Name\",
    \n            \"BANK_NAME\": \"Name of Bank\"\n          }\n       }\n}"
    
    response = http.request(request)
    puts response.read_body
    
    import requests
    
    url = "https://demo.mifinity.com/api/payments/pab"
    
    payload ="{\n        \"money\" : {\"amount\":10, \"currency\":\"EUR\"}, \
    \n        \"description\" : \"10 EUR PAB\", \
    \n        \"sourceAccount\" : \"5001000001080652\", \
    \n        \"traceId\" : \"zeihwhp-43gs8iwyf7v4h9k\", \
    \n        \"bankPayee\": {\n          \"country\": \"CZ\", \
    \n          \"currency\": \"EUR\", \
    \n          \"description\": \"bank payment description\", \
    \n          \"fields\":  {\n            \"IBAN\": \"CZ5508000000001234567899\", \
     \n            \"BIC\": \"AIRACZP\", \
     \n            \"BENEFICIARY_ADDRESS_COUNTRY_ISO_CODE\": \"CZ\", \
     \n            \"CUSTOMER_NAME\": \"Customer Name\", \
     \n            \"BANK_NAME\": \"Name of Bank\"\n          }\n       }\n}"
    
    headers = {
        'accept': "application/json",
        'content-type': "application/json",
        'x-api-version': "1",
        'key': "sQO8Q3i5-HeD7F0BqVSIN1p......qnjqMDo8Bl0GKUTvexaVm5n7g"
        }
    
    response = requests.request("POST", url, data=payload, headers=headers)
    
    print(response.text)
    
    curl -X POST \
      https://demo.mifinity.com/api/payments/pab \
      -H 'accept: application/json' \
      -H 'content-type: application/json' \
      -H 'key: sQO8Q3i5-HeD7F0BqVSIN1p......qnjqMDo8Bl0GKUTvexaVm5n7g' \
      -H 'x-api-version: 1' \
      -d '{
            "money" : {"amount":10, "currency":"EUR"},
            "description" : "10 EUR PAB",
            "sourceAccount" : "5001000001080652",
            "traceId" : "zeihwhp-43gs8iwyf7v4h9k",
            "bankPayee": {
              "country": "CZ",
              "currency": "EUR",
              "description": "bank payment description",
              "fields": {
                "IBAN": "CZ5508000000001234567899",
                "BIC": "AIRACZPP",
                "BENEFICIARY_ADDRESS_COUNTRY_ISO_CODE":"CZ",
                "CUSTOMER_NAME": "Customer Name",
                "BANK_NAME": "Name of Bank"
              }
            }
    }'
    
    var data = JSON.stringify({
            "money" : {"amount":10, "currency":"EUR"},
            "description" : "10 EUR PAB",
            "sourceAccount" : "5001000001080652",
            "traceId" : "zeihwhp-43gs8iwyf7v4h9k",
            "bankPayee": {
              "country": "CZ",
              "currency": "EUR",
              "description": "bank payment description",
               "fields": {
                "IBAN": "CZ5508000000001234567899",
                "BIC": "AIRACZPP",
                "BENEFICIARY_ADDRESS_COUNTRY_ISO_CODE":"CZ",
                "CUSTOMER_NAME": "Customer Name",
                "BANK_NAME": "Name of Bank"
              }
      }
    });
    
    var xhr = new XMLHttpRequest();
    xhr.withCredentials = true;
    
    xhr.addEventListener("readystatechange", function () {
      if (this.readyState === 4) {
        console.log(this.responseText);
      }
    });
    
    xhr.open("POST", "https://demo.mifinity.com/api/payments/pab");
    xhr.setRequestHeader("accept", "application/json");
    xhr.setRequestHeader("content-type", "application/json");
    xhr.setRequestHeader("x-api-version", "1");
    xhr.setRequestHeader("key", "sQO8Q3i5-HeD7F0BqVSIN1p......qnjqMDo8Bl0GKUTvexaVm5n7g");
    xhr.send(data);
    
    <?php
    
    $request = new HttpRequest();
    $request->setUrl('https://demo.mifinity.com/api/payments/pab');
    $request->setMethod(HTTP_METH_POST);
    
    $request->setHeaders(array(
      'key' => 'sQO8Q3i5-HeD7F0BqVSIN1p......qnjqMDo8Bl0GKUTvexaVm5n7g',
      'x-api-version' => '1',
      'content-type' => 'application/json',
      'accept' => 'application/json'
    ));
    
    $request->setBody('{
           "money" : {"amount":10, "currency":"EUR"},
            "description" : "10 EUR PAB",
            "sourceAccount" : "5001000001080652",
            "traceId" : "zeihwhp-43gs8iwyf7v4h9k",
            "bankPayee": {
              "country": "CZ",
              "currency": "EUR",
              "description": "bank payment description",
             "fields": {
                "IBAN": "CZ5508000000001234567899",
                "BIC": "AIRACZPP",
                "BENEFICIARY_ADDRESS_COUNTRY_ISO_CODE":"CZ",
                "CUSTOMER_NAME": "Customer Name",
                "BANK_NAME": "Name of Bank"
              }
            }
    }');
    
    try {
      $response = $request->send();
    
      echo $response->getBody();
    } catch (HttpException $ex) {
      echo $ex;
    }
    ?>
    

    Money

    Field Type Required Description
    amount Number Transaction value
    currency String Currency code (ISO 4217): EUR

    BankPayee

    Field Type Required Description
    country String Bank payee country code: CZ
    currency String Bank Payee Currency: EUR
    entityId String optional BankPayee unique identification number
    description String optional Any description you want to assign to this operation
    fields Map Map of type String

    fields

    Field Type Required Description
    IBAN String Bank IBAN: Alphanumeric (24)
    BIC String Bank BIC: Alphanumeric (Min 8, Max 11)
    CUSTOMER_NAME String Bank customer name
    BANK_NAME String Bank Name
    BENEFICIARY_ADDRESS_COUNTRY_ISO_CODE String Country code

    Successful response

    {
    
        "payload": [
            {
                "transactionId": "6PX0FjAufQSJ9eEMzjdyuMpFeR4vXI_Ln08rgzdvO-I=",
                "transactionReference": "4c9f3bf3-1c92-4d79-bbf0-b3d85cee2980",
                "traceId": "82595452748399303479",
                "datePosted": "2018-09-24T09:53:52.158Z",
                "sourceMoney": {
                    "amount": 10,
                    "currency": "EUR",
                    "displayable": "EUR10.00"
                },
                "destinationMoney": {
                    "amount": 10,
                    "currency": "EUR",
                    "displayable": "EUR10.00"
                },
                "exchangeRate": 1,
                "totalFees": {
                    "amount": 0,
                    "currency": "EUR",
                    "displayable": "EUR0.00"
                }
            }
        ]
    }
    

    14. Germany

    require 'uri'
    require 'net/http'
    
    url = URI("https://demo.mifinity.com/api/payments/pab")
    
    http = Net::HTTP.new(url.host, url.port)
    http.use_ssl = true
    http.verify_mode = OpenSSL::SSL::VERIFY_NONE
    
    request = Net::HTTP::Post.new(url)
    request["accept"] = 'application/json'
    request["content-type"] = 'application/json'
    request["x-api-version"] = '1'
    request["key"] = 'sQO8Q3i5-HeD7F0BqVSIN1p......qnjqMDo8Bl0GKUTvexaVm5n7g'
    request.body = "{\n        \"money\" : {\"amount\":10, \"currency\":\"EUR\"},\n        \"description\" : \"10 EUR PAB\",
    \n        \"sourceAccount\" : \"5001000001080652\",
    \n        \"traceId\" : \"zeihwhp-43gs8iwyf7v4h9k\",
    \n        \"bankPayee\": {\n          \"country\": \"DE\",\n          \"currency\": \"EUR\",
    \n          \"description\": \"bank payment description\",
    \n          \"fields\": {\n            \"IBAN\": \"DE91100000000123456789\",\n            \"BIC\": \"TRSYDEFF\", \"BENEFICIARY_ADDRESS_COUNTRY_ISO_CODE\": \"DE\",
     \n            \"CUSTOMER_NAME\": \"Customer Name\",\n            \"BANK_NAME\": \"Name of Bank\"\n          }\n        }\n}"
    
    response = http.request(request)
    puts response.read_body
    
    import requests
    
    url = "https://demo.mifinity.com/api/payments/pab"
    
    payload = "{\n        \"money\" : {\"amount\":10, \"currency\":\"EUR\"},\
    \n        \"description\" : \"10 EUR PAB\", \
    \n        \"sourceAccount\" : \"5001000001080652\", \
    \n        \"traceId\" : \"zeihwhp-43gs8iwyf7v4h9k\", \
    \n        \"bankPayee\": {\n          \"country\": \"DE\", \
    \n          \"currency\": \"EUR\", \
    \n          \"description\": \"bank payment description\", \
    \n          \"fields\": {\n            \"IBAN\": \"DE91100000000123456789\", \
    \n            \"BIC\": \"TRSYDEFF\", \"BENEFICIARY_ADDRESS_COUNTRY_ISO_CODE\": \"DE\", \
    \n            \"CUSTOMER_NAME\": \"Customer Name\", \
    \n            \"BANK_NAME\": \"Name of Bank\"\n          }\n        }\n}"
    
    headers = {
        'accept': "application/json",
        'content-type': "application/json",
        'x-api-version': "1",
        'key': "sQO8Q3i5-HeD7F0BqVSIN1p......qnjqMDo8Bl0GKUTvexaVm5n7g"
        }
    
    response = requests.request("POST", url, data=payload, headers=headers)
    
    print(response.text)
    
    curl -X POST \
      https://demo.mifinity.com/api/payments/pab \
      -H 'accept: application/json' \
      -H 'content-type: application/json' \
      -H 'key: sQO8Q3i5-HeD7F0BqVSIN1p......qnjqMDo8Bl0GKUTvexaVm5n7g' \
      -H 'x-api-version: 1' \
      -d '{
            "money" : {"amount":10, "currency":"EUR"},
            "description" : "10 EUR PAB",
            "sourceAccount" : "5001000001080652",
            "traceId" : "zeihwhp-43gs8iwyf7v4h9k",
            "bankPayee": {
              "country": "DE",
              "currency": "EUR",
              "description": "bank payment description",
              "fields": {
                "IBAN": "DE91100000000123456789",
                "BIC": "TRSYDEFF",
                "BENEFICIARY_ADDRESS_COUNTRY_ISO_CODE":"DE",
                "CUSTOMER_NAME": "Customer Name",
                "BANK_NAME": "Name of Bank"
              }
            }
    }'
    
    var data = JSON.stringify({
            "money" : {"amount":10, "currency":"EUR"},
            "description" : "10 EUR PAB",
            "sourceAccount" : "5001000001080652",
            "traceId" : "zeihwhp-43gs8iwyf7v4h9k",
            "bankPayee": {
              "country": "DE",
              "currency": "EUR",
              "description": "bank payment description",
              "fields": {
                "IBAN": "DE91100000000123456789",
                "BIC": "TRSYDEFF",
                "BENEFICIARY_ADDRESS_COUNTRY_ISO_CODE":"DE",
                "CUSTOMER_NAME": "Customer Name",
                "BANK_NAME": "Name of Bank"
              }
      }
    });
    
    var xhr = new XMLHttpRequest();
    xhr.withCredentials = true;
    
    xhr.addEventListener("readystatechange", function () {
      if (this.readyState === 4) {
        console.log(this.responseText);
      }
    });
    
    xhr.open("POST", "https://demo.mifinity.com/api/payments/pab");
    xhr.setRequestHeader("accept", "application/json");
    xhr.setRequestHeader("content-type", "application/json");
    xhr.setRequestHeader("x-api-version", "1");
    xhr.setRequestHeader("key", "sQO8Q3i5-HeD7F0BqVSIN1p......qnjqMDo8Bl0GKUTvexaVm5n7g");
    xhr.send(data);
    
    <?php
    
    $request = new HttpRequest();
    $request->setUrl('https://demo.mifinity.com/api/payments/pab');
    $request->setMethod(HTTP_METH_POST);
    
    $request->setHeaders(array(
      'key' => 'sQO8Q3i5-HeD7F0BqVSIN1p......qnjqMDo8Bl0GKUTvexaVm5n7g',
      'x-api-version' => '1',
      'content-type' => 'application/json',
      'accept' => 'application/json'
    ));
    
    $request->setBody('{
            "money" : {"amount":10, "currency":"EUR"},
            "description" : "10 EUR PAB",
            "sourceAccount" : "5001000001080652",
            "traceId" : "zeihwhp-43gs8iwyf7v4h9k",
            "bankPayee": {
              "country": "DE",
              "currency": "EUR",
              "description": "bank payment description",
              "fields": {
                "IBAN": "DE91100000000123456789",
                "BIC": "TRSYDEFF",
                "BENEFICIARY_ADDRESS_COUNTRY_ISO_CODE":"DE",
                "CUSTOMER_NAME": "Customer Name",
                "BANK_NAME": "Name of Bank"
              }
            }
    }');
    
    try {
      $response = $request->send();
    
      echo $response->getBody();
    } catch (HttpException $ex) {
      echo $ex;
    }
    ?>
    

    Money

    Field Type Required Description
    amount Number Transaction value
    currency String Currency code (ISO 4217): EUR

    BankPayee

    Field Type Required Description
    country String Bank payee country code: DE
    currency String Bank Payee Currency: EUR
    entityId String optional BankPayee unique identification number
    description String optional Any description you want to assign to this operation
    fields Map Map of type String

    fields

    Field Type Required Description
    IBAN String Bank IBAN: Alphanumeric (22)
    BIC String Bank BIC: Alphanumeric (Min 8, Max 11)
    CUSTOMER_NAME String Bank customer name
    BANK_NAME String Bank Name
    BENEFICIARY_ADDRESS_COUNTRY_ISO_CODE String Country code

    Successful response

    {
    
        "payload": [
            {
                "transactionId": "6PX0FjAufQSJ9eEMzjdyuMpFeR4vXI_Ln08rgzdvO-I=",
                "transactionReference": "4c9f3bf3-1c92-4d79-bbf0-b3d85cee2980",
                "traceId": "82595452748399303479",
                "datePosted": "2018-09-24T09:53:52.158Z",
                "sourceMoney": {
                    "amount": 10,
                    "currency": "EUR",
                    "displayable": "EUR10.00"
                },
                "destinationMoney": {
                    "amount": 10,
                    "currency": "EUR",
                    "displayable": "EUR10.00"
                },
                "exchangeRate": 1,
                "totalFees": {
                    "amount": 0,
                    "currency": "EUR",
                    "displayable": "EUR0.00"
                }
            }
        ]
    }
    

    15. Denmark

    15.1. DKK currency example

    require 'uri'
    require 'net/http'
    
    url = URI("https://demo.mifinity.com/api/payments/pab")
    
    http = Net::HTTP.new(url.host, url.port)
    http.use_ssl = true
    http.verify_mode = OpenSSL::SSL::VERIFY_NONE
    
    request = Net::HTTP::Post.new(url)
    request["accept"] = 'application/json'
    request["content-type"] = 'application/json'
    request["x-api-version"] = '1'
    request["key"] = 'sQO8Q3i5-HeD7F0BqVSIN1p......qnjqMDo8Bl0GKUTvexaVm5n7g'
    request.body = "{\n        \"money\" : {\"amount\":10, \"currency\":\"DKK\"},
    \n        \"description\" : \"10 DKK PAB\",
    \n        \"sourceAccount\" : \"5001000001080652\",
    \n        \"traceId\" : \"zeihwhp-43gs8iwyf7v4h9k\",
    \n        \"bankPayee\": {\n          \"country\": \"DK\",
    \n          \"currency\": \"DKK\",
    \n          \"description\": \"bank payment description\",
    \n          \"fields\": {\n            \"IBAN\": \"DK9520000123456789\",
    \n            \"BIC\": \"BANODKKK\", 
    \n            \"BENEFICIARY_ADDRESS_COUNTRY_ISO_CODE\": \"DK\", 
    \n            \"CUSTOMER_ADDRESS_1\": \"asdsasadsadsadas\", 
    \n            \"CUSTOMER_CITY\": \"city\",
    \n            \"CUSTOMER_NAME\": \"Customer Name\",
    \n            \"BANK_NAME\": \"Name of Bank\"\n          }\n        }\n}"
    
    response = http.request(request)
    puts response.read_body
    
    import requests
    
    url = "https://demo.mifinity.com/api/payments/pab"
    
    payload = "{\n        \"money\" : {\"amount\":10, \"currency\":\"DKK\"}, \
    \n        \"description\" : \"10 DKK PAB\", \
    \n        \"sourceAccount\" : \"5001000001080652\", \
    \n        \"traceId\" : \"zeihwhp-43gs8iwyf7v4h9k\", \
    \n        \"bankPayee\": {\n          \"country\": \"DK\", \
    \n          \"currency\": \"DKK\", \
    \n          \"description\": \"bank payment description\",  \
    \n          \"fields\": {\n            \"IBAN\": \"DK9520000123456789\", \
    \n            \"BIC\": \"BANODKKK\", \
    \n            \"BENEFICIARY_ADDRESS_COUNTRY_ISO_CODE\": \"DK\", \
    \n            \"CUSTOMER_ADDRESS_1\": \"asdsasadsadsadas\", \
    \n            \"CUSTOMER_CITY\": \"city\", \
    \n            \"CUSTOMER_NAME\": \"Customer Name\", \
    \n            \"BANK_NAME\": \"Name of Bank\"\n          }\n        }\n}"
    
    headers = {
        'accept': "application/json",
        'content-type': "application/json",
        'x-api-version': "1",
        'key': "sQO8Q3i5-HeD7F0BqVSIN1p......qnjqMDo8Bl0GKUTvexaVm5n7g"
        }
    
    response = requests.request("POST", url, data=payload, headers=headers)
    
    print(response.text)
    
    curl -X POST \
      https://demo.mifinity.com/api/payments/pab \
      -H 'accept: application/json' \
      -H 'content-type: application/json' \
      -H 'key: sQO8Q3i5-HeD7F0BqVSIN1p......qnjqMDo8Bl0GKUTvexaVm5n7g' \
      -H 'x-api-version: 1' \
      -d '{
            "money" : {"amount":10, "currency":"DKK"},
            "description" : "10 DKK PAB",
            "sourceAccount" : "5001000001080652",
            "traceId" : "zeihwhp-43gs8iwyf7v4h9k",
            "bankPayee": {
              "country": "DK",
              "currency": "DKK",
              "description": "bank payment description",
              "fields": {
                "IBAN": "DK9520000123456789",
                "BIC": "BANODKKK",
                "CUSTOMER_ADDRESS_1": "asdsasadsadsadas",
                "CUSTOMER_CITY": "city",
                "BENEFICIARY_ADDRESS_COUNTRY_ISO_CODE":"DK", 
                "CUSTOMER_NAME": "Customer Name",
                "BANK_NAME": "Name of Bank"
              }
            }
    }'
    
    var data = JSON.stringify({
            "money" : {"amount":10, "currency":"DKK"},
            "description" : "10 DKK PAB",
            "sourceAccount" : "5001000001080652",
            "traceId" : "zeihwhp-43gs8iwyf7v4h9k",
            "bankPayee": {
              "country": "DK",
              "currency": "DKK",
              "description": "bank payment description",
              "fields": {
                "IBAN": "DK9520000123456789",
                "BIC": "BANODKKK",
                "CUSTOMER_ADDRESS_1": "asdsasadsadsadas",
                "CUSTOMER_CITY": "city",
                "BENEFICIARY_ADDRESS_COUNTRY_ISO_CODE":"DK", 
                "CUSTOMER_NAME": "Customer Name",
                "BANK_NAME": "Name of Bank"
              }
      }
    });
    
    var xhr = new XMLHttpRequest();
    xhr.withCredentials = true;
    
    xhr.addEventListener("readystatechange", function () {
      if (this.readyState === 4) {
        console.log(this.responseText);
      }
    });
    
    xhr.open("POST", "https://demo.mifinity.com/api/payments/pab");
    xhr.setRequestHeader("accept", "application/json");
    xhr.setRequestHeader("content-type", "application/json");
    xhr.setRequestHeader("x-api-version", "1");
    xhr.setRequestHeader("key", "sQO8Q3i5-HeD7F0BqVSIN1p......qnjqMDo8Bl0GKUTvexaVm5n7g");
    xhr.send(data);
    
    <?php
    
    $request = new HttpRequest();
    $request->setUrl('https://demo.mifinity.com/api/payments/pab');
    $request->setMethod(HTTP_METH_POST);
    
    $request->setHeaders(array(
      'key' => 'sQO8Q3i5-HeD7F0BqVSIN1p......qnjqMDo8Bl0GKUTvexaVm5n7g',
      'x-api-version' => '1',
      'content-type' => 'application/json',
      'accept' => 'application/json'
    ));
    
    $request->setBody('{
            "money" : {"amount":10, "currency":"DKK"},
            "description" : "10 DKK PAB",
            "sourceAccount" : "5001000001080652",
            "traceId" : "zeihwhp-43gs8iwyf7v4h9k",
            "bankPayee": {
              "country": "DK",
              "currency": "DKK",
              "description": "bank payment description",
              "fields": {
                "IBAN": "DK9520000123456789",
                "BIC": "BANODKKK",
                "CUSTOMER_ADDRESS_1": "asdsasadsadsadas",
                "CUSTOMER_CITY": "city",
                "BENEFICIARY_ADDRESS_COUNTRY_ISO_CODE":"DK", 
                "CUSTOMER_NAME": "Customer Name",
                "BANK_NAME": "Name of Bank"
              }
            }
    }');
    
    try {
      $response = $request->send();
    
      echo $response->getBody();
    } catch (HttpException $ex) {
      echo $ex;
    }
    ?>
    

    Money

    Field Type Required Description
    amount Number Transaction value
    currency String Currency code (ISO 4217): DKK

    BankPayee

    Field Type Required Description
    country String Bank payee country code: DK
    currency String Bank Payee Currency: DKK
    entityId String optional BankPayee unique identification number
    description String optional Any description you want to assign to this operation
    fields Map Map of type String

    fields

    Field Type Required Description
    IBAN String Bank IBAN: Alphanumeric (18)
    BIC String Bank BIC: Alphanumeric (Min 8, Max 11)
    CUSTOMER_CITY String Alphanumeric (Max 25 characters
    CUSTOMER_ADDRESS_1 String Alphanumeric (Max 25 characters
    CUSTOMER_NAME String Bank customer name
    BANK_NAME String Bank Name
    BENEFICIARY_ADDRESS_COUNTRY_ISO_CODE String Country code

    Successful response

    {
    
        "payload": [
            {
                "transactionId": "6PX0FjAufQSJ9eEMzjdyuMpFeR4vXI_Ln08rgzdvO-I=",
                "transactionReference": "4c9f3bf3-1c92-4d79-bbf0-b3d85cee2980",
                "traceId": "82595452748399303479",
                "datePosted": "2018-09-24T09:53:52.158Z",
                "sourceMoney": {
                    "amount": 10,
                    "currency": "DKK",
                    "displayable": "DKK10.00"
                },
                "destinationMoney": {
                    "amount": 10,
                    "currency": "DKK",
                    "displayable": "DKK10.00"
                },
                "exchangeRate": 1,
                "totalFees": {
                    "amount": 0,
                    "currency": "DKK",
                    "displayable": "DKK0.00"
                }
            }
        ]
    }
    

    15.2. EUR currency example

    require 'uri'
    require 'net/http'
    
    url = URI("https://demo.mifinity.com/api/payments/pab")
    
    http = Net::HTTP.new(url.host, url.port)
    http.use_ssl = true
    http.verify_mode = OpenSSL::SSL::VERIFY_NONE
    
    request = Net::HTTP::Post.new(url)
    request["accept"] = 'application/json'
    request["content-type"] = 'application/json'
    request["x-api-version"] = '1'
    request["key"] = 'sQO8Q3i5-HeD7F0BqVSIN1p......qnjqMDo8Bl0GKUTvexaVm5n7g'
    request.body = "{\n        \"money\" : {\"amount\":10, \"currency\":\"EUR\"},
    \n        \"description\" : \"10 EUR PAB\",
    \n        \"sourceAccount\" : \"5001000001080652\",
    \n        \"traceId\" : \"zeihwhp-43gs8iwyf7v4h9k\",
    \n        \"bankPayee\": {\n          \"country\": \"DK\",
    \n          \"currency\": \"EUR\",
    \n          \"description\": \"bank payment description\",
    \n          \"fields\": {\n            \"IBAN\": \"DK9520000123456789\",
    \n            \"BIC\": \"BANODKKK\",
     \n            \"CUSTOMER_ADDRESS_1\": \"asdsasadsadsadas\", 
     \n            \"CUSTOMER_NAME\": \"Customer Name\",
     \n            \"BANK_NAME\": \"Name of Bank\"\n          }\n        }\n}"
    
    response = http.request(request)
    puts response.read_body
    
    import requests
    
    url = "https://demo.mifinity.com/api/payments/pab"
    
    payload = "{\n        \"money\" : {\"amount\":10, \"currency\":\"EUR\"}, \
    \n        \"description\" : \"10 EUR PAB\", \
    \n        \"sourceAccount\" : \"5001000001080652\", \
    \n        \"traceId\" : \"zeihwhp-43gs8iwyf7v4h9k\", \
    \n        \"bankPayee\": {\n          \"country\": \"DK\", \
    \n          \"currency\": \"EUR\", \
    \n          \"description\": \"bank payment description\", \
    \n          \"fields\": {\n            \"IBAN\": \"DK9520000123456789\", \
    \n            \"BIC\": \"BANODKKK\",\
    \n            \"CUSTOMER_ADDRESS_1\": \"asdsasadsadsadas\", \
    \n            \"CUSTOMER_NAME\": \"Customer Name\", \
    \n            \"BANK_NAME\": \"Name of Bank\"\n          }\n        }\n}"
    
    headers = {
        'accept': "application/json",
        'content-type': "application/json",
        'x-api-version': "1",
        'key': "sQO8Q3i5-HeD7F0BqVSIN1p......qnjqMDo8Bl0GKUTvexaVm5n7g"
        }
    
    response = requests.request("POST", url, data=payload, headers=headers)
    
    print(response.text)
    
    curl -X POST \
      https://demo.mifinity.com/api/payments/pab \
      -H 'accept: application/json' \
      -H 'content-type: application/json' \
      -H 'key: sQO8Q3i5-HeD7F0BqVSIN1p......qnjqMDo8Bl0GKUTvexaVm5n7g' \
      -H 'x-api-version: 1' \
      -d '{
            "money" : {"amount":10, "currency":"EUR"},
            "description" : "10 EUR PAB",
            "sourceAccount" : "5001000001080652",
            "traceId" : "zeihwhp-43gs8iwyf7v4h9k",
            "bankPayee": {
              "country": "DK",
              "currency": "EUR",
              "description": "bank payment description",
              "fields": {
                "IBAN": "DK9520000123456789",
                "BIC": "BANODKKK",
                "BENEFICIARY_ADDRESS_COUNTRY_ISO_CODE":"DK", 
                "CUSTOMER_NAME": "Customer Name",
                "BANK_NAME": "Name of Bank"
              }
            }
    }'
    
    var data = JSON.stringify({
             "money" : {"amount":10, "currency":"EUR"},
            "description" : "10 EUR PAB",
            "sourceAccount" : "5001000001080652",
            "traceId" : "zeihwhp-43gs8iwyf7v4h9k",
            "bankPayee": {
              "country": "DK",
              "currency": "EUR",
              "description": "bank payment description",
              "fields": {
                "IBAN": "DK9520000123456789",
                "BIC": "BANODKKK",
                "BENEFICIARY_ADDRESS_COUNTRY_ISO_CODE":"DK", 
                "CUSTOMER_NAME": "Customer Name",
                "BANK_NAME": "Name of Bank"
              }
      }
    });
    
    var xhr = new XMLHttpRequest();
    xhr.withCredentials = true;
    
    xhr.addEventListener("readystatechange", function () {
      if (this.readyState === 4) {
        console.log(this.responseText);
      }
    });
    
    xhr.open("POST", "https://demo.mifinity.com/api/payments/pab");
    xhr.setRequestHeader("accept", "application/json");
    xhr.setRequestHeader("content-type", "application/json");
    xhr.setRequestHeader("x-api-version", "1");
    xhr.setRequestHeader("key", "sQO8Q3i5-HeD7F0BqVSIN1p......qnjqMDo8Bl0GKUTvexaVm5n7g");
    xhr.send(data);
    
    <?php
    
    $request = new HttpRequest();
    $request->setUrl('https://demo.mifinity.com/api/payments/pab');
    $request->setMethod(HTTP_METH_POST);
    
    $request->setHeaders(array(
      'key' => 'sQO8Q3i5-HeD7F0BqVSIN1p......qnjqMDo8Bl0GKUTvexaVm5n7g',
      'x-api-version' => '1',
      'content-type' => 'application/json',
      'accept' => 'application/json'
    ));
    
    $request->setBody('{
             "money" : {"amount":10, "currency":"EUR"},
            "description" : "10 EUR PAB",
            "sourceAccount" : "5001000001080652",
            "traceId" : "zeihwhp-43gs8iwyf7v4h9k",
            "bankPayee": {
              "country": "DK",
              "currency": "EUR",
              "description": "bank payment description",
              "fields": {
                "IBAN": "DK9520000123456789",
                "BIC": "BANODKKK",
                "BENEFICIARY_ADDRESS_COUNTRY_ISO_CODE":"DK", 
                "CUSTOMER_NAME": "Customer Name",
                "BANK_NAME": "Name of Bank"
              }
            }
    }');
    
    try {
      $response = $request->send();
    
      echo $response->getBody();
    } catch (HttpException $ex) {
      echo $ex;
    }
    ?>
    

    Money

    Field Type Required Description
    amount Number Transaction value
    currency String Currency code (ISO 4217): EUR

    BankPayee

    Field Type Required Description
    country String Bank payee country code: DK
    currency String Bank Payee Currency: EUR
    entityId String optional BankPayee unique identification number
    description String optional Any description you want to assign to this operation
    fields Map Map of type String

    fields

    Field Type Required Description
    IBAN String Bank IBAN: Alphanumeric (18
    BIC String Bank BIC: Alphanumeric (Min 8, Max 11)
    CUSTOMER_NAME String Bank customer name
    BANK_NAME String Bank Name
    BENEFICIARY_ADDRESS_COUNTRY_ISO_CODE String Country code

    Successful response

    {
    
        "payload": [
            {
                "transactionId": "6PX0FjAufQSJ9eEMzjdyuMpFeR4vXI_Ln08rgzdvO-I=",
                "transactionReference": "4c9f3bf3-1c92-4d79-bbf0-b3d85cee2980",
                "traceId": "82595452748399303479",
                "datePosted": "2018-09-24T09:53:52.158Z",
                "sourceMoney": {
                    "amount": 10,
                    "currency": "EUR",
                    "displayable": "EUR10.00"
                },
                "destinationMoney": {
                    "amount": 10,
                    "currency": "EUR",
                    "displayable": "EUR10.00"
                },
                "exchangeRate": 1,
                "totalFees": {
                    "amount": 0,
                    "currency": "EUR",
                    "displayable": "EUR0.00"
                }
            }
        ]
    }
    

    16. Estonia

    require 'uri'
    require 'net/http'
    
    url = URI("https://demo.mifinity.com/api/payments/pab")
    
    http = Net::HTTP.new(url.host, url.port)
    http.use_ssl = true
    http.verify_mode = OpenSSL::SSL::VERIFY_NONE
    
    request = Net::HTTP::Post.new(url)
    request["accept"] = 'application/json'
    request["content-type"] = 'application/json'
    request["x-api-version"] = '1'
    request["key"] = 'sQO8Q3i5-HeD7F0BqVSIN1p......qnjqMDo8Bl0GKUTvexaVm5n7g'
    request.body = "{\n        \"money\" : {\"amount\":10, \"currency\":\"EUR\"},
    \n        \"description\" : \"10 EUR PAB\",
    \n        \"sourceAccount\" : \"5001000001080652\",
    \n        \"traceId\" : \"zeihwhp-43gs8iwyf7v4h9k\",
    \n        \"bankPayee\": {\n          \"country\": \"EE\",
    \n          \"currency\": \"EUR\",
    \n          \"description\": \"bank payment description\",
    \n          \"fields\": {\n            \"IBAN\": \"EE471000001020145685\",
    \n            \"BIC\": \"LHVBEE22\", 
    \n            \"BENEFICIARY_ADDRESS_COUNTRY_ISO_CODE\": \"EE\",
    \n            \"CUSTOMER_NAME\": \"Customer Name\",
    \n            \"BANK_NAME\": \"Name of Bank\"\n          }\n        }\n}"
    
    response = http.request(request)
    puts response.read_body
    
    import requests
    
    url = "https://demo.mifinity.com/api/payments/pab"
    
    payload = "{\n        \"money\" : {\"amount\":10, \"currency\":\"EUR\"}, \
    \n        \"description\" : \"10 EUR PAB\", \
    \n        \"sourceAccount\" : \"5001000001080652\", \
    \n        \"traceId\" : \"zeihwhp-43gs8iwyf7v4h9k\", \
    \n        \"bankPayee\": {\n          \"country\": \"EE\", \
    \n          \"currency\": \"EUR\", \
    \n          \"description\": \"bank payment description\", \
    \n          \"fields\": {\n            \"IBAN\": \"EE471000001020145685\", \
    \n            \"BIC\": \"LHVBEE22\", \
    \n            \"BENEFICIARY_ADDRESS_COUNTRY_ISO_CODE\": \"EE\", \
    \n            \"CUSTOMER_NAME\": \"Customer Name\", \
    \n            \"BANK_NAME\": \"Name of Bank\"\n          }\n        }\n}"
    
    headers = {
        'accept': "application/json",
        'content-type': "application/json",
        'x-api-version': "1",
        'key': "sQO8Q3i5-HeD7F0BqVSIN1p......qnjqMDo8Bl0GKUTvexaVm5n7g"
        }
    
    response = requests.request("POST", url, data=payload, headers=headers)
    
    print(response.text)
    
    curl -X POST \
      https://demo.mifinity.com/api/payments/pab \
      -H 'accept: application/json' \
      -H 'content-type: application/json' \
      -H 'key: sQO8Q3i5-HeD7F0BqVSIN1p......qnjqMDo8Bl0GKUTvexaVm5n7g' \
      -H 'x-api-version: 1' \
      -d '{
            "money" : {"amount":10, "currency":"EUR"},
            "description" : "10 EUR PAB",
            "sourceAccount" : "5001000001080652",
            "traceId" : "zeihwhp-43gs8iwyf7v4h9k",
            "bankPayee": {
              "country": "EE",
              "currency": "EUR",
              "description": "bank payment description",
              "fields": {
                "IBAN": "EE471000001020145685",
                "BIC": "LHVBEE22",
                "BENEFICIARY_ADDRESS_COUNTRY_ISO_CODE":"EE", 
                "CUSTOMER_NAME": "Customer Name",
                "BANK_NAME": "Name of Bank"
              }
            }
    }'
    
    var data = JSON.stringify({
            "money" : {"amount":10, "currency":"EUR"},
            "description" : "10 EUR PAB",
            "sourceAccount" : "5001000001080652",
            "traceId" : "zeihwhp-43gs8iwyf7v4h9k",
            "bankPayee": {
              "country": "EE",
              "currency": "EUR",
              "description": "bank payment description",
              "fields": {
                "IBAN": "EE471000001020145685",
                "BIC": "LHVBEE22",
                "BENEFICIARY_ADDRESS_COUNTRY_ISO_CODE":"EE", 
                "CUSTOMER_NAME": "Customer Name",
                "BANK_NAME": "Name of Bank"
              }
      }
    });
    
    var xhr = new XMLHttpRequest();
    xhr.withCredentials = true;
    
    xhr.addEventListener("readystatechange", function () {
      if (this.readyState === 4) {
        console.log(this.responseText);
      }
    });
    
    xhr.open("POST", "https://demo.mifinity.com/api/payments/pab");
    xhr.setRequestHeader("accept", "application/json");
    xhr.setRequestHeader("content-type", "application/json");
    xhr.setRequestHeader("x-api-version", "1");
    xhr.setRequestHeader("key", "sQO8Q3i5-HeD7F0BqVSIN1p......qnjqMDo8Bl0GKUTvexaVm5n7g");
    xhr.send(data);
    
    <?php
    
    $request = new HttpRequest();
    $request->setUrl('https://demo.mifinity.com/api/payments/pab');
    $request->setMethod(HTTP_METH_POST);
    
    $request->setHeaders(array(
      'key' => 'sQO8Q3i5-HeD7F0BqVSIN1p......qnjqMDo8Bl0GKUTvexaVm5n7g',
      'x-api-version' => '1',
      'content-type' => 'application/json',
      'accept' => 'application/json'
    ));
    
    $request->setBody('{
            "money" : {"amount":10, "currency":"EUR"},
            "description" : "10 EUR PAB",
            "sourceAccount" : "5001000001080652",
            "traceId" : "zeihwhp-43gs8iwyf7v4h9k",
            "bankPayee": {
              "country": "EE",
              "currency": "EUR",
              "description": "bank payment description",
              "fields": {
                "IBAN": "EE471000001020145685",
                "BIC": "LHVBEE22",
                "BENEFICIARY_ADDRESS_COUNTRY_ISO_CODE":"EE", 
                "CUSTOMER_NAME": "Customer Name",
                "BANK_NAME": "Name of Bank"
              }
            }
    }');
    
    try {
      $response = $request->send();
    
      echo $response->getBody();
    } catch (HttpException $ex) {
      echo $ex;
    }
    ?>
    

    Money

    Field Type Required Description
    amount Number Transaction value
    currency String Currency code (ISO 4217):EUR

    BankPayee

    Field Type Required Description
    country String Bank payee country code: EE
    currency String Bank Payee Currency: EUR
    entityId String optional BankPayee unique identification number
    description String optional Any description you want to assign to this operation
    fields Map Map of type String

    fields

    Field Type Required Description
    IBAN String Bank IBAN: Alphanumeric (20)
    BIC String Bank BIC: Alphanumeric (Min 8, Max 11)
    CUSTOMER_NAME String Bank customer name
    BANK_NAME String Bank Name
    BENEFICIARY_ADDRESS_COUNTRY_ISO_CODE String Country code

    Successful response

    {
    
        "payload": [
            {
                "transactionId": "6PX0FjAufQSJ9eEMzjdyuMpFeR4vXI_Ln08rgzdvO-I=",
                "transactionReference": "4c9f3bf3-1c92-4d79-bbf0-b3d85cee2980",
                "traceId": "82595452748399303479",
                "datePosted": "2018-09-24T09:53:52.158Z",
                "sourceMoney": {
                    "amount": 10,
                    "currency": "EUR",
                    "displayable": "EUR10.00"
                },
                "destinationMoney": {
                    "amount": 10,
                    "currency": "EUR",
                    "displayable": "EUR10.00"
                },
                "exchangeRate": 1,
                "totalFees": {
                    "amount": 0,
                    "currency": "EUR",
                    "displayable": "EUR0.00"
                }
            }
        ]
    }
    

    17. Spain

    require 'uri'
    require 'net/http'
    
    url = URI("https://demo.mifinity.com/api/payments/pab")
    
    http = Net::HTTP.new(url.host, url.port)
    http.use_ssl = true
    http.verify_mode = OpenSSL::SSL::VERIFY_NONE
    
    request = Net::HTTP::Post.new(url)
    request["accept"] = 'application/json'
    request["content-type"] = 'application/json'
    request["x-api-version"] = '1'
    request["key"] = 'sQO8Q3i5-HeD7F0BqVSIN1p......qnjqMDo8Bl0GKUTvexaVm5n7g'
    request.body = "{\n        \"money\" : {\"amount\":10, \"currency\":\"EUR\"},
    \n        \"description\" : \"10 EUR PAB\",
    \n        \"sourceAccount\" : \"5001000001080652\",
    \n        \"traceId\" : \"zeihwhp-43gs8iwyf7v4h9k\",
    \n        \"bankPayee\": {\n          \"country\": \"ES\",
    \n          \"currency\": \"EUR\",
    \n          \"description\": \"bank payment description\",
    \n          \"fields\": {\n            \"IBAN\": \"ES7921000813610123456789\",
    \n            \"BIC\": \"AYGBESMM\", 
    \n            \"BENEFICIARY_ADDRESS_COUNTRY_ISO_CODE\": \"ES\", 
    \n            \"CUSTOMER_NAME\": \"Customer Name\",
    \n            \"BANK_NAME\": \"Name of Bank\"\n          }\n        }\n}"
    
    response = http.request(request)
    puts response.read_body
    
    import requests
    
    url = "https://demo.mifinity.com/api/payments/pab"
    
    payload = "{\n        \"money\" : {\"amount\":10, \"currency\":\"EUR\"}, \
    \n        \"description\" : \"10 EUR PAB\", \
    \n        \"sourceAccount\" : \"5001000001080652\", \
    \n        \"traceId\" : \"zeihwhp-43gs8iwyf7v4h9k\", \
    \n        \"bankPayee\": {\n          \"country\": \"ES\", \
    \n          \"currency\": \"EUR\", \
    \n          \"description\": \"bank payment description\", \
    \n          \"fields\": {\n            \"IBAN\": \"ES7921000813610123456789\", \
    \n            \"BIC\": \"AYGBESMM\", \
    \n            \"BENEFICIARY_ADDRESS_COUNTRY_ISO_CODE\": \"ES\", \
    \n            \"CUSTOMER_NAME\": \"Customer Name\", \
    \n            \"BANK_NAME\": \"Name of Bank\"\n          }\n        }\n}"
    
    headers = {
        'accept': "application/json",
        'content-type': "application/json",
        'x-api-version': "1",
        'key': "sQO8Q3i5-HeD7F0BqVSIN1p......qnjqMDo8Bl0GKUTvexaVm5n7g"
        }
    
    response = requests.request("POST", url, data=payload, headers=headers)
    
    print(response.text)
    
    curl -X POST \
      https://demo.mifinity.com/api/payments/pab \
      -H 'accept: application/json' \
      -H 'content-type: application/json' \
      -H 'key: sQO8Q3i5-HeD7F0BqVSIN1p......qnjqMDo8Bl0GKUTvexaVm5n7g' \
      -H 'x-api-version: 1' \
      -d '{
            "money" : {"amount":10, "currency":"EUR"},
            "description" : "10 EUR PAB",
            "sourceAccount" : "5001000001080652",
            "traceId" : "zeihwhp-43gs8iwyf7v4h9k",
            "bankPayee": {
              "country": "ES",
              "currency": "EUR",
              "description": "bank payment description",
              "fields": {
                "IBAN": "ES7921000813610123456789",
                "BIC": "AYGBESMM",
                "BENEFICIARY_ADDRESS_COUNTRY_ISO_CODE":"ES", 
                "CUSTOMER_NAME": "Customer Name",
                "BANK_NAME": "Name of Bank"
              }
            }
    }'
    
    var data = JSON.stringify({
           "money" : {"amount":10, "currency":"EUR"},
            "description" : "10 EUR PAB",
            "sourceAccount" : "5001000001080652",
            "traceId" : "zeihwhp-43gs8iwyf7v4h9k",
            "bankPayee": {
              "country": "ES",
              "currency": "EUR",
              "description": "bank payment description",
              "fields": {
                "IBAN": "ES7921000813610123456789",
                "BIC": "AYGBESMM",
                "BENEFICIARY_ADDRESS_COUNTRY_ISO_CODE":"ES", 
                "CUSTOMER_NAME": "Customer Name",
                "BANK_NAME": "Name of Bank"
              }
      }
    });
    
    var xhr = new XMLHttpRequest();
    xhr.withCredentials = true;
    
    xhr.addEventListener("readystatechange", function () {
      if (this.readyState === 4) {
        console.log(this.responseText);
      }
    });
    
    xhr.open("POST", "https://demo.mifinity.com/api/payments/pab");
    xhr.setRequestHeader("accept", "application/json");
    xhr.setRequestHeader("content-type", "application/json");
    xhr.setRequestHeader("x-api-version", "1");
    xhr.setRequestHeader("key", "sQO8Q3i5-HeD7F0BqVSIN1p......qnjqMDo8Bl0GKUTvexaVm5n7g");
    xhr.send(data);
    
    <?php
    
    $request = new HttpRequest();
    $request->setUrl('https://demo.mifinity.com/api/payments/pab');
    $request->setMethod(HTTP_METH_POST);
    
    $request->setHeaders(array(
      'key' => 'sQO8Q3i5-HeD7F0BqVSIN1p......qnjqMDo8Bl0GKUTvexaVm5n7g',
      'x-api-version' => '1',
      'content-type' => 'application/json',
      'accept' => 'application/json'
    ));
    
    $request->setBody('{
            "money" : {"amount":10, "currency":"EUR"},
            "description" : "10 EUR PAB",
            "sourceAccount" : "5001000001080652",
            "traceId" : "zeihwhp-43gs8iwyf7v4h9k",
            "bankPayee": {
              "country": "ES",
              "currency": "EUR",
              "description": "bank payment description",
              "fields": {
                "IBAN": "ES7921000813610123456789",
                "BIC": "AYGBESMM",
                "BENEFICIARY_ADDRESS_COUNTRY_ISO_CODE":"ES", 
                "CUSTOMER_NAME": "Customer Name",
                "BANK_NAME": "Name of Bank"
              }
            }
    }');
    
    try {
      $response = $request->send();
    
      echo $response->getBody();
    } catch (HttpException $ex) {
      echo $ex;
    }
    ?>
    

    Money

    Field Type Required Description
    amount Number Transaction value
    currency String Currency code (ISO 4217): EUR

    BankPayee

    Field Type Required Description
    country String Bank payee country code: ES
    currency String Bank Payee Currency: EUR
    entityId String optional BankPayee unique identification number
    description String optional Any description you want to assign to this operation
    fields Map Map of type String

    fields

    Field Type Required Description
    IBAN String Bank IBAN: Alphanumeric (24)
    BIC String Bank BIC: Alphanumeric (Min 8, Max 11)
    CUSTOMER_NAME String Bank customer name
    BANK_NAME String Bank Name
    BENEFICIARY_ADDRESS_COUNTRY_ISO_CODE String Country code

    Successful response

    {
    
        "payload": [
            {
                "transactionId": "6PX0FjAufQSJ9eEMzjdyuMpFeR4vXI_Ln08rgzdvO-I=",
                "transactionReference": "4c9f3bf3-1c92-4d79-bbf0-b3d85cee2980",
                "traceId": "82595452748399303479",
                "datePosted": "2018-09-24T09:53:52.158Z",
                "sourceMoney": {
                    "amount": 10,
                    "currency": "EUR",
                    "displayable": "EUR10.00"
                },
                "destinationMoney": {
                    "amount": 10,
                    "currency": "EUR",
                    "displayable": "EUR10.00"
                },
                "exchangeRate": 1,
                "totalFees": {
                    "amount": 0,
                    "currency": "EUR",
                    "displayable": "EUR0.00"
                }
            }
        ]
    }
    

    18. Finland

    require 'uri'
    require 'net/http'
    
    url = URI("https://demo.mifinity.com/api/payments/pab")
    
    http = Net::HTTP.new(url.host, url.port)
    http.use_ssl = true
    http.verify_mode = OpenSSL::SSL::VERIFY_NONE
    
    request = Net::HTTP::Post.new(url)
    request["accept"] = 'application/json'
    request["content-type"] = 'application/json'
    request["x-api-version"] = '1'
    request["key"] = 'sQO8Q3i5-HeD7F0BqVSIN1p......qnjqMDo8Bl0GKUTvexaVm5n7g'
    request.body = "{\n        \"money\" : {\"amount\":10, \"currency\":\"EUR\"},
    \n        \"description\" : \"10 EUR PAB\",
    \n        \"sourceAccount\" : \"5001000001080652\",
    \n        \"traceId\" : \"zeihwhp-43gs8iwyf7v4h9k\",
    \n        \"bankPayee\": {\n          \"country\": \"FI\",
    \n          \"currency\": \"EUR\",
    \n          \"description\": \"bank payment description\",
    \n          \"fields\": {\n            \"IBAN\": \"FI1410093000123458\",
    \n            \"BIC\": \"CTECFIHH\", 
    \n            \"BENEFICIARY_ADDRESS_COUNTRY_ISO_CODE\": \"FI\",  
    \n            \"CUSTOMER_NAME\": \"Customer Name\",
    \n            \"BANK_NAME\": \"Name of Bank\"\n          }\n        }\n}"
    
    response = http.request(request)
    puts response.read_body
    
    import requests
    
    url = "https://demo.mifinity.com/api/payments/pab"
    
    payload = "{\n        \"money\" : {\"amount\":10, \"currency\":\"EUR\"}, \
    \n        \"description\" : \"10 EUR PAB\", \
    \n        \"sourceAccount\" : \"5001000001080652\", \
    \n        \"traceId\" : \"zeihwhp-43gs8iwyf7v4h9k\", \
    \n        \"bankPayee\": {\n          \"country\": \"FI\", \
    \n          \"currency\": \"EUR\", \
    \n          \"description\": \"bank payment description\", \
    \n          \"fields\": {\n            \"IBAN\": \"FI1410093000123458\", \
    \n            \"BIC\": \"CTECFIHH\",\
    \n            \"BENEFICIARY_ADDRESS_COUNTRY_ISO_CODE\": \"FI\", \
    \n            \"CUSTOMER_NAME\": \"Customer Name\", \
    \n            \"BANK_NAME\": \"Name of Bank\"\n          }\n        }\n}"
    
    headers = {
        'accept': "application/json",
        'content-type': "application/json",
        'x-api-version': "1",
        'key': "sQO8Q3i5-HeD7F0BqVSIN1p......qnjqMDo8Bl0GKUTvexaVm5n7g"
        }
    
    response = requests.request("POST", url, data=payload, headers=headers)
    
    print(response.text)
    
    curl -X POST \
      https://demo.mifinity.com/api/payments/pab \
      -H 'accept: application/json' \
      -H 'content-type: application/json' \
      -H 'key: sQO8Q3i5-HeD7F0BqVSIN1p......qnjqMDo8Bl0GKUTvexaVm5n7g' \
      -H 'x-api-version: 1' \
      -d '{
            "money" : {"amount":10, "currency":"EUR"},
            "description" : "10 EUR PAB",
            "sourceAccount" : "5001000001080652",
            "traceId" : "zeihwhp-43gs8iwyf7v4h9k",
            "bankPayee": {
              "country": "FI",
              "currency": "EUR",
              "description": "bank payment description",
              "fields": {
                "IBAN": "FI1410093000123458",
                "BIC": "CTECFIHH",
                "BENEFICIARY_ADDRESS_COUNTRY_ISO_CODE":"FI",
                "CUSTOMER_NAME": "Customer Name",
                "BANK_NAME": "Name of Bank"
              }
            }
    }'
    
    var data = JSON.stringify({
       "money" : {"amount":10, "currency":"EUR"},
            "description" : "10 EUR PAB",
            "sourceAccount" : "5001000001080652",
            "traceId" : "zeihwhp-43gs8iwyf7v4h9k",
            "bankPayee": {
              "country": "FI",
              "currency": "EUR",
              "description": "bank payment description",
              "fields": {
                "IBAN": "FI1410093000123458",
                "BIC": "CTECFIHH",
                "BENEFICIARY_ADDRESS_COUNTRY_ISO_CODE":"FI",
                "CUSTOMER_NAME": "Customer Name",
                "BANK_NAME": "Name of Bank"
              }
      }
    });
    
    var xhr = new XMLHttpRequest();
    xhr.withCredentials = true;
    
    xhr.addEventListener("readystatechange", function () {
      if (this.readyState === 4) {
        console.log(this.responseText);
      }
    });
    
    xhr.open("POST", "https://demo.mifinity.com/api/payments/pab");
    xhr.setRequestHeader("accept", "application/json");
    xhr.setRequestHeader("content-type", "application/json");
    xhr.setRequestHeader("x-api-version", "1");
    xhr.setRequestHeader("key", "sQO8Q3i5-HeD7F0BqVSIN1p......qnjqMDo8Bl0GKUTvexaVm5n7g");
    xhr.send(data);
    
    <?php
    
    $request = new HttpRequest();
    $request->setUrl('https://demo.mifinity.com/api/payments/pab');
    $request->setMethod(HTTP_METH_POST);
    
    $request->setHeaders(array(
      'key' => 'sQO8Q3i5-HeD7F0BqVSIN1p......qnjqMDo8Bl0GKUTvexaVm5n7g',
      'x-api-version' => '1',
      'content-type' => 'application/json',
      'accept' => 'application/json'
    ));
    
    $request->setBody('{
             "money" : {"amount":10, "currency":"EUR"},
            "description" : "10 EUR PAB",
            "sourceAccount" : "5001000001080652",
            "traceId" : "zeihwhp-43gs8iwyf7v4h9k",
            "bankPayee": {
              "country": "FI",
              "currency": "EUR",
              "description": "bank payment description",
              "fields": {
                "IBAN": "FI1410093000123458",
                "BIC": "CTECFIHH",
                "BENEFICIARY_ADDRESS_COUNTRY_ISO_CODE":"FI",
                "CUSTOMER_NAME": "Customer Name",
                "BANK_NAME": "Name of Bank"
              }
            }
    }');
    
    try {
      $response = $request->send();
    
      echo $response->getBody();
    } catch (HttpException $ex) {
      echo $ex;
    }
    ?>
    

    Money

    Field Type Required Description
    amount Number Transaction value
    currency String Currency code (ISO 4217): EUR

    BankPayee

    Field Type Required Description
    country String Bank payee country code: FI
    currency String Bank Payee Currency: EUR
    entityId String optional BankPayee unique identification number
    description String optional Any description you want to assign to this operation
    fields Map Map of type String

    fields

    Field Type Required Description
    IBAN String Bank IBAN: Alphanumeric (18)
    BIC String Bank BIC: Alphanumeric (Min 8, Max 11)
    CUSTOMER_NAME String Bank customer name
    BANK_NAME String Bank Name
    BENEFICIARY_ADDRESS_COUNTRY_ISO_CODE String Country code

    Successful response

    {
    
        "payload": [
            {
                "transactionId": "6PX0FjAufQSJ9eEMzjdyuMpFeR4vXI_Ln08rgzdvO-I=",
                "transactionReference": "4c9f3bf3-1c92-4d79-bbf0-b3d85cee2980",
                "traceId": "82595452748399303479",
                "datePosted": "2018-09-24T09:53:52.158Z",
                "sourceMoney": {
                    "amount": 10,
                    "currency": "EUR",
                    "displayable": "EUR10.00"
                },
                "destinationMoney": {
                    "amount": 10,
                    "currency": "EUR",
                    "displayable": "EUR10.00"
                },
                "exchangeRate": 1,
                "totalFees": {
                    "amount": 0,
                    "currency": "EUR",
                    "displayable": "EUR0.00"
                }
            }
        ]
    }
    

    19. France

    require 'uri'
    require 'net/http'
    
    url = URI("https://demo.mifinity.com/api/payments/pab")
    
    http = Net::HTTP.new(url.host, url.port)
    http.use_ssl = true
    http.verify_mode = OpenSSL::SSL::VERIFY_NONE
    
    request = Net::HTTP::Post.new(url)
    request["accept"] = 'application/json'
    request["content-type"] = 'application/json'
    request["x-api-version"] = '1'
    request["key"] = 'sQO8Q3i5-HeD7F0BqVSIN1p......qnjqMDo8Bl0GKUTvexaVm5n7g'
    request.body = "{\n        \"money\" : {\"amount\":10, \"currency\":\"EUR\"},
    \n        \"description\" : \"10 EUR PAB\",
    \n        \"sourceAccount\" : \"5001000001080652\",
    \n        \"traceId\" : \"zeihwhp-43gs8iwyf7v4h9k\",
    \n        \"bankPayee\": {\n          \"country\": \"FR\",
    \n          \"currency\": \"EUR\",
    \n          \"description\": \"bank payment description\",
    \n          \"fields\": {\n            \"IBAN\": \"FR7630006000011234567890189\",
    \n            \"BIC\": \"TSIGFR22\",
     \n            \"BENEFICIARY_ADDRESS_COUNTRY_ISO_CODE\": \"FR\",
     \n            \"CUSTOMER_NAME\": \"Customer Name\",
     \n            \"BANK_NAME\": \"Name of Bank\"\n          }\n        }\n}"
    
    response = http.request(request)
    puts response.read_body
    
    import requests
    
    url = "https://demo.mifinity.com/api/payments/pab"
    
    payload = "{\n        \"money\" : {\"amount\":10, \"currency\":\"EUR\"}, \
    \n        \"description\" : \"10 EUR PAB\", \
    \n        \"sourceAccount\" : \"5001000001080652\", \
    \n        \"traceId\" : \"zeihwhp-43gs8iwyf7v4h9k\", \
    \n        \"bankPayee\": {\n          \"country\": \"FR\", \
    \n          \"currency\"