Finance::AMEX::Transaction::GRRCN::Chargeback - Parse AMEX Global Reconciliation (GRRCN) Chargeback Rows
version 0.005
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 'CHARGEBACK') { print $record->PAYMENT_DATE . "\n"; } } # to parse a single line my $record = $epraw->parse_line('line from an GRRCN file'); if ($record->type eq 'CHARGEBACK') { ... }
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::GRRCN::Chargeback object.
my $record = Finance::AMEX::Transaction::GRRCN::Chargeback->new(line => $line);
This will always return the string CHARGEBACK.
print $record->type; # CHARGEBACK
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_DATE field print $record->field_map->[4]->{PAYMENT_DATE}->[0]; # 39
This field contains the record identifier, which will always be “CHARGEBACK” for the Chargeback Record.
This field contains the American Express-assigned Service Establishment (SE) Number of the Merchant receiving the payment/settlement.
This field contains the Settlement Account Type.
Valid values include the following:
If unused, this field will be space filled (fixed format) or blank (delimited formats).
This field contains the American Express-assigned Payment/Settlement Number. This reference number may be used by the American Express Payee for reconciliation purposes.
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
This field contains the Alphanumeric ISO Code for the Payment (Settlement) currency.
This field contains the Service Establishment (SE) Number of the Merchant being reconciled, which may not necessarily be the same SE receiving payment.
This field contains the date assigned by the Merchant or Partner to this submission.
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).
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.
If unused, this field is character space filled (fixed format) or blank (delimited).
In a limited number of cases the Invoice Reference Number will not be provided in the Chargeback Record.
Scenario | Invoice/Reference Number Populated ------------------------------------------------+----------------------------------- Card Number changed after dispute is raised. | No ------------------------------------------------+------------------------------------ Chargeback amount not matching the original | No transaction amount. | ------------------------------------------------+------------------------------------ Charge is for identical transaction date, | Yes - but duplicated for all transaction amount, Card Number and SE number. | chargebacks in record. ------------------------------------------------+------------------------------------
This field contains the Seller ID, 20-byte code that uniquely identifies a Payment Aggregator or OptBlue Participant's specific seller or vendor.
When no value is assigned this field will be character space filled (fixed format) or blank (delimited formats).
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.
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:
If unused, this position will be space filled (fixed format) or blank (delimited formats).
This field contains the American Express Transaction Processing Date, which is used to determine the payment date scheduled in the American Express Systems.
This field contains the Summary of Charge (SOC) Invoice number.
This field may not always be populated if no Summary of Charge or Submission Invoice Number is assigned.
This field contains the Submission Currency Code in ISO format. Refer to the Global Codes & Information Guide.
This field contains the American Express-assigned reference number which relates to this chargeback.
This field contains the Dispute/Chargeback Reason Code used by American Express systems according to the region of the chargeback.
This field is not available in the U.S.and Canada. This field is international only.
This field contains the Dispute/Chargeback Reason Description, which is the reason the Merchant is assigned the amount that appears in, NET_AMOUNT.
This field contains the Gross Amount relating to this Chargeback Record. Typically signed negative to indicate a debit to the Merchant's account, though may also be signed positive for a chargeback reversal.
This value is expressed in the Payment (Settlement) currency.
For formats of amount values, see description in Summary Record, PAYMENT_NET_AMOUNT.
This field contains the total Discount Amount relating to this Chargeback Record.
This field contains the total Service Fee Amount relating to this Chargeback Record.
This field contains the Tax Amount relating to this Chargeback Record, 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 value is expressed in the Payment (Settlement) currency. For formats of amount values, see description in Summary Record, PAYMENT_NET_AMOUNT.
This field contains the Net Amount of the chargeback, which is the gross amount less deductions.
This value is expressed in the Payment (Settlement) currency. Typically signed negative to indicate a debit to the Merchant's account, though may also be signed positive for a credit to the Merchant.
This field contains the Discount Rate, which is a percentage used to calculate the American Express charge as its discount amount.
This field is always signed positive. For an explanation of rate syntax, see Submission Record, SUBMISSION_DISCOUNT_RATE.
This field contains the Service Fee Rate used to calculate the amount American Express charges a Merchant as service fees.
This field is always signed positive.
For an explanation of rate syntax, see Submission Record, SUBMISSION_DISCOUNT_RATE.
This field contains the three-digit, numeric Batch Code that corresponds to the Chargeback Reason, when used in conjunction with Bill Code.
This field applies to the U.S. and Canada only.
This field contains the three-digit, numeric Bill Code that corresponds to the Chargeback Reason, when used in conjunction with Batch Code.
Refer to the Appendix for a list of Bill Codes and their associated descriptions.
Please refrain from hard coding the Bill Codes into your application as American Express reserves the right to make changes. Hard-Coding to this field may result in file failures.
Finance::AMEX::Transaction::GRRCN::Chargeback - Object methods for AMEX Global Reconciliation (GRRCN) chargeback 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.