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

NAME

Finance::AMEX::Transaction::EPPRC::Detail::ChargeSummary - Parse AMEX Transaction/Invoice Level Reconciliation (EPPRC) Summary of Charge (SOC) Detail Rows

VERSION

version 0.001

SYNOPSIS

 use Finance::AMEX::Transaction;

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

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

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

 # to parse a single line

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

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::EPPRC::Detail::ChargeSummary object.

 my $record = Finance::AMEX::Transaction::EPPRC::Detail::ChargeSummary->new(line => $line);

type

This will always return the string SOC_DETAIL.

 print $record->type; # SOC_DETAIL

line

Returns the full line that is represented by this object.

 print $record->line;

AMEX_PAYEE_NUMBER

This field contains the Service Establishment (SE) Number of the merchant that received the payment from American Express.

Note: SE Numbers are assigned by American Express.

AMEX_SE_NUMBER

This field contains the Service Establishment (SE) Number of the merchant being reconciled, which may not necessarily be the same SE receiving payment (see AMEX_PAYEE_NUMBER).

This is the SE Number under which the transactions were submitted, which usually corresponds to the physical location.

SE_UNIT_NUMBER

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

If no value is assigned, this field is character space filled.

PAYMENT_YEAR

This field contains the Payment Year that corresponds to the entry in the Julian Date subfield of PAYMENT_NUMBER.

PAYMENT_NUMBER

This field contains the Payment Number, a reference number used by the American Express Payee to reconcile the daily settlement to the daily payment.

PAYMENT_NUMBER_DATE

The Julian date of the payment.

PAYMENT_NUMBER_TYPE

An alpha character assigned by the American Express settlement system.

PAYMENT_NUMBER_NUMBER

The Number of the payment.

RECORD_TYPE

This field contains the constant literal “2”, a Record Type code that indicates that this is a Detail Record.

DETAIL_RECORD_TYPE

This field contains the Detail Record Type code that indicates the type of record used in this transaction. For Summary of Charge (SOC) Detail Records, this entry is always “10”.

SE_BUSINESS_DATE

This field contains the SE Business Date assigned to this submission by the submitting merchant location.

The format is: YYYYDDD

YYYY = Year
DDD = Julian Date

AMEX_PROCESS_DATE

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

The format is: YYYYDDD

YYYY = Year
DDD = Julian Date

SOC_INVOICE_NUMBER

This field contains the Summary of Charge (SOC) Invoice Number.

SOC_AMOUNT

This field contains the Summary of Charge (SOC) Amount originally submitted for payment.

Note: For US Dollar (USD) and Canadian Dollar (CAD) transactions, two decimal places are implied.

A debit amount (positive) is indicated by an upper-case alpha code used in place of the last digit in the amount.

The debit codes and their numeric equivalents are listed below:

1=A
2=B
3=C
4=D
5=E
6=F
7=G
8=H
9=I
0={

A credit amount (negative) is also indicated by an upper-case alpha code used in place of the last digit in the amount.

The credit codes and their numeric equivalents are listed below:

1=J
2=K
3=L
4=M
5=N
6=O
7=P
8=Q
9=R
0=}

The following are examples of how amounts would appear:

 Amount     Debit         Credit
   $1.11    0000000011A   0000000011J
 $345.05    0000003450E   0000003450N
  $22.70    0000000227{   0000000227}

DISCOUNT_AMOUNT

This field contains the total Discount Amount, based on SOC_AMOUNT and DISCOUNT_RATE.

SERVICE_FEE_AMOUNT

This field contains the total Service Fee Amount, based on SOC_AMOUNT, and SERVICE_FEE_RATE.

NET_SOC_AMOUNT

This field contains the Net SOC (Summary of Charge) Amount submitted to American Express for payment, which is the sum total of SOC_AMOUNT, less DISCOUNT_AMOUNT and SERVICE_FEE_AMOUNT.

DISCOUNT_RATE

This field contains the Discount Rate (decimal place value) used to calculate the amount American Express charges a merchant for services provided per the American Express Card Acceptance Agreement.

SERVICE_FEE_RATE

This field contains the Service Fee Rate (decimal place value) used to calculate the amount American Express charges a merchant as service fees.

Service fees are assessed only in certain situations and may not apply to all SEs.

AMEX_GROSS_AMOUNT

This field contains the gross amount of American Express charges submitted in the original SOC amount.

AMEX_ROC_COUNT

This field contains the quantity of American Express charges submitted in this Summary of Charge (SOC). This entry is always positive, which is indicated by an upper-case alpha code used in place of the last (least significant) digit.

The alpha codes and their numeric equivalents are listed below:

