EN Reconciliation 020823 081806

Download as pdf or txt
Download as pdf or txt
You are on page 1of 3

Reconciliation

Register Reconciliation
To register reconciliation, you need to have link id (account linking) that you can get from statement retrieval, pass remember_me with true
value as part of your statement retrieval then you will get link_id as part of the response payload.

After than you can register your reconciliation using following curl

1 curl --location --request POST 'https://statement.bnk.to/v1/reconciliation' \


2 --header 'Content-Type: application/json' \
3 --header 'x-api-key: {{YOUR_API_KEY}}' \
4 --data-raw '{
5 "link_id": "7c49b74c-31be-4eb8-bc21-0b202f993960",
6 "schedule": {
7 "duration": 15,
8 "unit": "HOUR"
9 },
10 "bank_code": "DUMMY_BANK_PERSONAL",
11 "enable": true
12 }
13 '

Parameters:

1. link_id: link_id is a unique hash that you get from account linking feature

2. schedule: time interval duration on when you want you reconciliation to be run
- duration: is a scalar of duration, minumun is 15 (minutes)
- unit: is a unit time, supported unit right now is MINUTE, HOUR, DAY
3. bank_code: bank code, should match with your link_id
4. enable: this parameter indicates enable/disable, for registering put it as true

Update Reconciliation
You can update your registered reconciliation using this curl

1 curl --location --request POST 'https://statement.bnk.to/v1/reconciliation' \


2 --header 'Content-Type: application/json' \
3 --header 'x-api-key: {{YOUR_API_KEY}}' \
4 --data-raw '{
5 "reconciliation_id": "c2e478f0-9632-11ed-9ee0-0242ac110002",
6 "schedule": {
7 "duration": 15,
8 "unit": "MINUTE"
9 }
10 }
11
12 '

Please note that you can only update schedule (duration and unit) and wont be able to update link_id and bank_code . You need to pass
your reconciliation_id for this. After you update your reconciliation, the next cycle will be following your update time and not create
time. For example if you update your reconciliation to have duration 15 and unit MINUTE at 14:40 your local time, next retrieval will happen
at 14:55.
Disable Reconciliation
Reconciliation can be disabled. Use this following curl to disable

1 curl --location --request POST 'https://statement.bnk.to/v1/reconciliation' \


2 --header 'Content-Type: application/json' \
3 --header 'x-api-key: {{YOUR_API_KEY}}' \
4 --data-raw '{
5 "reconciliation_id": "c2e478f0-9632-11ed-9ee0-0242ac110002",
6 "enable": false
7 }
8 '

You only need to pass your reconciliation_id and set enable to false.

To enable it again you just need to change enable to true

1 curl --location --request POST 'https://statement.bnk.to/v1/reconciliation' \


2 --header 'Content-Type: application/json' \
3 --header 'x-api-key: {{YOUR_API_KEY}}' \
4 --data-raw '{
5 "reconciliation_id": "c2e478f0-9632-11ed-9ee0-0242ac110002",
6 "enable": true
7 }
8 '

Get Reconciliations
To see all registered reconciliation regardless enable/disable, use the following curl

1 curl --location --request GET 'https://statement.bnk.to/v1/reconciliations' \


2 --header 'Content-Type: application/json' \
3 --header 'x-api-key: {{YOUR_API_KEY}}' \
4 --data-raw '
5 '

You will get response of your reconciliations list like this:

1 {
2 "reconciliations": [
3 {
4 "reconciliation_id": "c2e478f0-9632-11ed-9ee0-0242ac110002",
5 "org_id": "00000000-0000-0000-0000-000000000000",
6 "link_id": "7c49b74c-31be-4eb8-bc21-0b202f993960",
7 "bank_code": "DUMMY_BANK_PERSONAL",
8 "schedule": {
9 "duration": 7,
10 "unit": "DAY"
11 },
12 "created_at": "2023-01-17T06:47:08Z",
13 "updated_at": "2023-01-19T05:53:39Z"
14 }
15 ]
16 }

For reconciliation you will get 1 statement id (first statement id) and you can use that forthward. whenever there is new transactions we will
merged that new transactions to the first statement id.
Notification
you will get notification on

1. First retrieval completed with status RECONCILIATION_COMPLETED


2. Whenever there’s new transaction with status RECONCILIATION_NEW_TRANSACTION
3. Reconciliation disabled bcs of linking issue RECONCILIATION_DISABLED

Grafana Panel
Check

Staging https://metrics-staging.asia-southeast1.bnk.to/d/n6NAIMTVk/reconciliation
Production (coming soon)

To look at the reconciliaiton and reconciliation history (you need to fill in reconciliation id).

You might also like