MenuPlease select your page
Settlement & Reconciliation
Electronic Payment Advice (EPA)
This document describes the EPA 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|
|commissionAmount||Integer||The total amount of commission. Example: 37795|
|nrTransactions||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: 20080403|
|bankAccount||String||The bank account to be used for settlements in IBAN format.|
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|
|exReference||String||Extra reference field (optional)|
|pspReference||Integer||The unique transaction reference that was initially passed by the Payment Service Provider (PSP) during the authorization or capture phase. Generated by the PSP. Example: 1112072150544667|
|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 commission|
|commissionAmount||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)|