E-Payment Integrator 2020 Python Edition

Questions / Feedback?

Check21 Class

Properties   Methods   Events   Configuration Settings   Errors  

The Check21 class is used to construct a file containing scanned images of paper checks, and optionally upload it to an FTPS server.

Syntax

class inpay.Check21

Remarks

An X9.37 file created by this class will contain the following records:

  • File Header Record (1)
  • Cash Letter Header Record (1)
  • Bundle Header Record (1)
  • Check detail record structure (0 to CheckCount), which contains:
    • Check Detail Record (1)
    • Check Detail Addenda A (1)
    • Front Image View Detail Record (0 or 1)
    • Front Image View Data Record (0 or 1)
    • Back Image View Detail Record (0 or 1)
    • Back Image View Data Record (0 or 1)
  • Bundle Control Record (1)
  • Cash Letter Control Record (1)
  • File Control Record (1)

This class makes creating the above file very easy. First set the origin properties with information about the institution that is originating this file, and the destination it is to be deposited to. Also set the return_routing_number.

  Check21.OriginName = "First Bank of Thor"
  Check21.OriginRoutingNumber = "111012822"
  Check21.OriginContactName = "Jake Olsen"
  Check21.OriginContactPhone = "800-555-5555"
  Check21.DestinationRoutingNumber = "051000321"
  Check21.DestinationName = "First Bank of Loki"
  Check21.ReturnRoutingNumber = "111012822"
This file must be differentiated from other files, so now set the cash_letter_id and cycle_number properties, as well as the filename. (Alternatively filename may be left empty, and the class will write the file to memory and store it in the file_data property).


  Check21.CashLetterId = "123456"
  Check21.CycleNumber = "01"
  Check21.Filename = "sample_output.dat"
This file is going to contain scanned images of paper checks, so record_type should be set to rtChecksAndImages and make sure the documentation_type is set to a compatible value ("G" through "J" are valid when record_type is rtChecksAndImages).
  Check21.RecordType = rtChecksAndImages
  Check21.DocumentationType = "G"
This sample file is to contain only one check, but a real file may contain any number of checks. To add a check, set the CheckCount, and then fill the Check array properties with information read off the check's MICR line, as well as the Payee's name and the amount of the check.
  Check21.CheckCount = 1
  Check21.CheckMICROnUs(0) = "1234567890101" ' Account number on the check
  Check21.CheckMICRRoutingNumber(0) = "902113700"
  Check21.CheckAmount(0) = "50000" ' $500.00
  Check21.CheckSequenceNumber(0) = "407" 
  Check21.CheckPayeeName = "Bruce Banner"
Then set information about the Bank of First Deposit. This may be identical to the origin. The check_bofd_conversion_indicator should also be set to "2" if this bank converted the original check into the image being included.
  Check21.CheckBOFDRoutingNumber(0) = "111012822"
  Check21.CheckBOFDAccountNumber(0) = "181818181818181818"
  Check21.CheckBOFDBranch(0) = "Asgard"  
  Check21.CheckBOFDConversionIndicator(0) = "2"
Finally, you must include images of the front and back of the check, and indicate the format and compression used to create those images. You may use check_front_image_filename and check_back_image_filename properties to point to image files on disk, or you may set the binary data directly in check_front_image_data and check_back_image_data. You also need to set a unique identifier that can be used to retrieve the images at a later date.
  Check21.CheckImageFormat(0) = ifTIFF ' default
  Check21.CheckImageCompression(0) = icJPEG ' default
  Check21.CheckCanRecreateImages(0) = True ' default
  Check21.CheckFrontImageFilename(0) = "front.jpg"
  Check21.CheckFrontImageReferenceKey(0) = "72234215front"
  Check21.CheckBackImageFilename(0) = "back.jpg"
  Check21.CheckBackImageReferenceKey(0) = "72234215back"
Now call build_file to build the file and save it to the filename you indicated earlier. If you have an FTPS server (TLS/SSL-secured FTP) to upload the files to, you may set the ftp properties and call build_and_upload_file method instead.

Property List


The following is the full list of the properties of the class with short descriptions. Click on the links for further details.