1=A
2=B
3=C
4=D
5=E
6=F
7=G
8=H
9=I
0={

Note: In rare instances, the quantity of American Express charges may exceed the five-byte length of this field; and the actual value may be truncated. In this case, this entry should be ignored, and the actual quantity of American Express charges should be obtained from the seven-byte, AMEX_ROC_COUNT_POA field.

For this reason, American Express strongly recommends that Merchant and Authorized Third Party Processor systems use AMEX_ROC_COUNT_POA, in lieu of this field.

TRACKING_ID

This field contains the Tracking ID, which holds SOC processing information.

TRACKING_ID_DATE

The Julian date for the tracking id.

TRACKING_ID_PCID

Tracking ID PCID

CPC_INDICATOR

This field contains the CPC Indicator, which indicates whether the batch that corresponds to this SOC detail record contains CPC/Corporate Purchasing Card (a.k.a., CPS/Corporate Purchasing Solutions Card) transactions.

Valid entries include:

P = CPC/CPS Card transactions (special pricing applied)
~ = Non-CPC/CPS Card transactions

Note: Tilde (~) represents a character space.

AMEX_ROC_COUNT_POA

This field contains the quantity of American Express charges submitted in this Summary of Charge (SOC). This entry is always positive, which is indicated by an upper-case alpha code used in place of the last (least significant) digit.

The alpha codes and their numeric equivalents are listed below:

1=A
2=B
3=C
4=D
5=E
6=F
7=G
8=H
9=I
0={

Important Note for Merchants Using AMEX_ROC_COUNT_POA:

AMEX_ROC_COUNT and AMEX_ROC_COUNT_POA contain the same basic value, up five significant digits. However, for values greater than “9999I” (99,999), AMEX_ROC_COUNT_POA should be used; because the value in AMEX_ROC_COUNT is truncated at five bytes.

BASE_DISCOUNT_AMOUNT

This field contains the total Base Discount Amount applied. A negative amount represents a debit or a deduction, and a positive amount indicates a payment or credit.

This value may be a debit or credit; and the format is a 1-digit “sign”, followed by a 15-digit “dollar amount”.

For a debit (a negative amount), the first position is a minus sign; and a “negative $100.00” would appear as:

 0        1
 1234567890123456
 -000000000010000

For a credit (a positive amount), the first position is a character space; and a “positive $100.00” would appear as:

 0        1
 1234567890123456
 _000000000010000

Note: The underline character ( _ ) represents a character space.

If unused, position 1 in this field contains a character space; and the remaining positions are zero filled.

CARD_NOT_PRESENT_BPA_AMOUNT

This field contains the Card Not Present, Basis Point Adjustment Amount. A negative amount represents a debit or a deduction, and a positive amount indicates a payment or credit.

This value may be a debit or credit; and the format is a 1-digit “sign”, followed by a 15-digit “dollar amount”.

See examples of negative and positive entries under BASE_DISCOUNT_AMOUNT.

If unused, position 1 in this field contains a character space; and the remaining positions are zero filled.

CARD_NOT_PRESENT_PTA_AMOUNT

This field contains the Card Not Present, Per Transaction Adjustment Amount. A negative amount represents a debit or a deduction, and a positive amount indicates a payment or credit.

This value may be a debit or credit; and the format is a 1-digit “sign”, followed by a 15-digit “dollar amount”.

See examples of negative and positive entries under BASE_DISCOUNT_AMOUNT.

If unused, position 1 in this field contains a character space; and the remaining positions are zero filled.

CARD_NOT_PRESENT_BPA_RATE

This field contains the Card Not Present, Basis Point Adjustment Rate applied to Card Not Present transactions.

This value may be a debit or credit rate. The format is a 1-digit “sign”, followed by an 8-digit “rate”.

For a debit (a negative rate), the first position is a minus sign; and a “negative .003 (.30%)” would appear as:

 0
 123456789
 -00000300

For a credit (a positive rate), the first position is a character space; and a “positive .003 (.30%)” would appear as:

 0
 123456789
 _00000300

Note: The underline character ( _ ) represents a character space.

If unused, position 1 in this field contains a character space; and the remaining positions are zero filled.

CARD_NOT_PRESENT_PTA_RATE

This field contains the Card Not Present, Per Transaction Adjustment Rate applied to Card Not Present transactions.

This value may be a debit or credit rate. The format is a 1-digit “sign”, followed by an 8-digit “rate”.

For a debit (a negative rate), the first position is a minus sign; and a “negative .10” would appear as:

 0
 123456789
 -00010000

For a credit (a positive rate), the first position is a character space; and a “positive .10” would appear as:

 0
 123456789
 _00010000

Note: The underline character ( _ ) represents a character space.

If unused, position 1 in this field contains a character space; and the remaining positions are zero filled.

TRANSACTION_FEE_AMOUNT

This field contains the total Transaction Fee Amount applied to the Merchant’s settlement file. A negative amount represents a debit or a deduction, and a positive amount indicates a payment or credit.

This value may be a debit or credit; and the format is a 1-digit “sign”, followed by a 15-digit “dollar amount”.

See examples of negative and positive entries under CARD_NOT_PRESENT_PTA_RATE.

If unused, position 1 in this field contains a character space; and the remaining positions are zero filled.

TRANSACTION_FEE_RATE

This field contains the Transaction Fee Rate applied to transactions in the Merchant’s settlement file, in accordance with the Merchant Pricing Plan.

This value may be a debit or credit rate. The format is a 1-digit “sign”, followed by an 8-digit “rate”.

See examples of rate entries under CARD_NOT_PRESENT_BPA_RATE.

If unused, position 1 in this field contains a character space; and the remaining positions are zero filled.

NAME

Finance::AMEX::Transaction::EPPRC::Detail::ChargeSummary - Object methods for AMEX Reconciliation file summary of charge detail 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.