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

NAME

Finance::AMEX::Transaction::GRRCN::Submission - Parse AMEX Global Reconciliation (GRRCN) Submission 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 'SUBMISSION') {
    print $record->PAYMENT_DATE . "\n";
  }
 }

 # to parse a single line

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

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::Submission object.

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

type

This will always return the string SUBMISSION.

 print $record->type; # SUBMISSION

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 “SUBMISSION” for the Submission 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.

SUBMISSION_EXCHANGE_RATE

This field is reserved for future use and will be set to spaces (fixed format) or blank (delimited formats).

In the future this field will include the exchange rate used to convert the submission currency into the settlement currency for payment.

Where the payment currency and submission currency are the same, this field will be space filled (fixed format) or blank (delimited formats). Right justified, leading zeros.

SUBMISSION_GROSS_AMOUNT_IN_SUBMISSION_CURRENCY

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

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

SUBMISSION_GROSS_AMOUNT_IN_PAYMENT_CURRENCY

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.

SUBMISSION_DISCOUNT_AMOUNT

This field contains the total Discount Amount, expressed in the Payment (Settlement) currency.

This field will contain the positive for a typical debit submission which results in American Express making a credit to the Merchant's account, negative if a credit submission.

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

For U.S. and Canada Merchants using Gross Pay, this field is for information purposes only. Aggregated Discount and Service Fees to be debited will be recorded in the Fees & Revenues Record on the date of debit from the Merchant's account.

SUBMISSION_SERVICE_FEE_AMOUNT

This field contains the total Service Fee Amount for the whole Submission, expressed in the Payment (Settlement) currency.

This field is signed positive for a typical debit submission which results in American Express making a credit to the Merchant's account, negative if a credit submission.

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

For U.S. and Canada Merchants using Gross Pay, this field is for information purposes only. Aggregated Discount and Service Fees to be debited will be recorded in the Fees & Revenues Record on the date of debit from the Merchant's account.

SUBMISSION_TAX_AMOUNT

This field contains the total Tax Amount for the submission, expressed in the Payment (Settlement) currency, which is only applicable to the following specific markets

 LAC            Mexico / Bahamas / Panama / Argentina
 JAPA           Australia / India / Japan
 EMEA           Germany / Austria
 Multi-Currency Mexico / Australia

This field is signed positive for a typical debit submission which results in American Express making a credit to the Merchant's account, negative if a credit submission.

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

SUBMISSION_NET_AMOUNT

This field contains the Net SOC (Summary of Charge) amount for payment, expressed in the Payment (Settlement) currency, which is the sum total of Submission Gross Amount less Submission Discount Amount, Submission Service Fee and Submission Tax Amount.

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

SUBMISSION_DISCOUNT_RATE

This field contains the following:

U.S. and Canada — Contains the contract discount rate. Detailed fees and discount amounts can be found in transaction level pricing record records.
Other countries — This field will be blank (delimited format) or spaces (fixed format). Detailed fees and discount amounts can be found in transaction level pricing records.

Note: where used, the submission discount rate is always signed positive.

Formatting of rate fields is as follows:

 A (1) N (6)

The format is a signed, numeric field with five decimal places implied. Detailed layout is below.

SWDDDDD

S = the sign indicating whether the rate is positive or negative. A minus ('-) means a negative value and a space (indicated using '~' below)
W = whole number position
DDDDD = decimal percentages

For example:

 Rate         Decimal Value     Displayed in File
 +99.999%     +0.99999          ~099999
 +03.300%     +0.03300          ~003300
 +00.001%     +0.00001          ~000001
 -00.001%     -0.00001          -000001
 -03.300%     -0.03300          -003300
 -99.999%     -0.99999          -099999

~ = space

SUBMISSION_TAX_RATE

This field is reserved for future use and will be set to spaces (fixed format) or blank (delimited formats).

For amount of any tax applied, SUBMISSION_TAX_AMOUNT.

TRANSACTION_COUNT

This field contains a count of the number of accepted transactions / ROCS (Record of Charge) in the submission / SOC (Summary of Charge).

TRACKING_ID

This field contains a Tracking ID, which holds an American Express-generated SOC processing ID.

This field is only applicable to U.S. and Canada. For other markets this will be set to spaces (fixed format) or blank (delimited formats).

INSTALLMENT_NUMBER

This field contains the number of monthly payments.

This field is only relevant for deposits made under the Monthly Installments Plan without interest.

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

ACCELERATION_NUMBER

This field contains the Acceleration Number for this SOC Deposit.

This field may be zero (0) if acceleration is consolidated at transaction level.

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

ORIGINAL_SETTLEMENT_DATE

This field contains the Original Settlement Date.

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

ACCELERATION_DATE

This field contains the Deposit Acceleration Date.

This field may be zero (0) if there is no acceleration date / acceleration is consolidated at transaction level.

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

NUMBER_OF_DAYS_IN_ADVANCE

This field contains the Number of Days the payment is accelerated.

This field may be zero (0) if acceleration is consolidated at transaction level.

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

SUBMISSION_ACCELERATION_FEE_AMOUNT

This field contains the Acceleration Amount.

This field may be zero (0) if acceleration is consolidated at transaction level.

This field can be calculated using, ACCELERATION_AMOUNT in the Transaction Record (i.e., If you sum up Transaction Record Field #ACCELERATION_AMOUNT for all ROC's within a SOC, you will have the Submission Acceleration Fee Amount).

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

SUBMISSION_ACCELERATION_FEE_NET_AMOUNT

This field contains the Acceleration Net Amount. This field may be zero (0) if acceleration is consolidated at transaction level.

This field can be calculated by; SUBMISSION_NET_AMOUNT (Submission Record) + SUBMISSION_ACCELERATION_FEE_AMOUNT (Submission Record).

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

The last two digits are decimals. For formats of amount values, see description in Summary Record, PAYMENT_NET_AMOUNT.

SUBMISSION_DEBIT_GROSS_AMOUNT

This field contains the proportion of the Submission Gross Amount which is a debit amount, expressed in the Payment (Settlement) currency.

This field is always signed positive.

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

SUBMISSION_CREDIT_GROSS_AMOUNT

This field contains the proportion of the Submission Gross Amount which is a credit amount, expressed in the Payment (Settlement) currency.

This field is always signed positive.

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

NAME

Finance::AMEX::Transaction::GRRCN::Submission - Object methods for AMEX Global Reconciliation (GRRCN) Submission 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.