Skip to content

External Customer Payment Interface

The purpose of this document is to describe how to transfer external customer payment information into the Payment component, by reading, interpreting and processing text file based information.

External Customer Payment Interface is based on External Files Interface, a general tool for loading and creating text files.

It is possible to describe different file layouts, so called File Templates. In External Files there is also a file type named ExtCustPayment that supports customer payment files.

Please refer to the Page Help and Online Documentation for detailed information regarding how to specify File Templates.

Use this page when you want to know how to load customer payment information, in text file format, from an external system to Payment component.

Predefined File Templates

The following system defined file templates, supporting the file type ExtCustPayment, are defined during installation,

External File Template External File Type Description
CUP_BASSOC ExtCustPayment File Template used to read a customer payment file for: Banker Associate File - Domestic Payments in JPY, Japan
CUP_BGMAX ExtCustPayment File Template used to read a customer payment file for: Bankgiro BGMAX Sweden
CUP_BGMAXQ ExtCustPayment File Template used to read a customer payment file for: Bankgiro BGMAX (no 22, 23) Sweden
CUP_DDAGNOR ExtCustPayment File Template used to read a customer payment file for: Direct Debiting, in NOK, Norway
CUP_DDBGSEK ExtCustPayment File Template used to read a customer payment file for: Bankgiro, Direct Debiting in SEK, Sweden
CUP_DDNAGSEK ExtCustPayment File Template used to read a customer payment file for: Direct Debiting New Autogiro, Sweden
CUP_DEDUCTION ExtCustPayment Generic File Template to read customer payment advice file with deductions.
CUP_KTL_FI ExtCustPayment File Template used to read a customer payment file for: KTL Reference Domestic Payments in EUR, Finland
CUP_MT940NLABN ExtCustPayment File Template used to read a customer payment file for: MT940 ABN AMRO Netherland
CUP_OCRBGSEK ExtCustPayment File Template used to read a customer payment file for: Bankgiro, OCR Domestic Payments in SEK, Sweden
CUP_OCRDKK ExtCustPayment File Template used to read a customer payment file for: OCR Domestic Payments in DKK, Danmark
CUP_OCRNOR ExtCustPayment File Template used to read a customer payment file for: OCR Domestic Payments in NOK, Norway
CUP_OCRPGSEK ExtCustPayment File Template used to read a customer payment file for: Postgiro OCR Domestic Payments in SEK, Sweden
CUP_REMADV ExtCustPayment Generic File Template to read EDI remittance advice file (REMADV) for customer payments with deductions.
CUP_TOTALIN ExtCustPayment File Template used to read a customer payment file for: Plusgirot Total In, Sweden
CUP_DTACHCU ExtCustPayment ExtCustPayment File Template used to read a customer payment file for: DTACH Customer Reference Payments in EUR or CHF, Switzerland
CUP_BR_237_CR ExtCustPayment File Template used to read a customer payment file for: Brazilian 237-CR layout return file from bank
CUP_BR_341_CR ExtCustPayment File Template used to read a customer payment file for: Brazilian format for bank ITAU, customer
CUP_USCUSCHK ExtCustPayment File Template used to read a customer payment file for: US Customer Check File

It is possible to describe different file layouts, so called File Templates.

Please refer to External Files Interface for more information.

