Skip to main content
Bank Statements API
Updated over 11 months ago

Veryfi Bank Statements API Guide

Please check Veryfi API Docs for more details.

Read more about Data Extraction from Bank Statements in our Blog


Veryfi's Process a Bank Statement endpoint allows you to submit and extract data from unstructured documents such as Bank Statements and turn them into valuable business insights.

Protocols

TLS only All requests are done over TLS v1.2. TLS uses stronger encryption algorithms and has the ability to work on different ports. Both SSL 2.0 and 3.0 have been deprecated by the IETF (in 2011 and 2015, respectively). Ref: https://www.globalsign.com/en/blog/ssl-vs-tls-difference/

UTF-8 encoding

Every string passed to and from the API needs to be UTF-8 encoded. For maximum compatibility, normalize to Unicode Normalization Form C (NFC) before UTF-8 encoding.

Date formats

All dates in the API are strings in the following format: "YYYY-MM-DD"

Error handling

Errors are returned using standard HTTP error cod

Standard API errors

Standard API success codes

file_data

string

The least effective way to submit files. Base64 encoded string, could be raw or data URL https://en.wikipedia.org/wiki/Data_URI_scheme E.g. 'data:application/zip;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVQYV2NgYAAAAAMAAWgmWQ0AAAAASUVORK5CYII='

file_url

string

file_urls

array

package_path

string

A path to file in S3 bucket, e.g. 'some/receipt.jpg

bucket

string

An S3 bucket for 'package_path', e.g. 'documents'

file_name

string

Optional filename helps to determine file type

file

string($binary)

Binary file. Submitting a zipped document through this parameter is the fastest way.

boolean

A field used to determine whether or not to return bounding_box for extracted fields in the Document response.

boolean

A field used to determine whether or not to return the score and ocr_score fields in the Document response.

Environment Keys

ENVIRONMENT_URL: devapi.veryfi.com
CLIENT_ID: <your Client Id from app.veryfi.com>
username: <your username from app.veryfi.com>
api_key: <your api_key from app.veryfi.com>

API Authorization Headers & URLs

All Requests should have authentication headers.

Authenticated User Header

AUTHORIZATION: "apikey <username>:<api_key>"

*Use a generated username & access token from the Veryfi API

Client Header

All Requests should also have a client header. Client ID identifies which client is making

requests to API (each app has its own CLIENT ID)

CLIENT-ID: "CLIENT_ID"

*CLIENT-ID Secret: <will be emailed when ready to move to production>

*Client Signature algorithm will also be provided for production

Environment URL

This is the URL of the environment to which you have been given access.

ENVIRONMENT_URL : "https://devapi.veryfi.com/

Processing Bank Statements

Method: POST multipart/form-data upload

https://ENVIRONMENT_URL/devapi/v8/partner/bank-statements

Method: POST

Parameters:

File Formats

.jpeg,.jpg,.pdf,.heif,.png,.zip,.heic,.webp. Max file size is 20mb.

curl
-H "Content-Type: multipart/form-data" \
-H "Accept: application/json" \
-H "CLIENT-ID: CLIENT_ID" \
-H "AUTHORIZATION: apikey USERNAME:API_KEY" \
-X POST \
-F 'file=@/Users/admin/tmp/bankstatement.pdf' \
-F 'file_name=bankstatement.pdf' \
ENVIRONMENT_URL/devapi/v8/partner/bank-statements/

Method: POST Base64 encoded file

https://ENVIRONMENT_URL/devapi/v8/partner/bank-statements

Method: POST

Parameters:

Method: POST URLs

https://ENVIRONMENT_URL/devapi/v8/partner/bank-statements

Method: POST

Parameters:

curl
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "CLIENT-ID: CLIENT_ID" \
-H "AUTHORIZATION: apikey USERNAME:API_KEY" \
-X POST \
-d '{"file_name": "example.jpg", "file_url":
"https://example.com/images/bankstatement.pdf"}' \
ENVIRONMENT_URL/devapi/v8/partner/bank_statements/

Successful Response

Sample of JSON for Processed BANK_STATEMENT response
{
"pdf_url": "https://example.com/bank_statement.pdf",
"account_holder_address": "Suite 24, 95 Mortimer Street, London",
"account_holder_name": "Company XYZ",
"account_number": "12345678",
"account_type": "Business Account",
"bank_address": "117 Example Road, Example City, EC1A 1BB",
"bank_name": "Example Bank",
"bank_website": "www.examplebank.com",
"beginning_balance": 1500.00,
"currency_code": "GBP",
"due_date": null,
"ending_balance": 650.00,
"id": 12345,
"minimum_due": null,
"period_end_date": "2023-07-31",
"period_start_date": null,
"routing_number": "12-34-56",
"statement_date": "2023-08-01",
"statement_number": "123",
"transactions": [
{
"date": "2023-07-15 12:00:00",
"text": "15 Jul 23\tBALANCE BROUGHT FORWARD\t\t\t\t\t\t\t1500.00",
"balance": 1500.00,
"description": "BALANCE BROUGHT FORWARD"
},
{
"date": "2023-07-16 12:00:00",
"text": "16 Jul 23\tDD\tPURCHASE\t\t\t\t50.00\t\t\t1450.00",
"balance": 1450.00,
"description": "Purchase",
"debit_amount": 50.00
},
{
"date": "2023-07-17 12:00:00",
"text": "17 Jul 23\tCR\tDEPOSIT\t\t\t\t\t\t1800.00",
"balance": 3250.00,
"description": "Deposit",
"credit_amount": 1800.00
},
{
"text": "Withdrawal\t\t\t\t\t40.00\t\t\t3210.00",
"balance": 3210.00,
"description": "Withdrawal",
"debit_amount": 40.00
},
{
"text": "Transaction Fee\t\t\t\t\t2.50\t\t\t3182.50",
"balance": 3182.50,
"description": "Transaction Fee",
"debit_amount": 2.50
},
{
"date": "2023-07-20 12:00:00",
"text": "20 Jul 23\tBP\tSHOPPING\t\t\t\t70.00",
"balance": 3112.50,
"description": "Shopping",
"debit_amount": 70.00
},
{
"date": "2023-07-22 12:00:00",
"text": "22 Jul 23\tDD\tBILL PAYMENT\t\t\t\t\t30.00",
"balance": 3082.50,
"description": "Bill Payment",
"debit_amount": 30.00
},
{
"text": "GAS STATION\t\t\t\t\t45.00\t\t\t3037.50",
"balance": 3037.50,
"description": "Gas Station",
"debit_amount": 45.00
},
{
"date": "2023-07-25 12:00:00",
"text": "25 Jul 23\tCR\tREFUND\t\t\t\t\t\t150.00",
"balance": 3187.50,
"description": "Refund",
"credit_amount": 150.00
},
{
"date": "2023-07-29 12:00:00",
"text": "29 Jul 23\tDD\tELECTRIC BILL\t\t\t\t\t80.00",
"balance": 3107.50,
"description": "Electric Bill",
"debit_amount": 80.00
},
{
"date": "2023-07-31 12:00:00",
"text": "31 Jul 23\tBALANCE CARRIED FORWARD\t\t\t\t\t\t\t3107.50",
"balance": 3107.50,
"description": "BALANCE CARRIED FORWARD"
}
]
}

For questions & suggestions related to this API please email support@veryfi.com

Did this answer your question?