Finance::AMEX::Transaction::EPPRC::Detail::Chargeback - Parse AMEX Reconciliation Files (EPPRC) Chargeback Detail Rows
version 0.005
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 'CHARGEBACK_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 'CHARGEBACK_DETAIL') { ... }
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.
Returns a new Finance::AMEX::Transaction::EPPRC::Detail::Chargeback object.
my $record = Finance::AMEX::Transaction::EPPRC::Detail::Chargeback->new(line => $line);
This will always return the string CHARGEBACK_DETAIL.
print $record->type; # CHARGEBACK_DETAIL
Returns the full line that is represented by this object.
print $record->line;
Returns an arrayref of hashrefs where the name is the record name and the value is an arrayref of the start position and length of that field.
# print the start position of the PAYMENT_YEAR field print $record->field_map->[3]->{PAYMENT_YEAR}->[0]; # 31
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.
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.
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.
This field contains the Payment Year that corresponds to the entry in the Julian Date subfield of 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.
The Julian date of the payment.
An alpha character assigned by the American Express settlement system.
The Number of the payment.
This field contains the constant literal “2”, a Record Type code that indicates that this is a Detail Record.
This field contains the Detail Record Type code that indicates the type of record used in this transaction. For Chargeback Detail Records, this entry is always “20”.
This field contains the SE Business Date assigned to this submission by the submitting merchant location.
The format is: YYYYDDD
This field contains the American Express Transaction Processing Date, which is used to determine the payment date.
This field contains the Summary of Charge (SOC) Invoice Number.
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:
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:
The following are examples of how amounts would appear:
Amount Debit Credit $1.11 0000000011A 0000000011J $345.05 0000003450E 0000003450N $22.70 0000000227{ 0000000227}
This field contains the Chargeback Amount, which is the gross amount charged back to the merchant against the original SOC_INVOICE_NUMBER and SOC_AMOUNT.
This field contains the total Discount Amount, based on CHARGEBACK_AMOUNT, and DISCOUNT_RATE.
This field contains the total Service Fee Amount, based on CHARGEBACK_AMOUNT, and SERVICE_FEE_RATE.
This field contains the Net Amount of the Chargeback, which is the sum total of CHARGEBACK_AMOUNT, less DISCOUNT_AMOUNT and SERVICE_FEE_AMOUNT.
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.
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.
This field contains the Chargeback Reason, which is the reason the Merchant is assessed the amount that appears in CHARGEBACK_AMOUNT.
A list of reason descriptions can be found below.
If unused, this field is character space filled.
This field contains the three-digit, numeric Batch Code that corresponds to the CHARGEBACK_REASON, when used in conjunction with BILL_CODE.
This field contains the three-digit, numeric Bill Code that corresponds to the CHARGEBACK_REASON, when used in conjunction with BATCH_CODE.
A list of reason descriptions can be found under CHARGEBACK_REASON.
This field contains the external, third party Service Agent Merchant ID number when applicable, otherwise this field will be space filled.
This field contains a code that indicates if this transaction was processed for payment via the American Express Membership Rewards Pay with Points program.
Note: Tilde (~) represents a character space.
Finance::AMEX::Transaction::EPPRC::Detail::Chargeback - Object methods for AMEX Reconciliation file chargeback detail records.
Tom Heady <cpan@punch.net>
This software is copyright (c) 2022 by ZipRecruiter/Tom Heady.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
To install Finance::AMEX::Transaction, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Finance::AMEX::Transaction
CPAN shell
perl -MCPAN -e shell install Finance::AMEX::Transaction
For more information on module installation, please visit the detailed CPAN module installation guide.