Batch files
This method involves the use of a Bulk Balance Download file. Clients can upload these files to a designated <<glossary:SFTP>> folder. The PayScheduler system is then responsible for:
- Retrieving and processing these files.
- Updating the account balances as specified within the files.
- Issuing a balance update
<<glossary:FAST>>administrative message to confirm the successful processing of the balance file.- Issuing a feedback file for any balance update failures.
File format
When providing the balance update batch file for updating the mirrored balance on <<glossary:Banking.Live>> , a <<glossary:CSV>> format is used with data elements similar to those contained within the Update balance <<glossary:API>>. These are:
| Field | Description | Format | Example |
|---|---|---|---|
record_id | Unique record identifier generated by client, which must not be duplicated over time. | Alphanumeric (incl. -, _) Cannot contain spaces. (1-40 max.) | 1a94-3a862-bf4d-7f8c_69f |
account_id | Unique account identifier generated by <<glossary:Banking.Live>>. This is the ID of the account to be updated. | Integer (non-negative) | 909878090067 |
bill_ccy | The currency of the balance to be updated. ISO 4217 currency codes. | Integer (non-negative) | 826 |
act_balance | The actual balance of the account to be updated in cents. | Integer | 8000 |
blk_balance | The blocked amount of the acccount to be updated in cents. | Integer | 1800 |
token | Public token generated by <<glossary:Banking.Live>> to replace <<glossary:PAN>>. This is the token of the card to which the account to be updated relates to. | Integer (non-negative) | 976876879 |
IMPORTANTPlease make sure to provide only one of the following in a single balance file:
account_idOR
token
Example with account_id
account_idrecord_id,account_id,bill_ccy,act_balance,blk_balance,token
2a58261f-a7e0-4bc2-a21e-692309f8fe80,12345,826,5000,2000,
my_card_1234567890_balance,34567,826,6000,1800,
Example with token
tokenrecord_id,account_id,bill_ccy,act_balance,blk_balance,token
1abcde456-213ghfkk-hjf78g9,,826,5000,2000,54321
this_is_my_balance123456789,,826,6000,1800,76543
File limits
The maximum record limit for batch balance update files is 1,000,000 records per file.
<<glossary:Banking.Live>> will validate the number of records in each batch file recieved prior to processing. If 1,000,000 records per file is exceeded (i.e. 1,000,001) the file will be rejected and you will be notified via a <<glossary:FAST>> administrative message. Therefore, when you are needing to update more than 1,000,000 records you will need to submit more than one file.
You can read more on
<<glossary:FAST>>balance update administative messages here.
Naming convention
To ensure accurate processing of balance update files, you must follow the below file naming convention:
[RegionCode]_[ClientID]_[FileType]_[ProcessingDate]_[ProcessingTime]_[SequenceNumber].csv
| Field | Description | Format | Example |
|---|---|---|---|
| RegionCode | A two character alphabetic code representing the region. - AP (Asia Pacific) - EU (European Union) - NA (North America) - SA (South America) - AF (Africa) - AS (Asia) - OC (Oceania) - ME (Middle East) - LA (Latin America) - CA (Central America) - EE (Eastern Europe) - WE (Western Europe) - NE (Northern Europe) - SE (Southern Europe) - CB (Caribbean) | Alphabetic | EU |
| ClientID | Client ID allocated to any given client on <<glossary:Banking.Live>>. | Integer (non-negative) | 123456 |
| FileType | A fixed string value indicating the file type. For balance update files this will be BAL. | String (fixed) | BAL |
| ProcessingDate | The date the file is created by you. | Date: YYYYMMDD | 20240714 |
| ProcessingTime | The time the file is created by you. | Time: HHMMSS | 175229 |
| SequenceNumber* | A sequence number identifying the sequence in which the file should be processed. - Always start with 1 - Cannot be repeated for a particular day or batch - Increment by 1 for each subsequenct number. | Integer (non-negative) | 1 |
If a balance update file shares a name that has previously been used, the entire file will be logged as failed during processing.
Example of balance update files
Batch files for 4-JUN-2024:
EU_12345_BAL_20240604_114511_1.csv
EU_12345_BAL_20240604_114622_2.csv
EU_12345_BAL_20240604_114733_3.csv
EU_12345_BAL_20240604_114844_4.csv
Batch files for 5-JUN-2024:
EU_12345_BAL_20240605_104511_1.csv
EU_12345_BAL_20240605_104622_2.csv
EU_12345_BAL_20240605_104733_3.csv
EU_12345_BAL_20240605_104844_4.csv
In the event of a corrupted file, a new
SequenceNumbermust be used when transmitting the new file.
Feedback files
In the instance a balance update file fails, <<glossary:Banking.Live>> generates a detailed feedback file for each balance update record failure. This file includes the reasons for individual record failures for you to take appropriate action prior to submitting a new balance update file.
Feedback files are ONLY generated for balance update record failures. You will not receive a feedback file if the original balance update file was successful.
Feedback file FAST notificationIn the event of a feedback file being generated, you will be notified with a
<<glossary:FAST>>notification message. You can find details on this here.
File format
You can choose to opt-in to either <<glossary:CSV>> or <<glossary:TXT>> format feedback files.
The data provided in each format type includes:
<<glossary:CSV>> field | <<glossary:TXT>> field | Description | Format | Example |
|---|---|---|---|---|
record_id | Record ID | Unique record identifier generated by <<glossary:Banking.Live>>. | Alphanumeric | 4256c01b-2b25-4789-8aa5-18edf943aa40 |
status_code | Status Code | Indicates the processing status of the original balance update file. You can find the full list of codes here. | Integer (non-negative) | 26 |
status_description | Status Description | Describes the processing status of the original balance update file. You can find the full list of decriptions here . | Alphanumeric | Outdated Balance |
<<glossary:CSV>> example
<<glossary:CSV>> examplerecord_id,status_code,status_description
4256c01b-2b25-4789-8aa5-18edf943aa40,26,Outdated Balance
9997fb38-0234-468d-94dc-bd0e1b216979,26,Outdated Balance
375adc45-e152-435c-aa02-822dd4f01ffc,26,Outdated Balance
40798cf2-695e-4841-913f-97f9eac60db0,26,Outdated Balance
83b7ca19-3565-4387-b20e-33b174056837,26,Outdated Balance
16fcae58-d02f-4eed-bfe6-c1044e7913fa,30,Invalid account
ec8581e5-ecd3-4584-91db-8c4feeae18b0,33,Invalid currency code
25c4182e-cdb6-49bc-81ce-45219ceefd65,30,Invalid account
41ba3565-1d27-4e45-8d5e-2e850a1baf8c,30,Invalid account
d9811674-36b0-4203-b28a-57fb2ae82407,30,Invalid account
<<glossary:TXT>> example
<<glossary:TXT>> exampleProcessing Date/Time: 04-JUL-2024 22:00:00 PM
Feedback Date/Time:
File ID: EU_12345_BAL_20240604_114511_1.csv
File Type: BAL (Balance Update)
Total Records: 10000
Passed Records: 9900
Failed Records: 100
Record ID Status Code Status Description
4256c01b-2b25-4789-8aa5-18edf943aa40 26 Outdated Balance
9997fb38-0234-468d-94dc-bd0e1b216979 26 Outdated Balance
375adc45-e152-435c-aa02-822dd4f01ffc 26 Outdated Balance
40798cf2-695e-4841-913f-97f9eac60db0 26 Outdated Balance
83b7ca19-3565-4387-b20e-33b174056837 26 Outdated Balance
16fcae58-d02f-4eed-bfe6-c1044e7913fa 30 Invalid account
ec8581e5-ecd3-4584-91db-8c4feeae18b0 33 Invalid currency code
25c4182e-cdb6-49bc-81ce-45219ceefd65 30 Invalid account
41ba3565-1d27-4e45-8d5e-2e850a1baf8c 30 Invalid account
d9811674-36b0-4203-b28a-57fb2ae82407 30 Invalid account
Naming convention
The feedback filename will include the original file name followed by the keyword _FEEDBACK. For example:
- EU_123456_BAL_20240818_134515_2_FEEDBACK.csv
or
- EU_123456_BAL_20240818_134515_2_FEEDBACK.txt
File delivery method
Feedback files are delivered to your configured <<glossary:SFTP>> server location.
Batch file processing notifications
Balance update <<glossary:FAST>> adminstrative messages are sent to you when you upload a balance update batch file.
The balance update <<glossary:FAST>> administrative messages are currently running v1.0 and v2.0.
All new clients will be onboarded to v2.0.
These messages advise you if the balance update file submitted was successful, partially successful or failed and includes the number of passed and failed records.
In the event a balance update file was not successful, a <<glossary:FAST>> balance update feedback file notification is sent to you.
v1.0 (no longer offered)
Below is the basic message structure and JSON schema of v1.0 messages, they are consistent across the message triggers and are in the form of an envelope message.
Click here to view the v1.0 basic message structure
"MESSAGE_TYPE" | Field name | Description |
|---|---|---|
"Message_Type" | Type of message. For balance update file message notifications this will be "0600" | |
"Message_Desc" | Description of the message type. For balance update file message notifications this will be "Administrative Message" |
"SUMMARY" | Field name | Description | Format |
|---|---|---|---|
"Client_Id" | Client ID allocated to any given client on <<glossary:Banking.Live>>. | Integer (non-negative) | |
"Job_Id" | Job ID associated with the processing task. | Integer (non-negative) | |
"File_Name" | Name of the file the adminstrative message is referencing. You can refer to the file naming convention here. | Alphanumeric (incl. _) | |
"File_Date_Time" | Timestamp indicating when the file was processed by <<glossary:Banking.Live>>. | Date: DD-MM-YYYY HH:MM:SS | |
"Processing_Time_Secs" | Time in seconds indicating the total time it took <<glossary:Banking.Live>> to process the file. | Numeric (decimal) | |
"Total_Records" | Indicates the total number of records present in the original balance update file. | Integer (non-negative) | |
"Passed_Records" | Indicates the number of records in the original balance update file that were processed successfully. | Integer (non-negative) | |
"Failed_Records" | Indicates the number of records in the original balance update file that failed to be processed. | Integer (non-negative) | |
"Status" | Indicates the processing status of the original balance update file. Possible values include: "Success", "Partial Success", "Failure". | Alphabetic | |
"Details" | Lists the accounts/tokens that failed along with the failure reason. The list of accounts/tokens are separated by a semicolon (;). For example: "Account: 123456789, Reason: Account does not exist; Account: 909090874, Reason: Account does not exist" | Alphanumeric (incl. : and ;) |
Click here to view the v1.0 message JSON schema
{
"MESSAGE_TYPE": {
"Message_Type": "0600",
"Message_Desc": "Administrative Message"
},
"SUMMARY": {
"Client_Id": "",
"Job_Id": "",
"File_Name": "",
"File_Date_Time": "",
"Processing_Time_Secs": "",
"Total_Records": "",
"Passed_Records": "",
"Failed_Records": "",
"Status": "",
"Details": ""
}
}v2.0
Notable differencesBelow are the notable differences between v1.0 and v2.0:
Message structure changes:
- Removal of
"Status"field- Removal of
"Details"field- Addition of a new field
"Status_Code"- Addition of a new field
"Status_Description"- Addition of a new field
"Feedback_File_Name"Message logic changes:
- v2.0 no longer provides the list of accounts/tokens that failed along with the failure reason. Instead a feedback file is generated and sent to you via
<<glossary:SFTP>>with the list of failures along with the failure reason. The name of this feedback file is provided in the"Feedback_File_Name"field.
Below is the basic message structure and JSON schema of v2.0 messages, they are consistent across the message triggers and are in the form of an envelope message.
v2.0 basic message structure
"MESSAGE_TYPE" | Field name | Description |
|---|---|---|
"Message_Type" | Type of message. For balance update file message notifications this will be "0600" | |
"Message_Desc" | Description of the message type. For balance update file message notifications this will be "Administrative Message" |
"SUMMARY" | Field name | Description | Format |
|---|---|---|---|
"Client_Id" | Client ID allocated to any given client on <<glossary:Banking.Live>>. | Integer (non-negative) | |
"Job_Id" | Job ID associated with the processing task. | Integer (non-negative) | |
"File_Name" | Name of the file the adminstrative message is referencing. You can refer to the file naming convention here. | Alphanumeric (incl. _) | |
"File_Date_Time" | Timestamp indicating when the file was processed by <<glossary:Banking.Live>>. | Date: DD-MM-YYYY HH:MM:SS | |
"Feedback_File_Name" | Name of the balance update feedback file. It includes the original file name followed by the keyword _FEEDBACK. For example: EU_12345_BAL_20240604_114511_1_FEEDBACK.csv | Alphanumeric (incl. _) | |
"Processing_Time_Secs" | Time in seconds indicating the total time it took <<glossary:Banking.Live>> to process the file. | Numeric (decimal) | |
"Total_Records" | Indicates the total number of records present in the original balance update file. | Integer (non-negative) | |
"Passed_Records" | Indicates the number of records in the original balance update file that were processed successfully. | Integer (non-negative) | |
"Failed_Records" | Indicates the number of records in the original balance update file that failed to be processed. | Integer (non-negative) | |
"Status_Code" | Indicates the processing status of the original balance update file. You can find the full list of codes here. | Integer (non-negative) | |
"Status_Description" | Describes the processing status of the original balance update file. You can find the full list of decriptions here. | Alphanumeric |
v2.0 JSON schema
{
"MESSAGE_TYPE": {
"Message_Type": "0600",
"Message_Desc": "Administrative Message"
},
"SUMMARY": {
"Client_Id": "",
"Job_Id": "",
"File_Name": "",
"File_Date_Time": "",
"Feedback_File_Name": "",
"Processing_Time_Secs": "",
"Total_Records": "",
"Passed_Records": "",
"Failed_Records": "",
"Status_Code": "",
"Status_Description": ""
}
}Status codes and descriptions
| Status Code | Status Description | Explanation |
|---|---|---|
| General | ||
| 0 | Success | All records processed successfully |
| 1 | Failure | All records failed to process |
| 2 | Partial success | Some records processed successfully, while others failed |
| Status Codes for File Name Convention Validation | ||
| 10 | Unexpected fields encountered in filename | When the balance update file contains additional fields |
| 11 | Duplicate filename | When the system receives duplicate filename |
| 12 | Missing region code | When the balance update file doesn't contain the region |
| 13 | Invalid region code | When the balance update file doesn't contain a valid region code |
| 14 | Missing client ID | When the balance update file doesn't contain the client ID |
| 15 | Invalid client ID | When the balance update file doesn't contain a valid client ID |
| 16 | Missing file type | When the balance update file doesn't contain the file type |
| 17 | Invalid file type | When the balance update file doesn;t contain the valid file type |
| 18 | Missing date | When the balance update file doesn't contain the date |
| 19 | Invalid date | When the balance update file doesn't contain avalid date according to the expected format (YYYYMMDD) |
| 20 | Missing time | When the balance update file doesn't contain the time |
| 21 | Invalid time | When the balance update file doesn't contain a valid time according to the format |
| 22 | Missing sequence number | When the balance update file doesn't contain the sequence number |
| 23 | Invalid sequence number | When the balance update file doesn't follow the sequential order of sequence number or contains anything else than a positive integer |
| 24 | Duplicate sequence number | When the batch of balance update files contains a duplicate sequence number that has been used in that days batch already |
| Status Codes for Max Record Limits | ||
| 25 | Max records limit reached | When the balance update file contains more than 1,000,000 records |
| Status Codes for Outdated Balance Checking | ||
| 26 | Outdated balance update skipped | When the system identifies that the balance update in the file has become outdated |
| Status Codes for Record ID Validation | ||
| 27 | Duplicate record ID | When the provided record ID is not unique and has been used in the past |
| 28 | Missing record ID | When the record ID is not provided or empty |
| 29 | Invalid record ID | When the record ID provided is not according to the specifications |
| Status Codes for Internal Existing Validations | ||
| 30 | Invalid account ID | |
| 31 | Invalid token | |
| 32 | Missing currency | |
| 33 | Invalid currency | |
| 34 | Both account ID and token missing | |
| 35 | Both account ID and token present | |
| 36 | Missing actual balance | |
| 37 | Missing block balance | |
| 38 | Invalid actual balance | |
| 39 | Invalid block balance | |
| 40 | Multiple accounts with same currency | |
| 41 | Account and bill ccy mismatch | |
| 42 | Balance conversion failure | |
| 50 | Unexpected failure |
You can view sample balance update administrative messages here.
Best practicesFor more information on how to best use the balance update batch files for balance listing, you can refer to our Balance listing - Best practices.
Updated 7 months ago
