> ## Documentation Index
> Fetch the complete documentation index at: https://docs.flinks.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Bank Statements

> Retrieve original bank-issued PDF statements from Canadian financial institutions using Flinks.

Flinks can retrieve original bank-issued PDF statements directly from supported Canadian financial institutions.

<Note>
  This feature is only available for clients based in Canada. Contact your Flinks Representative to enable it for your instance.
</Note>

## Enabling statement retrieval

To enable statement retrieval, add the following parameters to your Flinks Connect iframe URL:

| Parameter                   | Type    | Default   | Description                                                          |
| :-------------------------- | :------ | :-------- | :------------------------------------------------------------------- |
| `detailsAndStatementEnable` | boolean | `false`   | Enables PDF statement extraction alongside account data              |
| `monthsOfStatements`        | string  | `Months3` | Number of months to retrieve: `MostRecent`, `Months3`, or `Months12` |

Example iframe URL with statements enabled:

```
https://{instance}-iframe.private.fin.ag/?detailsAndStatementEnable=true&monthsOfStatements=Months12&...
```

## Retrieving statements via API

After enabling statements in the iframe, retrieve them using the [/GetStatements](/api/connect/endpoints/account-linking/get-statements) endpoint.

### Step 1: Authorize

Call `/Authorize` with the customer's `loginId` to get a `requestId`:

```bash theme={null}
curl -X POST \
  https://{instance}-api.private.fin.ag/v3/{customerId}/BankingServices/Authorize \
  -H 'Content-Type: application/json' \
  -d '{
    "LoginId": "{loginId}",
    "MostRecentCached": true
  }'
```

### Step 2: Request statements

Call `/GetStatements` with the `requestId`:

```bash theme={null}
curl -X POST \
  https://{instance}-api.private.fin.ag/v3/{customerId}/BankingServices/GetStatements \
  -H 'Content-Type: application/json' \
  -d '{
    "RequestId": "{requestId}"
  }'
```

### Step 3: Decode the response

The API returns statements as Base64-encoded strings. Decode each string to produce the original PDF file:

```python theme={null}
import base64

# statement_base64 is the Base64 string from the API response
pdf_bytes = base64.b64decode(statement_base64)

with open("statement.pdf", "wb") as f:
    f.write(pdf_bytes)
```

## Retrieving statements via Dashboard

If you have Dashboard access, you can download statements directly:

1. Open a request from the [Request Feed](/guides/dashboard/request-feed).
2. Navigate to the account details.
3. Click **Download Statement** to save the PDF.

<Note>
  For BMO accounts, statements are provided in CSV format rather than PDF.
</Note>
