What are BAI Exports

  • The BAI export is a method for downloading your Commercial Banking Online account information for upload into other financial systems. The format for the BAI export was created by the Bank Administration Institute and uses a delimited ASCII format to contain your information.

    The BAI export file follows the following structure:

    File Header 

    Group Header [for each day’s data] 

    Account Header [for each account for the given day, includes balance]   

    Transaction Details [for each transaction item for the given account on given day]

    Account Trailer

    Group Trailer

    File Trailer

     

    Each line of the BAI file will start with a two-numbered record type followed by a number of fields. Each field is separated by a comma and each line will end with a forward slash </>.

     

    Two number
    Code
    Description
    01 File Header
    02 Group Header
    03 Account Header (for each account, includes balance)
    16 Transaction Details (for each transaction item)
    49 Account Trailer
    88 Continuation of the previous line on to the next line
    98 Group Trailer
    99 File Trailer

    File Header

    Example of a BAI file header

    01,00000000,000000000,151021,0916,1,,,2/


    The File header line signifies the start of the File and contains information on the time and date of the file extract. As you can see in the example above each field is separated by a comma.

    The information in the fields will follow this order:

    File header
    Field No
    Field Size Data
    1 2 Always 01 – signifies start of file
    2 8 Always zero filled
    3 9 Always zero filled
    4 6 Date of export in format YYMMDD
    5 4 Time of export in format HHMM (24 –hr clock)
    6 1 Always 1
    7 0 Blank
    8 0 Blank
    9 1 Always 2

    Group Header

    Example of a BAI file header

    02,,00000000,1,150610,0916,USD,/


    The Group header signifies the start of a group of data, in most cases this will be a day of transactions.

    The information in the fields will follow this order:

     

    Group header
    Field No
    Field Size Data
    1 2 Always 02 – signifies start of each Bank’s report
    2 0 Blank
    3 9 Individual Bank’s identification number
    4 1 Always 1
    5 6 Date relating to individual Bank’s data in Format YYMMDD
    6 4 Time (optional)
    7 3 SWIFT currency code
    8 0 Blank

     

    Account header – balance records

    Example of an Individual account

    03,776123-00702468,GBP,015,56,,Z,045,56,,Z,072,0,,Z,074,0,,Z,972,56,,Z,974/
    88,56,0,,Z,100,0,,Z,400,497,3,Z,990,0,,Z/


    The account header will give information for each account for the day specified in the Group Heading. It will also include balance information. As you can see in the above example the information wraps over two lines and the new line starts with 88 indicating a continuation of the previous line.

    The information in the fields will follow this order:

    Field No Field Size Data
    1 2 Always 03 – signifies balance record
    2 15 Sort code - account number (with hyphen)
    3 3 SWIFT currency code
    4 3 BAI Balance code (see table below)
    5 Variable Amount signed in pence
    6 0 Blank
    7 1 Z’

     

    Fields 4 to 7 will repeat for each balance that is reported.

    Debit figures are shown by the presence of a ‘–’ symbol preceding the value.

    Transaction Details

    Example of Transaction details

    88,TEST
    16,169,200,Z,,TEST,F/FLOW TEST PYMT
    88,TRNID=00000000022-4
    88,TRNIDDATE=20170119
    88,ADVREF=311763106183601701900110TEST


    The transaction record gives transaction information of the account that was specified in the Account Header.

    The information in the fields will follow this order:

     

    Field No Field Size Data
    1 2 Always 16 – signifies a transaction code
    2 3 BAI Transaction code (see table below)
    3 Variable Amount signed in pence
    4i 6 Value date in format YYMMDD
    4ii 0 Blank
    5 (7) 0 Blank
    6 (8) 0 Blank
    7 (9) Variable Entry narrative

     

    Account Trailer

    Example of an Account Trailer

    49,224,3/


    The Account trailer indicates the end of the account information that was opened in the Account header.

    The information in the fields will follow this order:

    Field No Field Size Data
    1 2 Always 49 – signifies account trailer
    2 Variable Hash total of the accounts 03 and 16 record value
    3 Variable No. of 03,16 and 88 records for this account plus this 49 record

     

    Multiple accounts

    If you have requested more than one account to be included in the report the file will begin at the Account header (03) for the next account.

    Group trailer

    Example of Group trailer

    98,0,2,6/


    The Group trailer indicates the end of the Group information that was opened in the Group header.

    The information in the fields will follow this order:

     

    Field No Field Size Data
    1 2 Always 98 – signifies group trailer
    2 Variable Hash total of all 03 and 16 records reported by the Bank
    3 Variable Number of records reported
    4 Variable Number of 03,16, 88 and 49 records reported plus the 02 and 98 group records

     

    File trailer

    Example of File trailer

    99,393109,95,1389/


    The File trailer indicates the end of the File information that was opened in the File header.

    The information in the fields will follow this order:

     

    Field No Field Size Data
    1 2 Always 99 – signifies file trailer
    2 Variable Hash total of all amounts within each group’s records
    3 Variable Number of groups reported
    4 Variable Total number of records reported, including the 01, 02, 03, 16, 88,  and 49 records and the closing 98 and 99 records


    BAI balance and transaction codes


    BAI code Description BAI code Description
    015 Closing ledger balance 452   Bacs Payment
    045 Closing cleared balance 455   Reversal Bacs Credit
    072 Funds due to Clear Day + 1 464
      
    Bill Payment
    074 Funds due to Clear Day + 2 466
      
    Direct Debit or Bacs Payment
    100 Total number of Credits 468   Card Transaction
    115 ATM Deposit 469
      
    Cash Withdrawal
    116 ATM Fee Reversal 472
      
    Reversal of Cash Deposit
    118 Reversal of ATM Withdrawal 474
      
    Reversal of Cash/Cheque Deposit
    121 Bacs Payment 475
      
    Cheque
    123 Bacs Payment Returned 477
      
    Charges
    135 Reversal of Bacs Credit Returned 478
      
    Charges Transfer
    142 Bill Payment 479   Deferred Charges
    147 Card Transaction 481
      
    Fixed Service Charge
    155 Cash Deposit 484
      
    Management Charge
    164 Cash/Cheque Deposit 485
      
    Replacement Card Charge
    165 Reversal of Cash Withdrawal 487
      
    Service Charge
    168 International Payment 489
      
    Settlement Charge
    169 CHAPS or International Payment 491
      
    Withdrawal Charge
    171 Charges 493
      
    Withdrawal of Account Charges
    172 Charges Transfer 496
      
    Cheque
    173 Loan Charges Transfer 501
      
    Cheques Collected
    174 Bank Giro Credits
    502
      
    Cheques Negotiated
    176 Reversal of Replacement Card Charge 508
      
    Counter Withdrawal
    184 Reversal of Withdrawal Charge 512
      
    Full Cheque Encashment
    187 Service Charge Transfer 513
      
    Returned Cheque Charge
    189 Cheque 514
      
    Reversal of Cheque Deposited
    191 Cheque Returned 516
      
    Reversal of Cheque Returned
    196 Cheques Negotiated 518   Reversal of Partial Cheque
    201 Counter Deposit 522   Reversal of Returned Cheque Charge
    206 Full/Partial Cheque Encashment 526   Direct Debit- Representation Funds Returned
    212 Partial Cheque Encashment 527   Standing Orders Paid
    213 Reversal of Cheque Debit 529   Direct Debit Funds Returned
    214 Reversal of Counter Withdrawal 531   Direct Debit Initial payment
    216 Reversal of Full Cheque Encashment 535   Direct Debit Payment - Representation
    221 Direct debit Funds Returned 538   Direct Debit Return Charge
    222 Reversal of Direct Debit 540   Final Direct Debit Funds Returned
    224 Reversal of Direct Debit Return Charge 541   Initial Direct Debit Funds Returned
    226 Dividends 542   Reversal of Direcct Debit Funds Returned
    227 Standing Order Received 543   Dividends
    229 Faster Payment 544   Export Credit
    232 Faster Payment Returned 547   Faster Payment Returned
    233 Reversal of Faster Payment 548   Faster Payment Sent
    234 Reversal of Faster Payment Charge 549   Regular Service Fee
    235 Foreign Exchange Deposited 550   Direct Debit Final Payment
    236 Foreign Exchange Purchased 554   Usage Fee Debit
    237 Reversal of Foreign Exchange Sale 555   Foreign Exchange Sale
    238 Reversal of Foreign Exchange Withdrawal 557   Foreign Exchange Withdrawal
    241 Account Credit 558   Reversal of Foreign Exchange Deposited
    242 Inter Account Transfer 563   Reversal of Foreign Exchange Purchased
    243 Interest 564   Guarantees
    244 Interest Gross 566   Account Debit
    246 Interest Net 567   Inter Account Transfer
    247 Term Savings Bonus Interest 568   Interest
    248 ICM Transaction 574   Gross Interest Credit Transfer
    255 Overdraft Interest 577   Net Credit Interest Transfer
    257 Sepa Direct Debit 616   Overdraft Fees
    258 Sepa Direct Debit Returned 621   Overdraft Interest
    261 Sepa Payment 622   Overdraft Interest Charges
    263 Recalled Standing Order 627   Sepa Direct Debit
    268 Sweeping 629   Sepa Direct Debit Returned
    274 Tax Credit 631   Sepa Payment
    275 Treasury Transaction 633   Reversal of Recalled Standing Order
    276 Reversal of Trustcard Settlement 641   Sweeping
    398 Refund of Charges 644   Tax Debit
    399 Sundry Credits 651   Treasury Transaction
    400 Total Amount of Debits 654   Debit Interest
    408 Closed Account Usage Fee 656   Account Closed -Bacs
    409 Account Closed - Cash 669   International Payment
    415 Account Closed - Cheque 674   Trustcard Settlement
    421 Closed Account Ancillary Charges 698   Charges/Fees Paid
    422 Closed Account Management Charge 699   Miscellaneous
    423 Closed Account Planned O/F Fees 962   CHAPS Debit
    435 Closed Account Withdrawal Charge 972   Projected Cleared Balance Day + 1
    445 ATM Withdrawal 974   Projected Cleared Balance Day + 2
    447 ATM Withdrawal Fee 990   Total Uncleared Funds
    451 Bacs Credits Returned    

Calls may be monitored or recorded in case we need to check we have carried out your instructions correctly and to help improve our quality of service.

Lloyds Bank plc Registered Office: 25 Gresham Street, London EC2V 7HN. Registered in England and Wales no. 2065. Telephone: 020 7626 1500.

Authorised by the Prudential Regulation Authority and regulated by the Financial Conduct Authority and the Prudential Regulation Authority under registration number 119278.

We subscribe to the Lending Code; copies of the Code can be obtained from www.lendingstandardsboard.org.uk.

Eligible deposits with us are protected by the Financial Services Compensation Scheme (FSCS). We are covered by the Financial Ombudsman Service (FOS). Please note that due to FSCS and FOS eligibility criteria not all business customers will be covered.