Before You Start
You need:- an SFTP connection with the
bank-reports/folder (see SFTP Setup) - storage of your own for copies of each file
- a record of the files you’ve processed, keyed by full file name
Pick Up New Files
- List
bank-reports/core-balance/andbank-reports/core-transaction/. - Keep only file names that match the full pattern, for example
DATE_core-balance_EPOCH_MS.csv. Skip any file that does not match. - Skip any file name already in your record of processed files.
- Copy each new file to your own storage. Files stay on SFTP for 180 days.
- Read each file and load it, as described in the next sections.
- Add the full file name to your record of processed files.
DATE and EPOCH_MS from the file name. Do not use the file’s modified time on SFTP.
Read the Columns
You must map columns by the header row, not by position. Lead can add a column without notice. Ignore columns you do not recognize, and do not depend on how many columns a file has. Lead can also add a value to a column with a fixed list of values, such as a newtype. Route a value you do not recognize to a default or flag it for review. Your integration must not reject a file because of an unrecognized value.
Check the Files Against Each Other
For each Core Balance, the change inposted_balance from one bank day to the next equals the sum of amount in the next day’s Core Transaction file for that core_balance_id.
For example, if a balance ends January 18 at 500000 and ends January 19 at 647500, the January 19 Core Transaction file has rows for that balance that add up to 147500.
If the two do not agree, check that you loaded the file with the highest EPOCH_MS for both reports. If they still do not agree, contact your Technical Account Manager (TAM).
Look Up a Row in the API
Every row carries the ID of the matching record in the API:- Look up
core_balance_idwith the Core Balances API to get holds, the available balance, and the current posted balance. - Look up
core_transaction_idwith the Core Transactions API to get the full transaction. - Some
typevalues, such asach, have a matching payment record. The type enum lists the object for each value.
Differences From the V1 Reports
While Lead delivers both the V1 and V2 reports, the same day can look different in each:- Cutoff: V2 closes each bank day at a fixed cutoff. A transaction near the end of the day can be in a different day’s file in V1 and V2.
- Interest: Interest that posts shortly after midnight is in the next bank day’s V2 file.
- Weekends and holidays: V1 has no file on weekends or bank holidays. That activity is in the next business day’s file. V2 has a file for every calendar day.
- Online banking: Online banking shows the live ledger, so its balances can differ from the V2 file at the cutoff.
If a File Is Replaced or Missing
If Lead needs to fix a file it already delivered, it sends a replacement: a new file for the same report andDATE with a higher EPOCH_MS. You pick it up like any other new file, because you track files by full name. Delete the rows you loaded for that report and DATE, then load the replacement. You must not merge the two files.
If a DATE is missing from your record of processed files, contact your TAM. A bank day with no transactions still gets a file with only the header row, so a missing file is not an empty day.
