# Account Statements
source: https://developer.mastercard.com/open-finance-us/documentation/products/manage/account-statements/index.md

The Account Statements service retrieves a customer's Financial Institution (FI) statements. These statements contain transaction summaries, balances, and additional details available in PDF format.

The information retrieved depends on what is made available by the FI.

Some FIs provide consolidated statements, where details for multiple accounts will be returned in the same document if the customer has more than one account with the FI.

There are two ways to retrieve statements:

By customer and account ID:
:
    * Use the [Get Customer Account Statement](https://developer.mastercard.com/open-finance-us/documentation/api-reference/index.md#GetCustomerAccountStatement) endpoint to retrieve a statement by customer ID and account ID.

By asset ID (beta - limited FI support):
:
    * Use the [Get Customer Account Multiple Statement Details](/documentation/api-reference/##GetCustomerAccountMultipleStatement) endpoint to retrieve a list of available statements for a customer, identified by asset IDs. Then use an asset ID with the [Get Asset by Customer and ID](https://developer.mastercard.com/open-finance-us/documentation/api-reference/index.md#GetAssetByCustomerID) endpoint to retrieve a statement in PDF format.

Note: Retrieving statements is a billable service, where a charge is incurred for each successfully retrieved statement PDF.

You can retrieve the list of available statements and their corresponding asset IDs without incurring any charge. A charge is only made when you successfully download a PDF statement.
Tip: To retrieve a statement successfully, verify the account has aggregation status 0 before initiating statement retrieval. If the account has any other aggregation status code, the request will fail.

## Use Cases {#use-cases}

* **Accounting** - To ensure the accuracy of accounts for reporting.
* **Pre-lending underwriting** - Ensures lenders have an accurate view of a borrower's profile to ensure a high chance of success with an underwriter.

## How It Works {#how-it-works}

This section explains how to retrieve statements using the **Get Customer Account Statement** endpoint.

1. Generate the required credentials to call the API. See [Generate Your Credentials](https://developer.mastercard.com/open-finance-us/documentation/quick-start-guide/index.md#generate-your-credentials).
2. Generate an Access Token. See [Create Access Token](https://developer.mastercard.com/open-finance-us/documentation/quick-start-guide/index.md#step-1---create-access-token).
3. Create a customer and link them to at least one account with Data Connect. See [Welcome Your First Customer](https://developer.mastercard.com/open-finance-us/documentation/quick-start-guide/index.md#welcome-your-first-customer).
   * You can use any of the test [Bank Account Profiles](https://developer.mastercard.com/open-finance-us/documentation/test-the-apis/index.md#bank-account-profiles) that is listed as supporting `state_agg` to create a test customer with multiple available statements - for example, **profile_08**.
   * Note the `id` of the customer - this is the `customerId` you will use below.
4. You can use the [Get Certified Institutions](https://developer.mastercard.com/open-finance-us/documentation/api-reference/index.md#GetCertifiedInstitutions) endpoint to check if the FI supports retrieving statements using an FI name for the `search` parameter (for example, "finbank" for the test FI in Sandbox) and `stateAgg` as the `type` parameter. If retrieving statements is supported, the response will have a `stateAgg` value of `true`.
5. Call [Refresh Customer Accounts](https://developer.mastercard.com/open-finance-us/documentation/api-reference/index.md#refresh-customer-accounts) with the `customerId` to perform an initial aggregation and see a list of their accounts.
   * This returns the `aggregationStatusCode` of the accounts which must be `0` to retrieve a statement.
   * Note the `id` of a valid account - this is the `accountId` you will use in the next step.
6. Call [Get Customer Account Statement](https://developer.mastercard.com/open-finance-us/documentation/api-reference/index.md#GetCustomerAccountStatement) with the `customerId` and `accountId`.
   * Using the `index` parameter you can request older statements: an `index` value of `1` returns the most recent statement, `2` returns the statement from the previous month and so on. The maximum supported value is `24`.
   * The recommended timeout period for requesting statements is 180 seconds.
7. The requested statement is returned as a PDF.
   * Note that successful calls to this endpoint are billable in production.

Diagram statements

## APIs {#apis}

Warning: All the endpoints below can return HTTP status code 203 when the response contains an MFA challenge question in JSON format. For most use cases, you should treat this as a failure.

### Retrieve Statements by Customer and Account ID {#retrieve-statements-by-customer-and-account-id}

This is the recommended method to retrieve statements using a customer ID and account ID.

Successful calls to this endpoint are billable.

API Reference: `GET /aggregation/v1/customers/{customerId}/accounts/{accountId}/statement`

<br />

### Retrieve Statements by Asset ID (beta) {#retrieve-statements-by-asset-id-beta}

Warning: This method currently supports a limited range of FIs compared to the **Get Customer Account Statement** endpoint above. Even if **Get Certified Institutions** reports that retrieving statements is supported for an FI, the **Get Customer Account Multiple Statement Details** endpoint may not provide statements. In this case, you will receive a 500 error. We are currently working to expand the range of supported institutions.

Call the following endpoint to obtain details of the available statements (including the dates they cover) and asset IDs for the statement PDFs you can download. Calls to this endpoint are free of charge.

API Reference: `GET /aggregation/v3/customers/{customerId}/accounts/{accountId}/statement`

Once you have obtained the ID of a statement you want to fetch, call the following endpoint (passing the relevant asset ID) to download the PDF asset required. Successful calls to this endpoint are billable.

API Reference: `GET /aggregation/v1/customers/{customerId}/assets/{assetId}`

<br />

