⚡Bank Statement Upload V1.1
The new endpoint for uploading Bank Statements does validation on the upload request and does verification and storing of transactions as a background job once the statement_result_url added.
In Bank Statement Upload V1.1 has moved the transactional processing and storing of statements to become an asynchronous job. This means within the upload call, the validation checks are performed and the transactional processing is completed as a background task. Therefore you are only able to upload a maximum of six statements at a time.
Upload Bankstatement V1.1
POST
{{environmentUrl}}/{{tenantId}}/api/v1.1/bank-accounts/:bank_account_id/upload-bankstatement
POST
{{environmentUrl}}/{{tenantId}}/api/v1.1/bank-accounts/:bank_account_id/upload-bankstatement
Path Parameters
bankAccountId*
String
The UUID for a Bank Account that gets generated and returned in the POST Create new Bank Account response. It ensures that the transactional data and statements retrieved in the online login session are saved to the correct Bank Account.
Request Body
The bank statement/s MUST be in PDF format!
statements[]*
form-data
Select the file/s you would like to upload. The file/files needs to be a valid bank PDF statement that the customer has downloaded from their internet banking. See here for more information on the types of statements that can be uploaded.
There is a maximum of 6 bank statements that can be uploaded in one API call.
statement_result_url*
String
Add a value for this parameter to send the outcome of the statement processing.
i.e. the URL to which you would like to receive the results of the successful, transaction processing.
You can save the value in the environment variable {{StatementResultURL}}.
category_engine
String
To enable refined transaction categorisation you will need to set the category_engine
to
x-finch
. For more information refer to the Transaction Categorisation page.
return_accuracy
Boolean
Set this to true
in order to get the accuracy_metrics
object for Scanned Statements. The accuracy_metrics
object will be returned in the Return All Statements of a BankAccount endpoint.
Status Codes
Custom Bank Statement Validations
As part of bank statement upload V1.1, there are optional validations performed upon statement upload.
The account holder validation will perform a comparison between the Customers details captured in POST Create New Customer and the Customers details on the bank statement uploaded.
422 - Unprocessable Entity
[
{
"code": "failed_validation",
"message": "There was an error validating the bank statement",
"data": {
"error": "The bank statement account holder does not match customer details. Please check if the correct bank statement, and customer details have been provided."
}
}
]
Webhook Requirements | statement_result_url
statement_result_url
The following is the payload that gets sent to the url that is provided in the statement_result_url
parameter in the POST Upload Bankstatement v1.1 request.
The webhook gets triggered once the processing of the transactions in the statement(s) is successful. Once you receive this successful payload, you can query any of the /transactions
, /statements
, /accounts
and /transaction-reports
endpoints to retrieve the affordability data you require.
Statement Upload V1.1 – Statement Success
{
"data": {
"bank": "standard-bank",
"session": "tG4536",
"success": true,
"code": "statement-success",
"tenant": "{{tenantid}}",
"message": "Success”,
"bank_account_id": "{{bankaccountid}}”
}
}
Statement Upload V1.1 – Statement Failure
{
"data": {
"bank": "standard-bank",
"session": "tG4536",
"success": false,
"code": "statement-failed",
"tenant": "{{tenantid}}",
"message": "Failure”,
"bank_account_id": "{{bankaccountid}}”
}
}
Last updated