NAME

Finance::AMEX::Transaction::GRRCN::Chargeback - Parse AMEX Global Reconciliation (GRRCN) Chargeback Rows

VERSION

version 0.005

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 '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') {
  ...
}

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

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

type

This will always return the string CHARGEBACK.

print $record->type; # CHARGEBACK

line

Returns the full line that is represented by this object.

print $record->line;

field_map

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

RECORD_TYPE

This field contains the record identifier, which will always be “CHARGEBACK” for the Chargeback 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, which may not necessarily be the same SE receiving payment.

BUSINESS_SUBMISSION_DATE

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

The format is: YYYYMMDD

YYYY = Year
MM = Month
DD = Day

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.

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.
------------------------------------------------+------------------------------------

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.

When no value is assigned 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.

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

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).

AMEX_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 Summary of Charge (SOC) Invoice number.

This field may not always be populated if no Summary of Charge or Submission Invoice Number is assigned.

SUBMISSION_CURRENCY

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

CHARGEBACK_NUMBER

This field contains the American Express-assigned reference number which relates to this chargeback.

CHARGEBACK_REASON_CODE

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.

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

CHARGEBACK_REASON_DESCRIPTION

This field contains the Dispute/Chargeback Reason Description, which is the reason the Merchant is assigned the amount that appears in, NET_AMOUNT.

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

GROSS_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.

DISCOUNT_AMOUNT

This field contains the total Discount Amount relating to this Chargeback Record.

This value is expressed in the Payment (Settlement) currency.

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

SERVICE_FEE_AMOUNT

This field contains the total Service Fee Amount relating to this Chargeback Record.

This value is expressed in the Payment (Settlement) currency.

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

TAX_AMOUNT

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.

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.

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

DISCOUNT_RATE

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.

SERVICE_FEE_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.

BATCH_CODE

This field contains the three-digit, numeric Batch Code that corresponds to the Chargeback Reason, when used in conjunction with Bill Code.

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

This field applies to the U.S. and Canada only.

BILL_CODE

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.

This field applies to the U.S. and Canada only.

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.

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

603 Debit for processing error Chargeback
604 Debit for multiple charge
605 Credit processed as Charge
610 Debit as no approval gained
613 Debit as Charge on expired/invalid card
631 Miscellaneous
641 Debit authorized by the merchant
642 Debit for insufficient reply
643 Debit for no reply to inquiry
644 Debit for Fraud Full Recourse
645 Incorrect account number
646 Debit as credit not received by Cardmember
651 Debit as Cardmember paid direct
652 Debit for fraudulent transaction
653 Debit as Cardmember cancelled goods/services
661 Reversal of previous debit
689 Not as described or defective merchandise
690 Not as described or defective merchandise
691 Goods not received
692 Debit for unproven rental charge

NAME

Finance::AMEX::Transaction::GRRCN::Chargeback - Object methods for AMEX Global Reconciliation (GRRCN) chargeback records.

AUTHOR

Tom Heady <cpan@punch.net>

COPYRIGHT AND LICENSE

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.