Links
🆕

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.
post
{{environmentUrl}}/{{tenantId}}/api/v1.1/bank-accounts/:bank_account_id/upload-bankstatement
Upload Bankstatement V1.1

Custom Bank Statement Validations

As part of bank statement upload V1.1, there are optional validations performed upon statement upload.
Account Holder Validation
Account Number Validation
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
// ```postman_json
[
{
"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."
}
}
]
```
The account number validation will perform a comparison between the account number details captured in POST Create New Bank Account and the Customers account number on the bank statement uploaded.
422 - Unprocessable Entity
// ```postman_json
[
{
"code": "failed_validation",
"message": "There was an error validating the bank statement",
"data": {
"error": "The bank statement account number does not match customer details. Please check if the correct bank statement, and customer details have been provided."
}
}
]
```

Webhook Requirements | statement_result_url

As this is a specific post query, we need to make sure we are sending customer/clients to a safe destination, as such, there is validation done on the Redirect and Result URL.
The Filed under validation must have a valid A or AAAA record when querying the dns_get_record PHP function.
A a simple guideline:
  • Must be RFC compliant
  • Must include the hostname
  • Be careful with special characters that might mess with the structure of the post request

Webhook Response

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

```postman_json
{
"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

```postman_json
{
"data": {
"bank": "standard-bank",
"session": "tG4536",
"success": false,
"code": "statement-failed",
"tenant": "{{tenantid}}",
"message": "Failure”,
"bank_account_id": "{{bankaccountid}}
}
}
```
Last modified 3mo ago