Flat-file payment response report
The Flat-file payment response report is sent/retrieved in response to the processing of a Flat-file payment upload file.
File format
The Flat-file contains the list of all transactions that were approved and declined during processing. The Flat-file format is a fixed-width text file. The file consists of five record types.
The file has the following general structure:
- Report control header (one only per file)
- Report batch header (per supplier business)
- Report transaction detail (one or more in each payment batch)
- Report batch trailer (one only per batch header)
- Report control trailer (one only per file)
Data types are listed as:
- N- numeric 0-9 only.
- A- letters from the English alphabet, including spaces.
- AN- letters or numbers (alphanumeric), spaces, underscores- _and hyphens- -.
- S- spaces only
Unless otherwise noted, N numeric fields are right-justified and padded with leading zeros. A letters and AN alphanumeric fields are left-justified and padded with trailing spaces. Amounts are always expressed in cents, e.g. $125.94 is expressed as 0000012594 (assuming the field has a length of 10).
Report control header
The file header is the first record in the file.
| No | Field Name | Position | Length | Data Type | Description | 
|---|---|---|---|---|---|
| 1 | Record Type | 1 | 1 | N | 1to indicate file header. | 
| 2 | Client Community Code | 2 | 10 | AN | Your community code. | 
| 3 | File Creation Date | 12 | 8 | N | Date the file was created YYYYMMDDformat. | 
| 4 | File Creation Time | 20 | 4 | N | Time the file was created in HHMM. | 
| 5 | Client Name | 24 | 30 | AN | Your community name. | 
| 6 | Unique File Identifier | 54 | 20 | AN | The Unique File Identifier you provided in the payment file. | 
| 7 | Filler | 74 | 177 | S | Spaces. | 
Report batch header
One batch header record will be present for each payment batch.
| No | Field Name | Position | Length | Data Type | Description | 
|---|---|---|---|---|---|
| 1 | Record Type | 1 | 1 | N | 3to indicate batch header. | 
| 2 | Client Company Name | 2 | 30 | AN | Supplier business name. | 
| 3 | Client Company Code | 32 | 10 | AN | Supplier business code that processed the transactions in this batch. | 
| 4 | Batch Type | 42 | 2 | A | CCindicates only card payments are in this batch.DDindicates only bank account payments are in this batch.PTindicates only PayTo transactions are in this batch. | 
| 5 | Batch Description | 44 | 18 | S | Spaces. | 
| 6 | Unique Batch Code | 62 | 15 | AN | The Unique Batch Identifier you provided in the payment file. | 
| 7 | Refund Flag | 77 | 1 | A | Rfor a refund batch. Otherwise a single space. | 
| 9 | Filler | 78 | 170 | S | Spaces. | 
Report transaction detail
Each record represents a transaction that was approved or declined during processing. Card and bank account transactions use the same record format, but the usage of the fields differ:
- Report card transaction detail
- Report bank account transaction detail
- Report PayTo transaction detail
Report card transaction detail
| No | Field Name | Position | Length | Data Type | Description | 
|---|---|---|---|---|---|
| 1 | Record Type | 1 | 1 | N | 5to indicate a transaction. | 
| 2 | Filler | 2 | 2 | S | Spaces. | 
| 3 | Expiry Date | 4 | 8 | N | The card expiry date in MMYYYYformat.000000forFLAT_FILE_TOKENSformat. | 
| 4 | Account Number | 12 | 17 | AN | Masked card number or Account Token. Left justified with trailing spaces. | 
| 5 | Amount | 29 | 10 | N | The transaction amount. | 
| 6 | Customer Number | 39 | 15 | AN | Customer number provided in the payment file. | 
| 7 | Customer Name | 54 | 22 | AN | Customer name provided in the payment file. | 
| 8 | Transaction Number | 76 | 15 | AN | The transaction number provided in the payment file. | 
| 9 | Originating System Code | 91 | 2 | S | Spaces. | 
| 10 | Receipt Number | 93 | 21 | N | A unique reference for a transaction. Left justified with trailing spaces. | 
| 11 | Filler | 114 | 16 | S | Spaces. | 
| 12 | Summary Code | 130 | 1 | N | Success indicator for the Response Codes. | 
| 13 | Response Code | 131 | 3 | AN | The response code from the transaction processing. | 
| 14 | Response Description | 134 | 60 | AN | Description for the Response Codes. | 
| 15 | Card Scheme | 194 | 2 | A | The card scheme. VI(Visa),MC(Mastercard),AX(American Express),DC(Diners Club),JC(Japan Credit Bureau), orUP(Union Pay). Spaces for unknown or invalid cards. | 
| 16 | Soft Decline Flag | 196 | 1 | N | 1if the transaction was a soft-decline. Otherwise a0. | 
| 17 | Automatic Retry Flag | 197 | 1 | N | 1if the transaction will be automatically retried. Otherwise a0. | 
| 18 | Filler | 198 | 53 | S | Spaces. | 
Report bank account transaction detail
| No | Field Name | Position | Length | Data Type | Description | 
|---|---|---|---|---|---|
| 1 | Record Type | 1 | 1 | N | 5to indicate a transaction. | 
| 2 | Filler | 2 | 2 | S | Spaces. | 
| 3 | BSB | 4 | 8 | AN | The BSB or spaces for Account Token payments | 
| 4 | Account Number | 12 | 17 | AN | Bank account number or Account Token. Left justified with trailing spaces. | 
| 5 | Amount | 29 | 10 | N | The transaction amount. | 
| 6 | Customer Number | 39 | 15 | AN | Customer number provided in the payment file. | 
| 7 | Customer Name | 54 | 22 | AN | Customer name provided in the payment file. | 
| 8 | Transaction Number | 76 | 15 | AN | The transaction number provided in the payment file. | 
| 9 | Originating System Code | 91 | 2 | S | Spaces. | 
| 10 | Receipt Number | 93 | 21 | N | A unique reference for a transaction. Left justified with trailing spaces. | 
| 11 | Filler | 114 | 16 | S | Spaces. | 
| 12 | Summary Code | 130 | 1 | N | Success indicator for the Response Codes. | 
| 13 | Response Code | 131 | 3 | AN | The response code from the transaction processing. | 
| 14 | Response Description | 134 | 60 | AN | Description for Response Codes. | 
| 15 | Filler | 194 | 2 | S | Spaces. | 
| 16 | Soft Decline Flag | 196 | 1 | N | 1if the transaction was a soft-decline. Otherwise a0. | 
| 17 | Automatic Retry Flag | 197 | 1 | N | 1if the transaction will be automatically retried. Otherwise a0. | 
| 18 | Filler | 198 | 53 | S | Spaces. | 
Report PayTo transaction detail
| No | Field Name | Position | Length | Data Type | Description | 
|---|---|---|---|---|---|
| 1 | Record Type | 1 | 1 | N | 5to indicate a transaction. | 
| 2 | Filler | 2 | 2 | S | Spaces. | 
| 3 | Agreement Token | 12 | 17 | AN | PayTo Agreement Token. Left justified with trailing spaces. | 
| 4 | Amount | 29 | 10 | N | The transaction amount | 
| 5 | Customer Number | 39 | 15 | AN | Customer number that was provided in the payment file. | 
| 6 | Filler | 54 | 22 | S | Spaces. | 
| 7 | Transaction Number | 76 | 15 | AN | The transaction number that was provided in the payment file. | 
| 8 | Filler | 91 | 2 | S | Spaces. | 
| 9 | Receipt Number | 93 | 21 | AN | A unique reference for a transaction. Left justified with trailing spaces. | 
| 10 | Filler | 114 | 16 | S | Spaces. | 
| 11 | Summary Code | 130 | 1 | N | Success indicator for the Response Codes. | 
| 12 | Response Code | 131 | 3 | AN | The response code from the transaction processing. | 
| 13 | Response Description | 134 | 60 | AN | Description for Response Codes. | 
| 14 | Filler | 194 | 10 | S | Spaces. | 
| 15 | End-to-end ID | 204 | 35 | AN | The End to End ID that was provided in the payment file. When not provided, this value is the Receipt Number. | 
Report batch trailer
Each batch has a trailer record following the last transaction in the batch.
| No | Field Name | Position | Length | Data Type | Description | 
|---|---|---|---|---|---|
| 1 | Record Type | 1 | 1 | N | 7to indicate batch control trailer. | 
| 2 | Batch Transaction Count | 2 | 6 | N | Number of transactions in the batch. | 
| 3 | Batch Transaction Total Amount | 22 | 10 | N | Sum of all transaction amounts in the batch. | 
| 4 | Client Company Code | 18 | 10 | AN | Same as the value in the batch header. | 
| 5 | Unique Batch Code | 28 | 15 | AN | Same as the value in the batch header. | 
| 6 | Filler | 43 | 208 | S | Spaces | 
Report control trailer
The file trailer record is the last record in the file.
| No | Field Name | Position | Length | Data Type | Description | 
|---|---|---|---|---|---|
| 1 | Record Type | 1 | 1 | N | 9to indicate file control trailer. | 
| 2 | File Batch Count | 2 | 2 | N | The number of batches present in this file. | 
| 3 | File Transaction Count | 4 | 8 | N | Total number of transactions in the file. | 
| 4 | File Transaction Amount | 12 | 12 | N | Sum of all transaction amounts in the file. | 
| 5 | Community Code | 24 | 10 | AN | Same as the value in the file header. | 
| 6 | Unique File Identifier | 64 | 20 | AN | Same as the value in the file header. | 
| 7 | Filler | 84 | 167 | S | Spaces | 
Sample file
The sample file below contains:
- 2 batches, 1 for a card payment and 1 for a bank account payment.
- 2 transactions. 1 transaction in each batch, both with declined responses.
- The community code is CLIENTCODE.
- The supplier code is SUPPLRCODE.
1CLIENTCODE200911041009Client Name                   2009110401
3Customer Name                 SUPPLRCODECCCredit Card Batch 2009110401_01
5  00001113411111...111     0000002508CUST000001     John Citizen          127462329                                             1051Insufficient Funds                                          VI
70000010000002508SUPPLRCODE2009110401_01
3Customer Name                 SUPPLRCODEDDDirect Debit Batch2009110401_02
5  00032000000007           0000003712CUST000002     Jane Citizen          127462330
70000010000003712SUPPLRCODE2009110401_02                                                                                          R  Invalid
90200000002000000006220CLIENTCODEClient Name                   2009110401