Trang chủ  Web Service API

Table of Contents

Please note this content is available only in English

Fraud Analysis

  • http://www.ekim.vn/fraudcheck/order?Parameters
  • Parameters:
    • licence: The provided licence key
    • ip: IP address to be analyzed against fraud
    • returnUrl: URL to process analysis result
    • billAddr: Street billing address
    • billCity: City of the billing address
    • billState: Region of the billing address
    • billPostal: Postal / ZIP code of the billing address
    • billCountry: Country of the billing address
    • txnId: ID of the order to be analyzed
    • priority: IP address to be analyzed against fraud
    • email: Email of the customer
    • bin: Bank identification number of the payment credit card
    • shipAddr: Street shipping address
    • shipCity: City of the shipping address
    • shipState: Region / state of the shipping address
    • shipPostal: Postal / ZIP code of the shipping address
    • shipCountry: Country of the shipping address
    • phone: Contact phone number of the customer
  • Below is an example of how to construct a valid URL to request fraud analysis:

    http://www.ekim.vn/fraudcheck/order?licence=<YOUR_LICENCE_KEY>&ip=111.111.111.111&returnUrl=www.example.com/getresult

    In order to use this service, you must first register. Once registered, FDS will send you a licence key, which you will provide to the service as a required parameter. Other required parameters you will have to provide are ip, which you desire to analyze against and returnUrl, which the analysis result will be posted to.

    billAddr, billCity, billState, billPostal, billCountry, txnId, priority are all optional parameters, when provided will be used to calculate the distance from billing address to ip's location.

    email, bin, shipAddr, shipCity, shipState, shipPostal, shipCountry are recommended to provide when you desire to check for risky email or valid bank identification number. FDS recommends you to provide these parameters for more accurate fraud analysis.

    Once the analysis is completed, Fraud Buster Server will return the basic result. The detailed result will be posted to your provided returnUrl. Go to the next session to know how to retrieve the more detailed analysis result. The following code sample will show you how to make a request:

    Make a request with XML response:

    <?php
    require_once('/path/to/FraudCheckClient.php');
    $config = array ('ip'=>'111.111.111.111',
                     'returnUrl'=>'www.example.com/getresult',
                     'licence'=>'YOUR_LICENCE_KEY',
                     'billAddr'=>'222 Le Trong Tan',
                     'billCity'=>'Thanh Xuan',
                     'billState'=>'Dong Da',
                     'priority'=>'2',
                     'output'=>'xml');
    $fc = new FraudCheckClient($config);
    /* The response is an XML string. You will have to either convert it to array or use other means to access its nodes */
    $result = $fc->fraudCheck();
    print_r ($result);
    ?>
            

    Here is the XML response: 

    Request with JSON response:

    <?php
    require_once('/path/to/FraudCheckClient.php');
    /* JSON is the default response format */
    $config = array ('ip'=>'111.111.111.111',
                     'returnUrl'=>'www.example.com/getresult',
                     'licence'=>'YOUR_LICENCE_KEY',
                     'billAddr'=>'222 Le Trong Tan',
                     'billCity'=>'Thanh Xuan',
                     'billState'=>'Dong Da',
                     'priority'=>'2');
    $fc = new FraudCheckClient($config);
    /* Require PHP >= 5.2 to work. If older PHP, please use a third-party library to decode JSON */
    $result = json_decode($fc->fraudCheck(), 1);
    print_r ($result);
    ?&gt
            

    Here is the JSON response: 

Retrieve Fraud Analysis Result

  • http://www.ekim.vn/fraudcheck/getresult?Parameters
  • Parameters:
    • licence: The provided licence key
    • refId: The reference ID returned with Fraud Analysis call
  • If you desire to know our detailed analysis result, which includes our recommendation, you will have to provide the supplied licence key and the refId to this API call. Following are the PHP code samples which return XML and JSON responses respectively:

    API call with XML response:

    <?php
    require_once('/path/to/FraudCheckClient.php');
    $config = array ('licence'=>'YOUR_LICENCE_KEY',
                     'refId'=>'ANALYSIS_CALL_REFERENCE_ID'
                     'output'=>'xml');
    $fc = new FraudCheckClient($config);
    /* The response is an XML string. You will have to either convert it to array or use other means to access its nodes */
    $result = $fc->retrieveFraudCheckResult();
    print_r ($result);
    ?>
            

    Response: 

    API call with JSON response:

    <?php
    require_once('/path/to/FraudCheckClient.php');
    $config = array ('licence'=>'YOUR_LICENCE_KEY',
                     'refId'=>'ANALYSIS_CALL_REFERENCE_ID');
    $fc = new FraudCheckClient($config);
    /* Require PHP >= 5.2 to work. If older PHP, please use a third-party library to decode JSON */
    $result = json_decode($fc->retrieveFraudCheckResult(), 1);
    print_r ($result);
    ?>
            

    Response: 

