Payment - Batch (ABA file format)

An .ABA file is an electronic file format commonly used by Australian banks for processing bulk transactions, such as payroll, accounts payable, and direct debits. It's structured in a format specified by the Australian Banking Association (ABA) and adheres to a standard known as the Direct Entry (DE) file format.

Specification

Each line in an ABA file is a record. An ABA file includes three main record types:

  1. Descriptive Record (Header)
  2. Detail Record (for each transaction)
  3. File Total Record (Summary)

Each ABA record is exactly 120 characters long and must be separated by a carriage-return/line-feed (CRLF).

Allowed Character Set

  • Letters: A-Z, a-z
  • Numbers: 0-9
  • Special Characters: space, &, ', ,, -, ., /, +, $, !, %, (, ), *, #, =, :, ?, [, ], _, ^, @
  • Optional Alphanumeric Fields: Fill with spaces if no data exists.
  • Numeric Fields: Use only numbers (0-9) and fill with zeros if optional and no data exists.

Record Specifications

1. Descriptive Record (Type 0)

This header provides general information about the file.

Char PosField SizeField DescriptionSpecification
11Record TypeMust be '0'
2-1817BlankMust be filled
19-202Sequence NumberMust be '01'. Right justified, zero-filled
21-233Financial InstitutionAbbreviation of User’s FI
24-307BlankMust be blank filled
31-5626Name of UserAs specified by FI. Left justified, blank filled
57-626User ID NumberAllocated by FI. Numeric, right justified, zero-filled
63-7412Description (e.g., "PAYROLL")All character set valid. Left justified, blank filled
75-806Processing DateFormat DDMMYY. Zero-filled
81-12040BlankMust be blank filled

2. Detail Record (Type 1)

Each detail record contains specific transaction details.

Char PosField SizeField DescriptionSpecification
11Record TypeMust be '1'
2-87Bank/State/Branch (BSB) NumberMust be numeric with hyphen in position 5
9-179Account NumberRight justified, blank filled
181Indicator'N' for new/varied BSB; 'W', 'X', 'Y' for withholding tax
19-202Transaction Codee.g., '13' for Debit, '50' for Credit
21-3010AmountIn cents, right justified, zero filled
31-6232Account TitleLeft justified, blank filled
63-8018Lodgement ReferenceLeft justified, no leading characters
81-877Trace BSBFormat xxx-xxx
88-969Trace Account NumberRight justified, blank filled
97-11216Name of RemitterLeft justified, blank filled
113-1208Withholding Tax AmountIn cents, right justified, zero filled

3. File Total Record (Type 7)

This record provides totals for reconciliation purposes.

Char PosField SizeField DescriptionSpecification
11Record TypeMust be '7'
2-87BSB Format FillerMust be '999-999'
9-2012BlankMust be blank filled
21-3010File Net Total AmountRight justified, zero filled
31-4010File Credit Total AmountAccumulated total of credit Detail Records
41-5010File Debit Total AmountAccumulated total of debit Detail Records
51-7424BlankMust be blank filled
75-806Total count of Record Type 1 itemsRight justified, zero filled
81-12040BlankMust be blank filled

Filename journey

StepActionExample Filename #1
1.File is uploaded to SFTP server19-3-2024.aba
2.When Azupay Batch app picks up the file, we rename it to:19-3-2024.processing.aba
3.When an error occurs processing the file, we will rename to:19-3-2024.error.aba
Will also create 19-3-2024-response.aba file containing the error message, examples:
- Mismatch error: sum of all transactions
- Mismatch error: count of all transactions
- Data error: invalid format
- Data error: count of transactions exceeds maximum allowed (100,000)
- Error: filename <...> not valid ...
- or exception message from parser
4.When file is succeessfully processed by the Azupay Batch app, we will rename to:19-3-2024.processed.aba

File error handling

File Error defines errors that were encountered when parsing the submitted ABA file.

  • The response file will be generated with the error messages in the content.
  • No outbound payments were sent

ErrorFailuresReattempt / Redrive actiond
Sum of all "credit" transactions (record with TX code "50") does not match with "File Credit Total Amount (from footer / record 7)- Failure for all transactions, no payment made- Merchant can "fix" the file and re-upload
- Original file renamed to ...-error.aba- Merchant can use the same filename or a new filename
- Error message created in file ...-response.aba
Count of all transactions does not match with "Total count of Records" (from footer / record 7)- Failure for all transactions, no payment made- Merchant can "fix" the file and re-upload
- Original file renamed to ...-error.aba- Merchant can use the same filename or a new filename
- Error message created in file ...-response.aba
File cannot be parsed- Failure for all transactions, no payment made- Merchant can "fix" the file and re-upload
- Original file renamed to ...-error.aba- Merchant can use the same filename or a new filename
- Error message created in file ...-response.aba
Filename not valid- Failure for all transactions, no payment made- Merchant can "fix" the file and re-upload
Due to concatenation of filename (without extension) and transaction/row number for clientPaymentId, it must be a valid clientPaymentId.- Original file renamed to ...-error.aba- Merchant can use the same filename or a new filename
- Error message created in file ...-response.aba

Idempotency

An idempotency key is something we use to prevent duplicate processing of the same transaction. For each transaction, we create a unique key using the filename and the row number of the transaction in that file. This key helps the system identify each transaction, even if there are repeated attempts to process it.

The idempotency key used for the idempotent field (Payment.clientPaymentId) is structured as:

<filename><dash><row-number>

Example Values:

  • 3-24-2024-1 (first transaction in file 3-24-2024.aba)
  • 3-24-2024-2 (second transaction in file 3-24-2024.aba)
  • …and so on.

Refer to API reference documentation here for further information on Payment.clientPaymentId: https://developer.azupay.com.au/reference/makepayment

🚧

It is important for file that is successfully processed, that you DO NOT rename and re-upload the file as it will be treated as new transactions.