business_dateThe year, month, and day that designates the business date at the Bank of First Deposit.
cash_letter_idA code used to uniquely identify the cash letter inside the file.
check_countThe number of records in the Check arrays.
check_amountThe US dollar value of the check.
check_back_image_creation_dateDate assigned by the image creator for the image contained in BackImageData .
check_back_image_dataThis property contains the scanned image of the back of the physical check, in the format specified by ImageFormat and compressed using the designated ImageCompression .
check_back_image_filenameThis property contains location of a scanned image of the back of the physical check, in the format specified by ImageFormat and compressed using the designated ImageCompression .
check_back_image_reference_keyA designator assigned by the ECE institution that uniquely identifies the BackImageData .
check_bofd_account_numberA number that identifies the depository account at the Bank of First Deposit.
check_bofd_branchA code that identifies the branch at the Bank of First Deposit.
check_bofd_conversion_indicatorA code that indicates the conversion within the processing institution between original paper check, image, and IRD.
check_bofd_routing_numberA number that identifies the Bank of First Deposit.
check_bofd_truncatorIdentifies if this BOFD is the truncator of the original check.
check_can_recreate_imagesA code that indicates whether the sender has the ability to recreate the check images (from the original source) for the duration of the agreed to retention time frame.
check_front_image_creation_dateDate assigned by the image creator for the image contained in FrontImageData .
check_front_image_dataThis property contains the scanned image of the front of the physical check, in the format specified by ImageFormat and compressed using the designated ImageCompression .
check_front_image_filenameThis property contains location of a scanned image of the front of the physical check, in the format specified by ImageFormat and compressed using the designated ImageCompression .
check_front_image_reference_keyA designator assigned by the ECE institution that uniquely identifies the FrontImageData .
check_image_compressionA code that identifies the algorithm or method used to compress the images stored in the FrontImageData and BackImageData properties.
check_image_creator_routing_numberA number that identifies the financial institution that created the image (if different from BOFDRoutingNumber ).
check_image_formatA code that identifies the type of image format used for the images contained in the FrontImageData and BackImageData properties.
check_micr_aux_on_usA code used on commercial checks at the discretion of the payor bank, read off of the MICR line on a check.
check_micr_on_usAccount number data specified by the payor bank and read from the MICR line on a check.
check_micr_processing_codeThe external processing code from the MICR line of a check, if present.
check_micr_routing_numberPayor bank routing number, read from the MICR line of a check.
check_payee_nameThe name of the payee from the check.
check_sequence_numberECE Institution Item Sequence Number, assigned by the institution that creates the file.
collection_typeA code that indicates the type of cash letter and bundle contained in the file.
cycle_numberDenotes the cycle under which the file is created.
destination_nameThe short name that identifies the institution that receives the file.
destination_routing_numberThis number identifies the institution that receives the file.
documentation_typeA code that indicates the type of documentation that supports all Checks records in the file.
file_dataContains the binary contents of the X9.37 file created by the BuildFile method.
filenamePath and name of the file to be written to disk by the BuildFile method.
ftp_passwordThe password to login with.
ftp_remote_fileThe name of the file as it will appear on the server after upload.
ftp_remote_hostThe domain name or IP address of the FTP server the file is to be uploaded to.
ftp_remote_pathThe current path on the FTP server.
ftp_remote_portThe port for the FTP service (default is 21).
ftp_timeoutA timeout to use when uploading via FTP.
ftp_userThe user id to login as.
origin_contact_nameA contact at the institution that creates the file.
origin_contact_phoneThe phone number of the ContactName at the institution that created the file.
origin_nameThe short name of the ECE institution that created the file.
origin_routing_numberA number that identifies the ECE institution that originates the file.
record_typeA code that indicates the type of records contained in this file.
return_routing_numberA routing number indicating the location to which returns and return notifications should be sent.
settlement_dateThe date that the institution that created the file expects settlement.
ssl_accept_server_cert_encodedThe certificate (PEM/base64 encoded).
ssl_cert_encodedThe certificate (PEM/base64 encoded).
ssl_cert_storeThe name of the certificate store for the client certificate.
ssl_cert_store_passwordIf the certificate store is of a type that requires a password, this property is used to specify that password in order to open the certificate store.
ssl_cert_store_typeThe type of certificate store for this certificate.
ssl_cert_subjectThe subject of the certificate used for client authentication.
ssl_server_cert_encodedThe certificate (PEM/base64 encoded).
ssl_start_modeDetermines how the class starts the SSL negotiation.

Method List


The following is the full list of the methods of the class with short descriptions. Click on the links for further details.

build_and_upload_fileBuilds an X9.37 file and uploads it to an FTP server.
build_fileBuilds an X9.37 file.
configSets or retrieves a configuration setting.
do_eventsProcesses events from the internal message queue.
interruptInterrupt the current method.
resetReset the internal state of the class and all properties to their default values.

Event List


The following is the full list of the events fired by the class with short descriptions. Click on the links for further details.

on_errorInformation about non-fatal errors encountered during file construction.
on_ssl_server_authenticationFired after the server presents its certificate to the client.
on_ssl_statusShows the progress of the secure connection.
on_statusTraces the commands sent to the server, and the respective replies.

Configuration Settings


The following is a list of configuration settings for the class with short descriptions. Click on the links for further details.

AllowAllBOFDIndicatorsAllows for any value to be specified within the BOFDIndicator field.
ArchiveTypeIndicates the type of archive that supports each Check in this file.
ASCIIOutputIndicates whether to output ASCII or EBCDIC.
BOFDIndicatorIndicates whether the origin is also the bank of first deposit.
BundleCountTotal number of bundles in the file.
BundleCreationDateThe date the bundle is created.
BundleIdUnique identifier for the bundle inside the Cash Letter.
BundleIndexIndex of the current bundle.
CashLetterCreationDateThe date the cash letter is created.
CashLetterCreationTimeThe time the cash letter is created.
CheckIsCredit[i]Indicates whether a Check is to be sent as a Credit (61) Record.
CountryCodeA code that identifies the country in which the payor bank is located.
DetailAddendumRecordNumberThe Check Detail Addendum A Record Number.
FedWorkTypeFederal Reserve work type.
FileCreationDateThe date the file is created.
FileCreationTimeThe time the file is created.
FileIdA code used to uniquely identify this file.
FileUserFieldA User Field.
IncludeAddendAWhether to include Detail Addendum A Record.
OverwriteIndicates whether local files can be overwritten.
OverwriteRemoteFileIndicates whether remote files can be overwritten on the FTP server.
ResendIndicatorIndicates whether the file being built has been previously transmitted in its entirety.
ReservedFieldA field reserved for future use.
ReturnAcceptanceA code that indicates whether the institution that creates this file will or will not support electronic return processing.
TestFileIndicates whether the file being built is a test file or a production file.
BuildInfoInformation about the product's build.
CodePageThe system code page used for Unicode to Multibyte translations.
LicenseInfoInformation about the current license.
ProcessIdleEventsWhether the class uses its internal event loop to process events when the main thread is idle.
SelectWaitMillisThe length of time in milliseconds the class will wait when DoEvents is called if there are no events to process.
UseInternalSecurityAPITells the class whether or not to use the system security libraries or an internal implementation.

Copyright (c) 2021 /n software inc. - All rights reserved.
E-Payment Integrator 2020 Python Edition - Version 20.0 [Build 7941]