Telephone Verification

  • http://www.ekim.vn/fraudcheck/verifyphone/phonenumber
  • phonenumber is the telephone number to be verified. You only need to specify the telephone number which you desire to verify. Fraud Buster Server will return back to you a json-encoded or XML response.

    The following code samples show you how to make a phone verification API call:

    API call with XML response:

    <?php
    require_once('/path/to/FraudCheckClient.php');
    $config = array ('licence'=>'YOUR_LICENCE_KEY',
                     'phoneno'=>'VERIFIED_TELEPHONE_NUMBER',
                     'output'=>'xml');
    $fc = new FraudCheckClient($config);
    /* The response is an XML string. You will have to either convert it to array or use other means to access its nodes */
    $result = json_decode($fc->verifyTelephone(), 1);
    print_r ($result);
    ?>
            

    Response:

                
    <data>
        <number>PROVIDED_PHONE_NUMBER</number>
        <city>Le Trong Tan</city>
        <state>Ha Noi</state>
        <country>Vietnam</country>
        <type>Mobile</type>
        <description>
            Mobile telephones are provided by companies such as Verizon, Cingular, or Sprint. Users of these phones must sign contracts, making these telephone numbers traceable. These phone numbers are generally low-risk. However, some prepaid mobile phones will be identified as Mobile.
        </description>
        <risk>Low</risk>
        <refid>749E78CF7DA94BB368C4145E262314DA</refid>
    </data>
            

    API call with JSON-formatted response:

    <?php
    require_once('/path/to/FraudCheckClient.php');
    $config = array ('licence'=>'YOUR_LICENCE_KEY',
                     'phoneno'=>'VERIFIED_TELEPHONE_NUMBER');
    $fc = new FraudCheckClient($config);
    /* Require PHP >= 5.2 to work. If older PHP, please use a third-party library to decode JSON */
    $result = json_decode($fc->verifyTelephone(), 1);
    print_r ($result);
    ?>
            

    Response:

                
    {
        "number":"PROVIDED_PHONE_NUMBER",
        "city":"Le Trong Tan",
        "state":"Ha Noi",
        "country":"Vietnam",
        "type":"Mobile",
        "description":"Mobile telephones are provided by companies such as Verizon, Cingular, or Sprint. Users of these phones must sign contracts, making these telephone numbers traceable. These phone numbers are generally low-risk. However, some prepaid mobile phones will be identified as Mobile.",
        "risk":"Low",
        "refid":"749E78CF7DA94BB368C4145E262314DA"
    }
            

BIN Look-up

  • http://www.ekim.vn/fraudcheck/checkcc/bin
  • bin is the Bank Identication Number of the payment credit card to be looked up. You do not have to specify licence for this API call.

    Below are the sample codes for this API call:

    API call with XML response

    <?php
    require_once('/path/to/FraudCheckClient.php');
    $config = array ('binno'=>'VERIFYING_BANK_IDENTIFICATION_NUMBER',
                     'output'=>'xml');
    $fc = new FraudCheckClient($config);
    /* The response is an XML string. You will have to either convert it to array or use other means to access its nodes */
    $result = $fc->verifyBIN();
    print_r ($result);
    ?>
            

    The response:

    <data>
        <binnumber>BIN_NUMBER</binnumber>
        <binname>JPMORGAN CHASE BANK N.A. - DEBIT</binname>
        <cardtype>DEBIT</cardtype>
        <cardsubtype>CLASSIC</cardsubtype>
        <bincountry>UNITED STATES</bincountry>
        <iso>US</iso>
        <binphone></binphone>
    </data>
            

    API call with JSON response

    <?php
    require_once('/path/to/FraudCheckClient.php');
    $config = array ('binno'=>'VERIFYING_BANK_IDENTIFICATION_NUMBER');
    $fc = new FraudCheckClient($config);
    /* Require PHP >= 5.2 to work. If older PHP, please use a third-party library to decode JSON */
    $result = json_decode($fc->verifyBIN(), 1);
    print_r ($result);
    ?>
            

    The response:

    {
        "binnumber":"BIN_NUMBER",
        "binname":"JPMORGAN CHASE BANK N.A. - DEBIT",
        "cardtype":"DEBIT",
        "cardsubtype":"CLASSIC",
        "bincountry":"UNITED STATES",
        "iso":"US",
        "binphone":""
    }
            

IP to Location

  • http://www.ekim.vn/fraudcheck/iptolocation?Parameters
  • Parameters:
    • licence: The provided licence key
    • ip: IP address to be requested
  • Look up the location of the provided IP address. Below are the code samples with XML and JSON responses respectively:

    API call with XML response

    <?php
    require_once('/path/to/FraudCheckClient.php');
    $config = array ('ip'=>'IP',
                     'output'=>'xml');
    $fc = new FraudCheckClient($config);
    /* The response is an XML string. You will have to either convert it to array or use other means to access its nodes */
    $result = json_decode($fc->verifyTelephone(), 1);
    print_r ($result);
    ?>
            

    The response:

    <data>
        <success>1</success>
        <isp>VietNam Post and Telecom Corporation</isp>
        <organization>VietNam Data Communication Company (VDC)</organization>
        <countryCode>VN</countryCode>
        <country>Vietnam</country>
        <region>Hà Nội</region>
        <city>Thanh Xuân</city>
        <latitude>21.0333</latitude>
        <longitude>105.8500</longitude>
        <postalCode/>
        <metroCode/>
        <areaCode/>
    </data>
            

    API call with JSON response

    <?php
    require_once('/path/to/FraudCheckClient.php');
    $config = array ('ip'=>'IP');
    $fc = new FraudCheckClient($config);
    /* Require PHP >= 5.2 to work. If older PHP, please use a third-party library to decode JSON */
    $result = json_decode($fc->verifyTelephone(), 1);
    print_r ($result);
    ?>
            

    The response:

    {
        "success":1,
        "isp":"VietNam Post and Telecom Corporation",
        "organization":"VietNam Data Communication Company (VDC)",
        "countryCode":"VN",
        "country":"Vietnam",
        "region":"Hà Nội",
        "city":"Thanh Xuân",
        "latitude":"21.0333",
        "longitude":"105.8500",
        "postalCode":"",
        "metroCode":"",
        "areaCode":""
    }