The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Finance::AMEX::Transaction::GRRCN::Transaction - Parse AMEX Global Reconciliation (GRRCN) Transaction or summary of charge (SOC) Rows

VERSION

version 0.002

SYNOPSIS

 use Finance::AMEX::Transaction;

 my $epraw = Finance::AMEX::Transaction->new(file_type => 'GRRCN');
 open my $fh, '<', '/path to GRRCN file' or die "cannot open GRRCN file: $!";

 while (my $record = $epraw->getline($fh)) {

  if ($record->type eq 'TRANSACTION') {
    print $record->PAYMENT_DATE . "\n";
  }
 }

 # to parse a single line

 my $record = $epraw->parse_line('line from an GRRCN  file');
 if ($record->type eq 'TRANSACTION') {
   ...
 }

DESCRIPTION

You would not normally be calling this module directly, it is one of the possible return objects from a call to Finance::AMEX::Transaction's getline method.

METHODS

new

Returns a new Finance::AMEX::Transaction::GRRCN::Transaction object.

 my $record = Finance::AMEX::Transaction::GRRCN::Transaction->new(line => $line);

type

This will always return the string TRANSACTION.

 print $record->type; # TRANSACTION

line

Returns the full line that is represented by this object.

 print $record->line;

RECORD_TYPE

This field contains the Record identifier, which will always be “TRANSACTN” for the Transaction Record.

PAYEE_MERCHANT_ID

This field contains the American Express-assigned Service Establishment (SE) Number of the Merchant receiving the payment/settlement.

SETTLEMENT_ACCOUNT_TYPE_CODE

This field contains the Settlement Account Type.

Valid values include the following:

002 = Primary
001 = Discount
004 = All Chargebacks

If unused, this field will be space filled (fixed format) or blank (delimited formats).

AMERICAN_EXPRESS_PAYMENT_NUMBER

This field contains the American Express-assigned Payment/Settlement Number. This reference number may be used by the American Express Payee for reconciliation purposes.

PAYMENT_DATE

This field contains the Payment Date scheduled in American Express systems. The date that funds are actually available to the payee's depository institution may differ from the date reported in this field.

The format is: YYYYMMDD

YYYY = Year
MM = Month
DD = Day

PAYMENT_CURRENCY

This field contains the Alphanumeric ISO Code for the Payment (Settlement) currency.

SUBMISSION_MERCHANT_ID

This field contains the Service Establishment (SE) Number of the Merchant being reconciled.

BUSINESS_SUBMISSION_DATE

The field contains the date assigned by the Merchant or Partner to this submission.

The format is: YYYYMMDD

YYYY = Year
MM = Month
DD = Day

AMERICAN_EXPRESS_PROCESSING_DATE

This field contains the American Express Transaction Processing Date, which is used to determine the payment date scheduled in the American Express Systems.

The format is: YYYYMMDD

YYYY = Year
MM = Month
DD = Day

SUBMISSION_INVOICE_NUMBER

This field contains the Submission Invoice number.

This field may not always be populated if no Submission Invoice Number is assigned.

SUBMISSION_CURRENCY

This field contains the Submission Currency Code in Alpha ISO format. Refer to the Global Codes & Information Guide.

MERCHANT_LOCATION_ID

This field contains the Merchant-assigned SE Unit Number (such as an internal, store identifier code) that corresponds to a specific store or location.

If unused, this field is character space filled (fixed format) or blank (delimited formats).

INVOICE_REFERENCE_NUMBER

This field contains the Invoice/Reference Number assigned by the Merchant or Partner to this transaction at the time the sale was executed.

This is a transaction-level identifier used by the Merchant for identification and reconciliation purposes.

SELLER_ID

This field contains the Seller ID, 20-byte code that uniquely identifies a Payment Aggregator or OptBlue ® Participant's specific seller or vendor.

If unused, this field will be character space filled (fixed format) or blank (delimited formats).

CARDMEMBER_ACCOUNT_NUMBER

This field contains the Cardmember Account Number that corresponds to this transaction.

Note: if Card number masking is enabled this field is required to accept alphanumeric characters.

JCB card transactions may appear in the reconciliation file. JCB transactions can be distinguished using the Issuer Identification Number (IIN), previously known as bank identification number (BIN), as represented by the first six digits of the credit card number. JCB card numbers begin with ‘35’ and will be 16 digits in length, whereas American Express card numbers begin with ‘37’ and will be 15 digits in length.

INDUSTRY_SPECIFIC_REFERENCE_NUMBER

This field contains an industry-specific identifier, which corresponds to the relevant identifier submitted originally by the Merchant, Payment Service Provider or Partner. It will be one of the following IDs, depending on the industry-specific addenda records used when submitting the invoice to American Express:

Airline ticket number
Rental agreement number
Insurance policy number
Rail ticket number
Travel ticket number

If unused, this position will be space filled (fixed format) or blank (delimited formats).

SUBMISSION_GROSS_AMOUNT

This field contains the Gross Amount of American Express charges submitted in the original submission, expressed in the Payment (Settlement) currency.

For formats of amount values, see description in Summary Record, PAYMENT_NET_AMOUNT.

TRANSACTION_AMOUNT

This field contains the Transaction or Record of Charge (ROC) Amount for a single transaction.

This value is expressed in the Submission currency.

For formats of amount values, see description in Summary Record, PAYMENT_NET_AMOUNT.

TRANSACTION_DATE

This field contains the Transaction Date, which is the date the transaction took place as specified by Merchant in the submission file.

The format is: YYYYMMDD

YYYY = Year
MM = Month
DD = Day

