CS SDK Configuration

Configuring the Check Scanning SDK

Payology Check Scanning SDK Files

The Payology Check Scanning SDK contains only two files: one is an example of the functions of the SDK and the other is the library used to call on those functions.

PathNameDescription
\Index.htmlExample UI which allows for the calling of each method outlined in the below sections.
\lib\CheckForce.min.jsJavaScript library consisting of all CheckForce functions.

SDK Methods

To implement the Payology Check Scanning SDK, you must import and use each Method. Developers can choose to use "script" tags to import the JavaScript file and instantiate the CheckForce object within web-based applications.

<script src="lib/CheckForce.min.js"></script>
  <script>
     var cf = new CheckForce();
  </script>

The primary method which will be utilized is "scanChecks", which executes the check scanning function. However, before use, developers must first call the “setup” method, ensuring that the license assigned is valid. Important, yet optional settings, can also be configured using the "setup" method within the environment. "scanChecks" is considered “void” as it does not return any response.

“scanChecks” Method Arguments:

Callback FunctionRequiredDescription
cbCheckYesThis function will be called per image and results in a JSON Object containing all recognized data.
cbTotalNoUpon completion of the scanning/feeding process, this function will result in a unique integer corresponding to the number of scanned items.
isBarCodeOnlyCouponNoEnables barcode detection engine for remittance item.
isMultiCouponPerCheckNoChanges algorithm to detect more than one remittance item per coupon.
isDuplexNoReturns rear image JPG of remittance items scanned.

"scanChecks" Method Example:

cf.scanChecks(receiveCheck, total);

“setup” Method Arguments:

ArgumentRequiredDescription
License NumberYesLicense number provided by the Check21.com Account Management or Sales Teams.
EndorsementNoEndorses check or remittance items being scanned. This argument requires a check printer and ink to be installed within each check scanner.
Application IDNoUsed for template based remittance scanning and provided by the Check21.com Account Management team.
Scanner AddressNoBy default, and upon installation of Ranger Remote, the scanner address is set to 127.0.0.1. A change to this argument requires a change of configuration in Ranger Remote.
Scanner PortNoBy default, and upon installation of Ranger Remote, the scanner port is set to 9003 (SSL Port). A change to this argument requires a change of configuration in Ranger Remote.
Payology URLNoBy default, this argument is set to the Production Payology URL. If you require a Sandbox URL, please contact your Account Executive.
OCR Suffix DirectoryNoBy default, this points to the latest version of the OCR Engine. Downgrades are no longer permissible.
License Suffix DirectoryNoBy default, this points to the latest version of the Licensing Engine. Downgrades are no longer permissible.
Barcode Suffix DirectoryNoBy default, this points to the latest version of the Barcode Reader Engine. Downgrades are no longer permissible.
Is AustralianNoBy default, the Payology SDK parses the MICR line using US MICR formatting. If marked True, MICR line formatting and parsing would be changed to an Australian method.
Retrieve GrayscaleNoBy default, the SDK allows for the retrieval of images in Bitonal format. If scanning barcodes and higher resolution is needed, please mark this argument, "True". If using the Check21.com Payment Gateway as a conduit for check transmissions to your bank, please ensure that solely bitonal check images are provided.
Disable Double Feed DetectionNoBy default, this argument is marked "False". Marking the argument true, a recommendation of the Check21.com team, would ignore Double Feed detection errors. These false positive errors appear at a high rate with check scanning hardware that is not well maintained.
Maximum Bar Codes Per PageNoNumber of barcodes which will appear on remittance item.
Endorsement Line 1NoVirtual Endorsement Line 1 Text to be displayed on rear image of check.
Endorsement Line 2NoVirtual Endorsement Line 2 Text to be displayed on rear image of check.
Endorsement Line 3NoVirtual Endorsement Line 3 Text to be displayed on rear image of check.
Compression QualityNoCompress front and rear image of items being scanned. Options available are: 0.2 / 0.4 / 0.6 / 0.8 / 1
OCR ReaderNoEnable OCR Reader (Default is disabled) for remittance item OCR scanning.
OCR FontNoIf OCR Reader is enabled, choose which OCR font is being searched on remittance items. Options available are: OCRA or OCRB
OCR VerticalNoFor Remittance Items: Vertical center of the OCR line in millimeters from bottom of item.
OCR RightNoFor Remittance Items: Right edge of OCR line in millimeters from the right edge of the item.
OCR WidthNoFor Remittance Items: Width of OCR line in millimeters from the "Right" value.
OCR HeightNoFor Remittance Items: Height of OCR line in millimeters.
returnRearJpgNoWhen enabled, returns the rear image of the scanned check item in JPG.
OCR Reader 2NoEnable OCR Reader 2 (Default is disabled) for additional MICR accuracy *only available to multi-OCR reader scanners.
OCR Font 2Nof OCR Reader is enabled, choose which OCR font is being searched on the check item. Option available: E13B
OCR Vertical 2NoFor Check Items: Vertical center of the OCR line in millimeters from bottom of item.
OCR Right 2NoFor Check Items: Right edge of OCR line in millimeters from the right edge of the item.
OCR Width 2NoFor Check Items: Width of OCR line in millimeters from the "Right" value.
OCR Height 2NoFor Check Items: Height of OCR line in millimeters.

