MenuPlease select your page
Settlement & Reconciliation
This document describes the AfterPay-EPA (Electronic Payment Advice ) file format. An EPA file contains Comma-Separated Values (CSV) with payment information.
The filename follows following structure:
|MID||Merchant ID, created by AfterPay|
|SequenceNumber||Sequence number if multiple files are created for the same settlement. Your integration manager will inform you if this might be the case for your integration, otherwise it will be 001|
|Reference||The payout reference you will also find on your bank statement|
|Date||Date of the settlement|
An EPA file is created with each settlement run and can be downloaded from our SFTP-Server, received via email or accessed in our merchant portal.
The EPA format consists of two main elements:
- Header, contains consolidated information of the specific EPA file.
- Transaction details, single or multiple lines with transaction information.
The header is the first line in the CSV file, figure one depicts the header and values.
The header is the first line within an EPA file and always starts with ‘H’ (for Header). Table one below describes the other variables in the header and their format.
|recordType||String||Constant string with ‘H’ for Header|
|settlementCurrency||String||The settlement currency in ISO 4217, all caps. Example: EUR|
|totalSettlementAmount||Integer||The total amount settled. Example: 1259855|
|feeAmount||Integer||The total amount of fees. Example: 37795|
|nrOfTransactions||Integer||The total number of transactions settled in this batch. Example: 975|
|reference||String||A unique settlement reference code that also has to be present in the bank transfer description of the settlement. Example: 435654554|
|date||YYYYMMDD||The date of settlement. Example: 20210403|
|bankAccount||String (IBAN)||The bank account to be used for payout|
Details / Transactions
Directly below the header line are the transactions. Every line corresponds with one single transaction. The amount of transactions in the EPA file is depicted in the EPA header. Figure two depicts the notation of EPA transactions.
|recordType||String||Constant string with ‘D’ for Details|
|mid||Integer||The Merchant ID|
|transactionReference||String||Extra reference field - filled by the 'transactionReference' field (capture / refund). If the transaction reference is not submitted this field is filled by the capture / refund number|
|orderReference||String||The unique transaction reference - filled by the 'parentTransactionReference' field (authorize / capture / refund). If the parent transaction reference is not submitted this field is filled by the order number|
|settlementAmount||Integer||The net settlement amount, with two digits in the fractional part but no decimal point. Example: 9765 for EUR 97.65. This should equal the original transaction amount minus the fees|
|feeAmount||Integer||The commission amount, with two digits in the fractional part but no decimal point. Example: 254 for EUR 2.54|
|transactionDate||YYYYMMDD||The authorization date of the transaction. Please see below for more information.|
|txAmount||Integer||The original transaction amount, with two digits in the fractional part but no decimal point. Example: 29950 for EUR 299.50|
|txCurrency||String||The original transaction currency in ISO 4217, all caps. Example: EUR|
|type||String||The transaction status type. Can be SETTLED/REFUNDED/CHARGEBACK/VATCLAIMBACK/INVOICEDFEES/OTHERS|
|extra||String||Space for additional information (optional)|
Please click here to see a preview of V2 which will be released in September.