TRANSACTION_TIME

This field contains the time stamp submitted on the original Transaction as specified by Merchant in the submission file.

The format is: HHMMSS

HH = Hours
MM = Minutes
SS = Seconds

TRANSACTION_ID

This field contains Transaction Identifier (TID), which is a unique tracking number from the Authorization Response message that corresponds to a transaction. This data item reflects the value exactly as entered by the Merchant or Partner in the settlement file.

APPROVAL_CODE

This field contains the Approval Code obtained on the Authorization Request.

TERMINAL_ID

This field contains the Terminal ID at the Merchant location which generated the transaction. If no Terminal ID was provided then this field will be character space filled (fixed format) or blank (delimited formats).

MERCHANT_CATEGORY_CODE

This field contains the Merchant Category Code (MCC) submitted in the original Transaction or ROC. If no code was provided, this field will be character space filled (fixed format) or blank (delimited formats).

CARDMEMBER_REFERENCE_NUMBER

This field contains the Reference Number used for CPS (formerly CPC) transactions to help with CPS transaction reconciliation.

If this field is not relevant, it will be character space filled (fixed format) or blank (delimited formats).

ACQUIRER_REFERENCE_NUMBER

This field contains the Acquirer Reference Number (ARN),.which is an identifier assigned to a transaction by American Express as soon as the transaction is received from the Merchant.

DATA_QUALITY_NON_COMPLIANT_INDICATOR

This field contains the Data Quality Non-Compliant Indicator. This indicates whether the transaction data submitted within the settlement file originally met data quality standards.

Valid values include the following:

Y = Yes
N = No

This field is only applicable in the U.S. and Canada. Where not relevant this field will be character space filled (fixed format) or blank (delimited formats).

DATA_QUALITY_NON-COMPLIANT_ERROR_CODE_1, DATA_QUALITY_NON-COMPLIANT_ERROR_CODE_2, DATA_QUALITY_NON-COMPLIANT_ERROR_CODE_3, DATA_QUALITY_NON-COMPLIANT_ERROR_CODE_4

These fields contain field-level Non-compliant Error Code(s) applicable to this transaction.

Valid values include the following:

2014 = Point of Service Data Code invalid
2015 = Approval Code non-numeric
2022 = Transaction Identifier Invalid
2036 = Approval Code not equal to required length

For certain Partners [note this is OptBlue] the valid values include the following:

6415 = Merchant Category Code Prohibited for Program
6416 = Merchant Category Code Not Valid for Submitting SE

If unused, this field is character space filled (fixed format) or blank (delimited).

This field is only applicable in the U.S. and Canada.

NON_SWIPED_INDICATOR

This field contains the Non-Swiped Indicator. This entry indicates whether the Cardmember Account Number for this transaction was automatically read or not.

For instance, the card may have been manually entered because the card was not present or the card's magnetic strip or chip could not be read by the POS device.

Valid values including the following:

Y = Non-Swiped
N = Swiped
~ = Not known

Note: Tilde (~) represents a character space.

This field is only applicable in the U.S. and Canada.

TRANSACTION_REJECTED_INDICATOR

This field indicates that the ROC was rejected within the American Express payments processing system.

Valid values include the following:

REJ = ROC was rejected and therefore not paid
~ = ROC was accepted and paid

Note: Tilde (~) represents a character space.

FIRST_INSTALLMENT_AMOUNT

This field contains the Total Transaction Amount divided by the number of monthly installments in the Monthly Installment Plan. The last two digits are decimals.

If the division is not exact, the difference is added to this monthly installment (First Installment Amount field).

This field will be populated with zeros (0) if it is not an Installment Plan without interest.

This field is only applicable to certain local market Merchants from Mexico / Argentina.

SUBSEQUENT_INSTALLMENT_AMOUNT

This field contains the Total Amount of the transaction divided by the number of monthly installments in the Monthly Installment Plan. The last two digits are decimals.

This field will be populated with zeros (0) if it is not an Installment Plan without interest.

This field is only applicable to certain local market Merchants from Mexico / Argentina.

NUMBER_OF_INSTALLMENTS

This field contains the Number of Monthly Installments in the Monthly Installment Plan without interest.

This field will be populated with zeros (0) if it is not an Installment Plan without interest.

This field is only applicable to certain local market Merchants from Mexico / Argentina.

INSTALLMENT_NUMBER

This field contains the Monthly Installment Number.

For example: 00006 would represent installment number 6 out of a total of 12 installments. See also NUMBER_OF_INSTALLMENTS.

This field will be populated with zeros (0) if it is not an Installment Plan without interest.

This field is only applicable to certain local market Merchants from Mexico / Argentina.

SERVICE_FEE_AMOUNT

This field contains the Discount/Service Fee Amount applied to installments.

Amount is to two decimal places. For formats of amount values, see description in Summary Record, PAYMENT_NET_AMOUNT.

This field is only applicable to certain local market Merchants from Mexico / Argentina.

ACCELERATION_AMOUNT

This field contains the Acceleration Fee Amount charged for this single transaction.

If you sum up this field for all ROC's within a SOC, you will have the SUBMISSION_ACCELERATION_FEE_AMOUNT (Submission Record).

This field is only applicable to certain local market Merchants from Mexico / Argentina.

NAME

Finance::AMEX::Transaction::GRRCN::Transaction - Object methods for AMEX Global Reconciliation (GRRCN) Transaction or summary of charge records.

AUTHOR

Tom Heady <theady@ziprecruiter.com>

COPYRIGHT AND LICENSE

This software is copyright (c) 2018 by ZipRecruiter.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.