"setup" Method Example:

cf.setup('1234569956577868', false, null, null, null, null, null, null, null, 
                isAustralian, isGrayscale,isDoubleFeedDisabled,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null);

Important Notes

If your clients are using a check scanner that has an installed printer module but does not contain an ink cartridge, the endorsement option must be disabled. If it is not disabled, checks will not be fed into the check scanner and an error will occur.

Fields and Values of Successful JSON Response

Upon successful submission of a check image, a JSON response is returned. The JSON response includes a variety of different fields and values.

Example of Successful Result

Below is a successful response upon check image scanning. Please note, the TIFF and JPG fields have been edited prior to their presentment on this page.

{
  "seq": 1,
  "status": "success",
  "frontTiff": "SUkqAAgAAAARAP4ABAABAAAAAAAAAAABBAABAAA ... front tiff base64 ",
  "backTiff": "SUkqAAgAAAARAP4ABAABAAAAAAAAAAABBAABAAAAu ... back tiff base64",
  "scannerMicr": "c002372c d063000047d 898049685119c",
  "base64TifBackEndorse":   "SUkqAAgAAAARAP4ABAABAAAAAAAAAAABBAABAAAAu ... back tiff base64",
  "frontJpg": "/9j/4AAQSkZJRgABAgAAAQABAAD/2wBDAAgGBgcGBQ ... front jpeg base64",
  "fields": [
    {
      "Confidence": 1000,
      "Value": "U002372UT063000047T837362685119U",
      "Accepted": true,
      "Name": "ACR_Codeline1",
      "Location": {
        "Left": 344,
        "Top": 634,
        "Right": 1204,
        "Bottom": 659
      }
    },
    {
      "Payor_Parsed": {
        "Param": [
          {
            "Confidence": 85,
            "Value": "Check21.com LLC",
            "Accepted": true,
            "Name": "Name1"
          },
          {
            "Confidence": 0,
            "Value": "Long",
            "Accepted": false,
            "Name": "Name2"
          },
          {
            "Confidence": 100,
            "Value": 4,
            "Accepted": true,
            "Name": "Number of Lines"
          },
          {
            "Confidence": 100,
            "Value": 97,
            "Accepted": true,
            "Name": "Overall Score"
          },
          {
            "Confidence": 0,
            "Value": "Long",
            "Accepted": false,
            "Name": "Phone"
          },
          {
            "Confidence": 0,
            "Value": "Long",
            "Accepted": false,
            "Name": "PO Box"
          },
          {
            "Confidence": 0,
            "Value": "Long",
            "Accepted": false,
            "Name": "Social Security Number1"
          },
          {
            "Confidence": 0,
            "Value": "Long",
            "Accepted": false,
            "Name": "Social Security Number2"
          },
          {
            "Confidence": 100,
            "Value": "FL",
            "Accepted": true,
            "Name": "State"
          },
          {
            "Confidence": 100,
            "Value": "3389 Sheridan Street",
            "Accepted": true,
            "Name": "Street"
          },
          {
            "Confidence": 100,
            "Value": "Hollywood",
            "Accepted": true,
            "Name": "Town"
          },
          {
            "Confidence": 100,
            "Value": 33021,
            "Accepted": true,
            "Name": "Zip Code"
          }
        ]
      },
      "Confidence": "00",
      "Value": "|Nm1=Check21.com LLC[85]|Nm2=Long[0]|St=3389 Sheridan Street[100]|Apt=503[100]|Ssn1=Long[0]|Ssn2=Long[0]|Drv1=Long[0]|Drv2=Long[0]|Ph=Long[0]|Fx=Long[0]|Box=Long[0]|Twn=Hollywood[100]|State=FL[100]|Zip=33021[100]|Email=Long[0]|Dob1=Long[0]|Dob2=Long[0]|Lines=4|Score=97|Win=<94,302,201,542>|Dt=3|Flags=0x1 IQA=11 iqaprm=1 Dres=<6,1,100,0",
      "Accepted": false,
      "Name": "PayorNameAndAddress",
      "Location": {
        "Left": 38,
        "Top": 46,
        "Right": 1185,
        "Bottom": 253
      }
    },
    {
      "Confidence": 930,
      "Value": "04-12-2017",
      "Accepted": true,
      "Name": "DATE",
      "Location": {
        "Left": 1412,
        "Top": 173,
        "Right": 1535,
        "Bottom": 194
      }
    },
    {
      "Confidence": 1000,
      "Value": "1.00",
      "Accepted": true,
      "Name": "Amount",
      "Location": {
        "Left": 1401,
        "Top": 268,
        "Right": 1478,
        "Bottom": 295
      }
    }
  ],
  "paper": "Check",
  "micr": "U002372UT063000047T898049685119U",
  "routing": "063000047",
  "accountNumber": "898049685119",
  "checkNumber": "002372",
  "usability": [
    {
      "content": "Passed",
      "Name": "IntegrityTest"
    },
    {
      "content": "Passed",
      "Name": "MICRLine"
    },
    {
      "content": "Passed",
      "Name": "PayorNameAndAddress"
    },
    {
      "content": "Passed",
      "Name": "Signature"
    },
    {
      "content": "NotTested",
      "Name": "Date"
    },
    {
      "content": "NotTested",
      "Name": "Endorsement"
    },
    {
      "content": "Passed",
      "Name": "CourtesyAmount"
    },
    {
      "content": "Passed",
      "Name": "LegalAmount"
    },
    {
      "content": "NotTested",
      "Name": "Payee"
    }
  ],
  "iqa": [
    {
      "content": "Passed",
      "Name": "FrontTooDark"
    },
    {
      "content": "Passed",
      "Name": "FrontTooLight"
    },
    {
      "content": "Passed",
      "Name": "PiggyBack"
    },
    {
      "content": "Passed",
      "Name": "MinSize"
    },
    {
      "content": "Passed",
      "Name": "MaxSize"
    },
    {
      "content": "Passed",
      "Name": "FrontExcessiveSkew"
    },
    {
      "content": "Passed",
      "Name": "FrontStreak"
    },
    {
      "content": "Passed",
      "Name": "UpsideDown"
    },
    {
      "content": "Passed",
      "Name": "DogsEar"
    },
    {
      "content": "Passed",
      "Name": "TornEdges"
    },
    {
      "content": "Passed",
      "Name": "FramingError"
    },
    {
      "content": "Passed",
      "Name": "FrontExcessiveSpot"
    },
    {
      "content": "Passed",
      "Name": "FrontBelowMinimumSize"
    },
    {
      "content": "Passed",
      "Name": "FrontAboveMaximumSize"
    }
  ]
}

Next Steps

As developers who may be reviewing this section of the guide, it is important to understand what occurs once the scan function is invoked. The next section identifies the processes both internally and externally. For further information, please see Under the Hood.