Note: The file template CUP_REMADV is a generic file template for the EDI message type REMADV which uses common EDI segments but is not designed to cover all possible EDI subsets. The generic file template can be used for EDI subset EANCOM. You can copy the existing payment format REMADV to amend your new file layout to the requirement of your EDI subset. The import of an EDI remittance advice REMADV requires in the file records that are delimited with CR/LF. Each EDI Segment must be delimited with CR/LF in order to load EDI Segments as individual record. The quote character (') in the external text file, which is the EDI Segment Terminator, must be converted to circumflex (^) before loading the file into the interface.

Note: The file template CUP_DEDUCTION is a generic file template for the purpose to create payments from a payer's remittance advice file. The file layout is normally used as a template for payer specific file layouts. You can copy the existing payment format DEDUCTION and amend the new file layout.

The File Type ExtCustPayment

The following record types are available for file type ExtCustPayment, supporting the External Customer Payment Interface.

Record Type ID Description
0_START Start record
1_HEAD Header record
2_DETAIL Detail record
3_MANDATE Payment Institute mandate record
4_CANCEL Cancellation record
5_REFUND Refund record
7_SUMMARY Summary record Before
8_SUMMARY Summary record After
9_END End record

About the Start Record (0_START)

The start record contains start information about the whole file, such as load date and payment reference.

The following columns are available for this record type,

Column ID Description Notes
ABORT_WHEN_ERROR Abort When Error Set to TRUE if the transfer should be aborted when a transfer error occur. If this column is not included in File Template the value will be FALSE.
ACCOUNT_NO    
COMPANY_IDENTIFIER Company Identifier The external payment is loaded in the company, for which the company identifier is defined in the External Payment Parameters/Company Identifier tab. If the company identifier is empty or not specified in the external payment parameters, the external payment will be created in the current company.
DUMMY1    
DUMMY2    
DUMMY3    
DUMMY4    
DUMMY5    
DUMMYC1    
DUMMYC2    
DUMMYC3    
DUMMYC4    
DUMMYC5    
FIRST_ROW_CONTROL Control First Row Set to TRUE if a control that this line is the first line should done. If this column is not included in File Template the value will be FALSE.
INFO01 Info 1 Information only to be shown in External File Transaction page.
INFO02 Info 2 Information only to be shown in External File Transaction page.
INFO03 Info 3 Information only to be shown in External File Transaction page.
INFO04 Info 4 Information only to be shown in External File Transaction page.
INFO05 Info 5 Information only to be shown in External File Transaction page.
INFO06 Info 6 Information only to be shown in External File Transaction page.
INFO07 Info 7 Information only to be shown in External File Transaction page.
INFO08 Info 8 Information only to be shown in External File Transaction page.
INFO09 Info 9 Information only to be shown in External File Transaction page.
INFO10 Info 10 Information only to be shown in External File Transaction page.
INSTITUTE_ID Payment Institute Payment Institute. Normally retrieved by specifying PAR:INSTITUTE_ID in Default Value on File Template Detail.
LOAD_DATE Load Date The Load Date. If this column is not included in File Template the value will be system date.
PAYMENT_REFERENCE Payment Reference The payment reference used for payment reference control.
RECORD_TYPE Record Type The record type identification in the file line.
REFERENCE_CONTROL Control Reference Set to TRUE if a control of payment reference should be done.The control is done by comparing the value for PAYMENT_REFERENCE against a value selected from Format Specific Info.
If this column is not included in File Template the value will be FALSE.
REFERENCE_CONTROL_COLUMN Control Reference Column The column in Format Specific Info, used for payment reference control.
SELECT_ROWTYPE Rowtype for select Rowtype that should be select in Format Specific Info. If this column is not included in File Template the value will be INSTITUTEGENERAL.
WAY_ID Payment Method Payment Method. Normally retrieved by specifying PAR:WAY_ID in Default Value on File Template Detail.

About the Header Record (1_HEAD)

The header record contains start information about a specific part of the file, such as load date and payment reference.

The following columns are available for this record type,

Column ID Description Note
ABORT_WHEN_ERROR Abort When Error Set to TRUE if the transfer should be aborted when a transfer error occur. If this column is not included in File Template the value will be FALSE.
ACCOUNT_NAME Account Name Information only to be shown in External File Transaction page.
ACCOUNT_NO Account No The account number.
ACCOUNT_TYPE Account Type The account type.
BANK_NAME Bank Name Bank Name. Information only to be shown in External File Transaction page.
BANK_NO Bank No Bank Number.Information only to be shown in External File Transaction page.
BRANCH_NAME Branch Name Branch Name.Information only to be shown in External File Transaction page.
BRANCH_NO Branch No Branch Number.Information only to be shown in External File Transaction page.
COMPANY_IDENTIFIER Company Identifier The external payment is loaded in the company, for which the company identifier is defined in the External Payment Parameters/Company Identifier tab. If the company identifier is set on the start record, the company identifier of the start record will be used. If the company identifier is empty or not specified in the external payment parameters, the external payment will be created in the current company.
CASH_ACCOUNT_CONTROL Control Cash Account Set to TRUE if a control that ACCOUNT_NO,ACCOUNT_TYPE and INSTITUTE_ID are specified on a cash account, should done. If this column is not included in File Template the value will be FALSE.
CURRENCY_CODE Currency Code The currency code that should be used. If this column is not included in File Template the value will be the base currency for the company.
DATE_CTRL Control Date Set to TRUE if a control that LOAD_DATE is not empty on this record type, should done. If this column is not included in File Template the value will be FALSE.
DATE_FROM Date From Information only to be shown in External File Transaction page.
DATE_TO Date To Information only to be shown in External File Transaction page.
DUMMY1    
DUMMY2    
DUMMY3    
DUMMY4    
DUMMY5    
DUMMYC1    
DUMMYC2    
DUMMYC3    
DUMMYC4    
DUMMYC5    
FIRST_ROW_CONTROL Control First Row Set to TRUE if a control that this line is the first line should done. If this column is not included in File Template the value will be FALSE.
INFO01 Info 1 Information only to be shown in External File Transaction page.
INFO02 Info 2 Information only to be shown in External File Transaction page.
INFO03 Info 3 Information only to be shown in External File Transaction page.
INFO04 Info 4 Information only to be shown in External File Transaction page.
INFO05 Info 5 Information only to be shown in External File Transaction page.
INFO06 Info 6 Information only to be shown in External File Transaction page.
INFO07 Info 7 Information only to be shown in External File Transaction page.
INFO08 Info 8 Information only to be shown in External File Transaction page.
INFO09 Info 9 Information only to be shown in External File Transaction page.
INFO10 Info 10 Information only to be shown in External File Transaction page.
INSTITUTE_CONTROL Control Institute Set to TRUE if the value in INSTITUTE_ID should be controlled against values selected from Format Specific Info. If this column is not included in File Template the value will be FALSE.
INSTITUTE_CONTROL_COLUMNS Control Institute Columns Used when INSTITUTE_CONTROL is set to TRUE. Columns in Format Specific Info that should be used for control of INSTITUTE_ID.
Example: COL:BANK_NO=N1;BRANCH_NO=N2;

This means that column BANK_NO in the file is compared with column N1 in Format Specific Info and column BRANCH_NO is compared with column N1 in Format Specific Info.
INSTITUTE_ID Payment Institute Payment Institute. Normally retrieved by specifying PAR:INSTITUTE_ID in Default Value on File Template Detail.
LOAD_DATE Load Date The Load Date. If this column is not included in File Template the value will be the value from record type 0_START or system date.
LOAD_DATE_NULL No Header Load Date Set to TRUE if no LOAD_DATE is located in the record type 1_HEAD. If this column is not included in File Template the value will be FALSE.
PAYMENT_REFERENCE Payment Reference The payment reference used for payment reference control.
PAYMENT_TYPE Payment Type The payment type. If this column is not included in File Template the value will be CUSTOMERPAYMENT.
RECORD_TYPE Record Type The record type identification in the file line.
REFERENCE_CONTROL Control Reference Set to TRUE if a control of payment reference should be done.The control is done by comparing the value for PAYMENT_REFERENCE against a value selected from Format Specific Info.
If this column is not included in File Template the value will be FALSE.
REFERENCE_CONTROL_COLUMN Control Reference Column The column in Format Specific Info, used for payment reference control.
REJECTED    
SELECT_ROWTYPE Rowtype for select Rowtype that should be select in Format Specific Info. If this column is not included in File Template the value will be INSTITUTEGENERAL.
WAY_ID Payment Method Payment Method. Normally retrieved by specifying PAR:WAY_ID in Default Value on File Template Detail.

About the Detail Record (2_DETAIL)

The detail record contains detailed information about a payment, such as amount and invoice reference. This is the only mandatory record type .

The following columns are available for this record type,

Column ID Description Note
ACTUAL_PAYMENT_DATE Actual Payment Date Information only to be shown in External File Transaction page.
AMOUNT Amount The payment amount
AMOUNT_CTRL Control Amount Set to TRUE if AMOUNT should be controlled to not be allowed to be empty. If this column is not included in File Template the value will be FALSE.
AMOUNT_SIGN Amount Sign The sign that indicate if amount is positive or negative. The sign can be included in the amount column.
BANK_TRANSACTION_INFO1 Bank Transaction Info 1 Multi-purpose information field 1, displayed on the transaction in external payments and can be used for segmentation of mixed payments. The information in the field can be e.g. the name of the payment originator.
BANK_TRANSACTION_INFO2 Bank Transaction Info 2 Multi-purpose information field 2, displayed on the transaction in external payments and can be used for segmentation of mixed payments. The information in the field can be e.g. the account number of the payment originator.
BANK_TRANSACTION_INFO3 Bank Transaction Info 3 Multi-purpose information field 3, displayed on the transaction in external payments and can be used for segmentation of mixed payments. The information in the field can be e.g. the bank code of the payment originator.
CASH_DISCOUNT_AMOUNT Cash Discount The cash discount amount from the file overrides the discount for an invoice, calculated by the matching.
COUNT Count Set to 1 if this line and the lines amount should be counted.
COUNT2 Count Credit Set to 1 if this line and the lines amount should be counted.
COUNT_OK    
COUNT_OK2    
CURRENCY_CODE Currency Code The currency code. If this column is not included in File Template the CURRENCY_CODE from header or base currency for the company will be the currency code for this detail line
DATE_CTRL Control Date Set to TRUE if PAYMENT_DATE should be controlled to not be allowed to be empty. If this column is not included in File Template the value will be FALSE.
DEDUCTION_AMOUNT1..10 Deduction Amount 1..10 The deduction amount from the file to override the deduction for an invoice, calculated by the matching. The deduction amount is only consider for the payment, if the corresponding deduction identifier is also filled. There are 10 columns for deduction amounts that corresponds with the 10 columns of the deduction identifier.
DEDUCTION_IDENTIFIER1..10 Deduction Identifier 1..10 The deduction identifier from the file that is used to connect the deduction amount from the file to the deduction rule in the payment. If the deduction identifier is empty, the deduction amount is not considered for the payment. If any of the 10 deduction identifier is used, the deductions, calculated by the matching of the invoice, are overridden. There are 10 columns for deduction identifier that corresponds with the 10 columns of deduction amounts.
DUMMY1    
DUMMY2    
DUMMY3    
DUMMY4    
DUMMY5    
DUMMYC1    
DUMMYC2    
DUMMYC3    
DUMMYC4    
DUMMYC5    
IDENTIFIER_REFERENCE Identifier Reference The reference to the customer. Used in Japan for Kana Name.
IDENTIFIER_REFERENCE_CTRL Control Identifier Reference Set to TRUE if IDENTIFIER_REFERENCE should be controlled to not be allowed to be empty. If this column is not included in File Template the value will be FALSE.
IDENTITY_CODE Identity Code Information only to be shown in External File Transaction page.
INFO01 Info 1 Information only to be shown in External File Transaction page.
INFO02 Info 2 Information only to be shown in External File Transaction page.
INFO03 Info 3 Information only to be shown in External File Transaction page.
INFO04 Info 4 Information only to be shown in External File Transaction page.
INFO05 Info 5 Information only to be shown in External File Transaction page.
INFO06 Info 6 Information only to be shown in External File Transaction page.
INFO07 Info 7 Information only to be shown in External File Transaction page.
INFO08 Info 8 Information only to be shown in External File Transaction page.
INFO09 Info 9 Information only to be shown in External File Transaction page.
INFO10 Info 10 Information only to be shown in External File Transaction page.
INVOICE_AMOUNT_CTRL Control Invoice Amount Set to TRUE if AMOUNT should be controlled against Invoice Amount.
If this column is not included in File Template the value will be FALSE.
INVOICE_REFERENCE Invoice Reference The reference to the invoice.
INVOICE_REFERENCE_CTRL Control Invoice Reference Set to TRUE if INVOICE_REFERENCE should be controlled to not be allowed to be empty.If this column is not included in File Template the value will be FALSE.
MATCH_INVOICE_CTRL Control Invoice Match Set to TRUE if matched invoices should be controlled against proposals. If this column is not included in File Template the value will be FALSE.
MESSAGE_CODE Message Code For some payment format this will indicate an error on the payment.
MESSAGE_CODE_CTRL Control Message Code Set to TRUE if MESSAGE_CODE should be controlled. If this column is not included in File Template the value will be FALSE.
MESSAGE_CODE_EXIST_CTRL    
NEW_ITEM_INVOICE_NO New Item Invoice Number The invoice number that should be used for new customer difference items. The specified value is only used, if the file includes a message code and a customer ID, either from the invoice identified in the INVOICE_REFERENCE or from the REJECTED_PAYER_NO column. Additionally the message code must be set up in the transaction type with type Customer Payment and in the payment format message function with function Create New Diff Item.
NEW_ITEM_TEXT New Item Text The text to be used for new customer difference items. The specified value is only used if In the message code or the reason code, the option to generate a text for the new item is selected. The file must also include a message code and a customer ID, either from the invoice identified in the INVOICE_REFERENCE or from the REJECTED_PAYER_NO column. Additionally the message code must be set up in the transaction type with type Customer Payment and in the payment format message function with function Create New Diff Item.
REASON_CODE Reason Code The reason code for a transaction with message code. This code provides additional information about the cause of the transaction and is transferred to external payments if the message code in the file is used too. The reason code can be used to control how the new customer difference items should be created.
OTHER_AMOUNT Other Amount Information only to be shown in External File Transaction page.
PAYMENT_DATE Payment Date The payment date. If this column is not included in File Template the LOAD_DATE from header or system date will be the payment date for this detail line.
PAYMENT_DESC Payment Description The payment description.
POA_CTRL Control POA Set to TRUE if INVOICE_REFERENCE should be controlled against Payment On Account. If this column is not included in File Template the value will be FALSE.
PREPARED_REFERENCES    
RECORD_TYPE Record Type The record type identification in the file line.
REJECTED    
REJECTED_AMOUNT    
REJECTED_COMMENT_CODE    
REJECTED_INVOICE_REFERENCE    
REJECTED_PAYER_NO    
STATEMENT_TRANS_TYPE Statement Trans Type The statement trans type. If this column is not included in File Template the value will be CUSTOMERPAYMENT.
SUM_ABS_AMOUNT    

About the Mandate Record (3_MANDATE)

The mandate record contains Mandate Advice (Return File with Mandates).

The following columns are available for this record type,

Column ID Description Note
ACTION_DATE    
ASSOCIATION_NO    
COMMENT_CODE    
DUMMYC1    
DUMMYC2    
DUMMYC3    
DUMMYC4    
DUMMYC5    
GIRO_NUMBER    
INFORMATION_CODE    
PAYER_ACCOUNT    
PAYER_NO    
RECORD_TYPE    

About the Cancellation Record (4_CANCEL)

The cancellation record contains information about cancellations of payments

The following columns are available for this record type,

Column ID Description Note
COMMENT_CODE    
COUNT    
PAYMENT_CODE    
PAYMENT_REFERENCE    
RECORD_TYPE    
TEXT    

About the Refund Record (5_REFUND)

The refund record contains refund information

The following columns are available for this record type,

Column ID Description Note
AMOUNT    
INVOICE_REFERENCE    
ORIGINAL_DUE_DATE    
PAYER_NO    
RECORD_TYPE    
REFUND_CODE    
REFUND_DATE    

About the Summary Record (7_SUMMARY)

The summary record contains summary information about a part of the file, such as total amount and number of transactions. It is Located before the detail records.

The following columns are available for this record type,

Column ID Description Note
NO_OF_TRANSACTIONS    
NO_OF_TRANSACTIONS2    
PAYMENT_DATE    
RECORD_TYPE    
TOTAL_AMOUNT    
TOTAL_AMOUNT2    

About the Summary Record (8_SUMMARY)

The summary record contains summarized information related to a part of the file, such as total amount and number of transactions. It is Located after the detail records.

The following columns are available for this record type,

Column ID Description Note
AMOUNT_CTRL Control Amount Set to TRUE if TOTAL_AMOUNT should be controlled against the sum of AMOUNT on detail lines. If this column is not included in File Template the value will be FALSE.
AMOUNT_CTRL2 Control Credit Amount Set to TRUE if TOTAL_AMOUNT2 should be controlled against the sum of AMOUNT on detail lines. If this column is not included in File Template the value will be FALSE.
COUNT_CTRL Control No Of Transactions Set to TRUE if NO_OF_TRANSACTIONS should be controlled against the sum of detail lines. If this column is not included in File Template the value will be FALSE.
COUNT_CTRL2 Control No Of Credit Transactions Set to TRUE if NO_OF_TRANSACTIONS2 should be controlled against the sum of detail lines. If this column is not included in File Template the value will be FALSE.
DATE_CTRL Control Date Set to TRUE if PAYMENT_DATE should be controlled against LOAD_DATE on header. If this column is not included in File Template the value will be FALSE.
INFO01 Info 1 Information only to be shown in External File Transaction page.
INFO02 Info 2 Information only to be shown in External File Transaction page.
INFO03 Info 3 Information only to be shown in External File Transaction page.
INFO04 Info 4 Information only to be shown in External File Transaction page.
INFO05 Info 5 Information only to be shown in External File Transaction page.
INFO06 Info 6 Information only to be shown in External File Transaction page.
INFO07 Info 7 Information only to be shown in External File Transaction page.
INFO08 Info 8 Information only to be shown in External File Transaction page.
INFO09 Info 9 Information only to be shown in External File Transaction page.
INFO10 Info 10 Information only to be shown in External File Transaction page.
NO_OF_CANCELLED_TRANSACTIONS No Of Cancelled Transactions Information only to be shown in External File Transaction page.
NO_OF_TRANSACTIONS No Of Transactions Number of detail lines.
NO_OF_TRANSACTIONS2 No Of Transactions Credit Number of detail lines.
PAYMENT_DATE Payment Date The payment date.
RECORD_TYPE Record Type The record type identification in the file line.
TOTAL_AMOUNT Total Amount The total amount of the detail lines.
TOTAL_AMOUNT2 Total Amount Credit The total amount of the detail lines.
TOTAL_AMOUNT_CANCELLED Total Amount Cancelled Information only to be shown in External File Transaction page.

About the End Record (9_END)

The end record contains summary information about the whole file, such as total amount and number of transactions.

The following columns are available for this record type,

Column ID Description Note
AMOUNT_CTRL Control Amount Set to TRUE if TOTAL_AMOUNT should be controlled against the sum of AMOUNT on detail lines. If this column is not included in File Template the value will be FALSE.
AMOUNT_CTRL2 Control Credit Amount Set to TRUE if TOTAL_AMOUNT2 should be controlled against the sum of AMOUNT on detail lines. If this column is not included in File Template the value will be FALSE.
COUNT_CTRL Control No Of Transactions Set to TRUE if NO_OF_TRANSACTIONS should be controlled against the sum of detail lines. If this column is not included in File Template the value will be FALSE.
COUNT_CTRL2 Control No Of Credit Transactions Set to TRUE if NO_OF_TRANSACTIONS2 should be controlled against the sum of detail lines. If this column is not included in File Template the value will be FALSE.
DATE_CTRL Control Date Set to TRUE if PAYMENT_DATE should be controlled against LOAD_DATE on header. If this column is not included in File Template the value will be FALSE.
INFO01 Info 1 Information only to be shown in External File Transaction page.
INFO02 Info 2 Information only to be shown in External File Transaction page.
INFO03 Info 3 Information only to be shown in External File Transaction page.
INFO04 Info 4 Information only to be shown in External File Transaction page.
INFO05 Info 5 Information only to be shown in External File Transaction page.
INFO06 Info 6 Information only to be shown in External File Transaction page.
INFO07 Info 7 Information only to be shown in External File Transaction page.
INFO08 Info 8 Information only to be shown in External File Transaction page.
INFO09 Info 9 Information only to be shown in External File Transaction page.
INFO10 Info 10 Information only to be shown in External File Transaction page.
NO_OF_CANCELLED_TRANSACTIONS    
NO_OF_TRANSACTIONS No Of Transactions Number of detail lines.
NO_OF_TRANSACTIONS2 No Of Transactions Credit Number of detail lines.
PAYMENT_DATE Payment Date The payment date.
RECORD_TYPE Record Type The record type identification in the file line.
TOTAL_AMOUNT Total Amount The total amount of the detail lines.
TOTAL_AMOUNT2 Total Amount Credit The total amount of the detail lines.
TOTAL_AMOUNT_CANCELLED    

How to Use the Record Types

A customer payment file can use all of the listed record types.

The only only mandatory record type is the detail record type, 2_DETAIL.

The columns available in the record types supporting file type ExtCustPayment can be used in the file templates for different purposes, like e.g.,

  • Referring to a column or positions in the external customer payment file line.
  • Containing instructions how handle so called template controls.
  • Containing default values needed by the External Customer Interface
  • Containing advanced instructions how to interpret file information.

A customer payment file is normally structured in one of the following three ways,

  1. Many header records The file has in this case,

    1. A start record
    2. One or more header records
    3. Each header record with one or more detail records
    4. A summary record corresponding to the header record
    5. An end record
Start Record  
   Header Record  
      Detail Record  
      ...  
      Detail Record  
   Summary Record  
   Header Record  
      Detail Record  
      ...  
      Detail Record  
   Summary Record  
End Record
  1. One header record with many detail records The file has in this case,

    1. A header record
    2. One or more detail records
Header Record  
   Detail Record  
   ...  
   Detail Record  
Summary Record
  1. Only detail records The file has in this case only detail records.
Detail Record  
Detail Record

There can of course be different variations on the three described structures of a payment file.

The most simple customer payment file contains only detail records and each detail record containing columns for invoice reference and amount.