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

# Testing Your Setup

MX provides a test institution in our development environment called MX Bank (institution code: `mxbank`) to test different aggregation responses. Creating a test member with this institution allows you to use custom credentials to mimic various aggregation workflows.

For example, you can use MX bank to test a complicated flow such as aggregation with MFA:

1. Aggregate the test member (or create a new test member)
2. Poll the member's connection status.
   * With MX Bank, this will return with a `challenges` object.
3. Answer the challenge using the *resume aggregation* endpoint
   * On MX Bank, responding with `"value": "challenge"` will answer the first question correctly and trigger a follow-up challenge.
4. Poll the status again.
   * This will return another `challenges` object.
5. Answer the second challenge.
   * On MX Bank, answering with `"value": "correct"` will result in a successful aggregation.
6. Poll the status until an end state is reached.

MX also provides dozens of [test endpoints](#test_endpoints) to mimic the behavior of other Atrium features and workflows.

## Test credentials for MX Bank

The test credentials for different situations are as follows:

| Username      | Password       | Description                                                                                                          |
| ------------- | -------------- | -------------------------------------------------------------------------------------------------------------------- |
| `test_atrium` | `password`     | This mimics successful aggregation with no MFA.                                                                      |
| `test_atrium` | `challenge`    | This mimics a text-based MFA challenge. Answer with the word `correct` to successfully progress through MFA.         |
| `test_atrium` | `options`      | This mimics the "option list" type of MFA challenge. Select "correct" to successfully progress through MFA.          |
| `test_atrium` | `image`        | This mimics the image type of MFA challenge. Answer with the word "correct" to successfully progress through MFA.    |
| `test_atrium` | `BAD_REQUEST`  | This mimics not having a username and password on the `member`. The `member` status will go to `HALTED`.             |
| `test_atrium` | `UNAUTHORIZED` | This mimics the `member` having invalid credentials. The `member` status will go to `DENIED`.                        |
| `test_atrium` | `INVALID`      | This mimics the `member` having invalid `login` and/or `password` fields. The `member` status will go to `DENIED`.   |
| `test_atrium` | `LOCKED`       | This mimics a user being locked out of their banking institution. The `member` status will go to `DENIED`.           |
| `test_atrium` | `SERVER_ERROR` | This mimics the financial institution having a server error. The `member` status will go to `HALTED`.                |
| `test_atrium` | `UNAVAILABLE`  | This mimics the financial institution having a "service unavailable" error. The `member` status will go to `HALTED`. |

## Testing with MX Bank and OAuth in the Connect Widget

You will only be able to test OAuth flows in the integration environment with MX Bank (OAuth) (institution code: `mx_bank_oauth`).

When you select MX Bank (OAuth) from search, or load the Connect with it via `current_institution_code`. You should see the following screen before going to the OAuth provider:

<img src="https://mintcdn.com/mx-7a01b258/OOfo2VTBgMqAqqgz/images/atrium/oauth_continue_screen.png?fit=max&auto=format&n=OOfo2VTBgMqAqqgz&q=85&s=258bc48835ea72e77bdf19e45a344249" alt="Screenshot of continue screen" width="1200" height="864" data-path="images/atrium/oauth_continue_screen.png" />

Then you should end up on this page:

<img src="https://mintcdn.com/mx-7a01b258/OOfo2VTBgMqAqqgz/images/atrium/oauth_authorize_screen.png?fit=max&auto=format&n=OOfo2VTBgMqAqqgz&q=85&s=15237c2b12186b67bdcc472c4aa2c07f" alt="Screenshot of authorize screen" width="1200" height="760" data-path="images/atrium/oauth_authorize_screen.png" />

From here you can simply click "Authorize" to simulate authorizing and success paths, and "Deny" to simulate an error path.

## Test Endpoints

MX provides test endpoints to aid developers in working the flows and other issues with their Atrium integrations. Test endpoints return static data.

Certain endpoints can take a [`connection_status`](/api-reference/atrium/reference/members/connection-status) string as a URL parameter in place of the typical GUID. This will return a `member` in the state corresponding to the given `connection_status`.

## Accounts

[Main docs](/api-reference/atrium/reference/accounts/overview).

### List accounts for a member

**Endpoint**: `GET /users/test_atrium/members/test_atrium_member/accounts`

```shell Request theme={null}
curl -X GET \
  https://vestibule.mx.com/users/test_atrium/members/test_atrium_member/accounts \
  -H 'Accept: application/vnd.mx.atrium.v1+json' \
  -H 'MX-API-Key: {your_api_key}' \
  -H 'MX-Client-ID: {your_client_id}'
```

### List accounts for a user

**Endpoint**: `GET /users/test_atrium/accounts`

```shell Request theme={null}
curl -X GET \
  https://vestibule.mx.com/users/test_atrium/accounts \
  -H 'Accept: application/vnd.mx.atrium.v1+json' \
  -H 'MX-API-Key: {your_api_key}' \
  -H 'MX-Client-ID: {your_client_id}'
```

### Read an account

**Endpoint**: `GET /users/test_atrium/accounts/test_atrium_account`

```shell Request theme={null}
curl -X GET \
  https://vestibule.mx.com/users/test_atrium/accounts/test_atrium_account \
  -H 'Accept: application/vnd.mx.atrium.v1+json' \
  -H 'MX-API-Key: {your_api_key}' \
  -H 'MX-Client-ID: {your_client_id}'
```

## Request Connect Widget

**Endpoint**: `POST /users/test_atrium/connect_widget_url`

```shell Request theme={null}
curl -i -X POST 'https://vestibule.mx.com/users/test_atrium/connect_widget_url' \
  -H 'Accept: application/vnd.mx.atrium.v1+json' \
  -H 'Content-Type: application/json' \
  -H 'MX-API-Key: {mx_api_key}' \
  -H 'MX-Client-ID: {mx_client_id}'
```

## Holdings

### List Holdings For A User

**Endpoint**: `GET /users/test_atrium/holdings`

```shell Request theme={null}
curl -X GET \
  https://vestibule.mx.com/users/test_atrium/holdings \
  -H 'Accept: application/vnd.mx.atrium.v1+json' \
  -H 'MX-API-Key: {your_api_key}' \
  -H 'MX-Client-ID: {your_client_id}'
```

### List Holdings For a Member

**Endpoint**: `GET /users/test_atrium/members/test_atrium_members/holdings`

```shell Request theme={null}
curl -X GET \
  https://vestibule.mx.com/users/test_atrium/members/test_atrium_member/holdings \
  -H 'Accept: application/vnd.mx.atrium.v1+json' \
  -H 'MX-API-Key: {your_api_key}' \
  -H 'MX-Client-ID: {your_client_id}'
```

### List Holdings For an Account

**Endpoint**: `GET /users/test_atrium/accounts/test_atrium_account/holdings`

```shell Request theme={null}
curl -X GET \
  https://vestibule.mx.com/users/test_atrium/accounts/test_atrium_account/holdings \
  -H 'Accept: application/vnd.mx.atrium.v1+json' \
  -H 'MX-API-Key: {your_api_key}' \
  -H 'MX-Client-ID: {your_client_id}'
```

### Read a Holding

**Endpoint**: `GET /users/test_atrium/holdings/test_atrium_holding`

```shell Request theme={null}
curl -X GET \
  https://vestibule.mx.com/users/test_atrium/holdings/test_atrium_holding \
  -H 'Accept: application/vnd.mx.atrium.v1+json' \
  -H 'MX-API-Key: {your_api_key}' \
  -H 'MX-Client-ID: {your_client_id}'
```

## Institutions

[Main Docs](/api-reference/atrium/reference/institutions/overview).

### List Institutions

**Endpoint**: `GET /test_institutions`

```shell Request theme={null}
curl -X GET \
  https://vestibule.mx.com/test_institutions \
  -H 'Accept: application/vnd.mx.atrium.v1+json' \
  -H 'MX-API-Key: {your_api_key}' \
  -H 'MX-Client-ID: {your_client_id}'
```

### List Institution Credentials

**Endpoint**: `GET /institutions/test_mxbank/credentials`

```shell Request theme={null}
curl -X GET \
  https://vestibule.mx.com/institutions/test_mxbank/credentials \
  -H 'Accept: application/vnd.mx.atrium.v1+json' \
  -H 'MX-API-Key: {your_api_key}' \
  -H 'MX-Client-ID: {your_client_id}'
```

### Read an Institution

**Endpoint**: `GET /institutions/test_mxbank`

```shell Request theme={null}
curl -X GET \
  https://vestibule.mx.com/institutions/test_mxbank \
  -H 'Accept: application/vnd.mx.atrium.v1+json' \
  -H 'MX-API-Key: {your_api_key}' \
  -H 'MX-Client-ID: {your_client_id}'
```

## Account Owner Identification

### Identify

**Endpoint**: `POST /users/test_atrium/members/test_atrium_member/identify`

```shell Request theme={null}
curl -i -X POST 'https://vestibule.mx.com/users/test_atrium/members/test_atrium_member/identify' \
  -H 'Accept: application/vnd.mx.atrium.v1+json' \
  -H 'MX-API-Key: {mx_api_key}' \
  -H 'MX-Client-ID: {mx_client_id}'
```

### Read Account Owners

**Endpoint**: `GET /users/test_atrium/members/test_atrium_member/account_owners`

```shell Request theme={null}
curl -X GET \
  https://vestibule.mx.com/users/test_atrium/members/test_atrium_member/account_owners \
  -H 'Accept: application/vnd.mx.atrium.v1+json' \
  -H 'MX-API-Key: {your_api_key}' \
  -H 'MX-Client-ID: {your_client_id}'
```

## Members

[Main docs](/api-reference/atrium/reference/members/overview).

### Create a member

**Endpoint**: `POST /users/test_atrium/members`

```shell Request theme={null}
curl -X POST \
  https://vestibule.mx.com/users/test_atrium/members \
  -H 'Accept: application/vnd.mx.atrium.v1+json' \
  -H 'Content-Type: application/json' \
  -H 'MX-API-Key: {your_api_key}' \
  -H 'MX-Client-ID: {your_client_id}' \
  -d '{
  "member": {
    "credentials": [
      {
        "guid": "CRD-1ec152cd-e628-e81a-e852-d1e7104624da",
        "value": "ExampleUsername"
      },
      {
        "guid": "CRD-1ec152cd-e628-e81a-e852-d1e7104624da",
        "value": "Pa$$vv@Rd"
      }
    ],
    "institution_code": "mxbank"
  }
}'
```

### List members

**Endpoint**: `GET /users/test_atrium/members/`

```shell Request theme={null}
curl -X GET \
  https://vestibule.mx.com/users/test_atrium/members/ \
  -H 'Accept: application/vnd.mx.atrium.v1+json' \
  -H 'MX-API-Key: {your_api_key}' \
  -H 'MX-Client-ID: {your_client_id}'
```

### Read a member

This endpoint will return a test `member` in a state corresponding to the `connection_status` passed in the URL where a `member_guid` would typically go. Using the GUID `test_atrium_member` will return a `member` with the status `CONNECTED`.

**Endpoint**: `GET /users/test_atrium/members/test_atrium_member`

or

**Endpoint**: `GET /users/test_atrium/members/{connection_status}`

```shell Request theme={null}
curl -X GET \
  https://vestibule.mx.com/users/test_atrium/members/test_atrium_member \
  -H 'Accept: application/vnd.mx.atrium.v1+json' \
  -H 'MX-API-Key: {your_api_key}' \
  -H 'MX-Client-ID: {your_client_id}'
```

### Update a member

This endpoint will return a test `member` in a state corresponding to the `connection_status` passed in the URL where a `member_guid` would typically go. Using the GUID `test_atrium_member` will return a `member` with the status `CONNECTED`.

**Endpoint**: `PUT /users/test_atrium/members/test_atrium_member`

or

**Endpoint**: `PUT /users/test_atrium/members/{connection_status}`

```shell Request theme={null}
curl -X PUT \
  https://vestibule.mx.com/users/test_atrium/members/test_atrium_member \
  -H 'Accept: application/vnd.mx.atrium.v1+json' \
  -H 'Content-Type: application/json' \
  -H 'MX-API-Key: {your_api_key}' \
  -H 'MX-Client-ID: {your_client_id}' \
  -d '{
  "member": {
    "credentials": [
      {
        "guid": "CRD-598ec8d4-6200-8cda-345d-3dbb5fc17716",
        "value": "updated-username"
      },
      {
        "guid": "CRD-27d0edb8-1d50-5b90-bcbc-be270ca42b9f",
        "value": "updated-password"
      }
    ],
    "metadata": "{\"credentials_last_refreshed_at\": \"2015-10-16\"}"
  }
}'
```

### Delete a member

**Endpoint**: `DELETE /users/test_atrium/members/test_atrium_member`

```shell Request theme={null}
curl -X DELETE \
  https://vestibule.mx.com/users/test_atrium/members/test_atrium_member \
  -H 'Accept: application/vnd.mx.atrium.v1+json' \
  -H 'MX-API-Key: {your_api_key}' \
  -H 'MX-Client-ID: {your_client_id}'
```

### Aggregate a member

This endpoint will return a test `member` in a state corresponding to the `connection_status` passed in the URL where a `member_guid` would typically go. Using the GUID `test_atrium_member` will return a `member` with the status `CONNECTED`.

**Endpoint**: `POST /users/test_atrium/members/:connection_status/aggregate`

```shell Request theme={null}
curl -X GET \
  https://vestibule.mx.com/users/test_atrium/members/test_atrium_member/atrium \
  -H 'Accept: application/vnd.mx.atrium.v1+json' \
  -H 'MX-API-Key: {your_api_key}' \
  -H 'MX-Client-ID: {your_client_id}'
```

### Read a member's connection status

This endpoint will return a test `member` in a state corresponding to the `connection_status` passed in the URL where a `member_guid` would typically go. Using the GUID `test_atrium_member` will return a `member` with the status `CONNECTED`.

**Endpoint**: `GET /users/test_atrium/members/:connection_status/status`

```shell Request theme={null}
curl -X GET \
  https://vestibule.mx.com/users/test_atrium/members/challenged/status \
  -H 'Accept: application/vnd.mx.atrium.v1+json' \
  -H 'MX-API-Key: {your_api_key}' \
  -H 'MX-Client-ID: {your_client_id}'
```

### Read a member's MFA challenges

This endpoint takes one of four URL parameters which return three different types of MFA challenges: `text`, `options`, `image`, and `image_options`.

**Endpoint**: `GET /users/test_atrium/members/:challenge_type/challenges`

```shell Request theme={null}
curl -X GET \
  https://vestibule.mx.com/users/test_atrium/members/options/challenges \
  -H 'Accept: application/vnd.mx.atrium.v1+json' \
  -H 'MX-API-Key: {your_api_key}' \
  -H 'MX-Client-ID: {your_client_id}'
```

### Resume aggregation from MFA

**Endpoint**: `PUT /users/test_atrium/members/test_atrium_member/resume`

```shell Request theme={null}
curl -X PUT \
  https://vestibule.mx.com/users/test_atrium/members/test_atrium_member/resume \
  -H 'Accept: application/vnd.mx.atrium.v1+json' \
  -H 'Content-Type: application/json' \
  -H 'MX-API-Key: {your_api_key}' \
  -H 'MX-Client-ID: {your_client_id}' \
  -d '{
  "member": {
    "challenges": [
      {
        "guid": "institution-credential-guid",
        "value": "user-entered-value"
      },
      {
        "guid": "institution-credential-guid",
        "value": "user-entered-value"
      }
    ]
  }
}'
```

### List a member's credentials

**Endpoint**: `GET /users/test_atrium/members/test_atrium_member/credentials`

```shell Request theme={null}
curl -X GET \
  https://vestibule.mx.com/users/test_atrium/members/test_atrium_member/credentials \
  -H 'Accept: application/vnd.mx.atrium.v1+json' \
  -H 'MX-API-Key: {your_api_key}' \
  -H 'MX-Client-ID: {your_client_id}'
```

### List a member's accounts

**Endpoint**: `GET /users/test_atrium/members/test_atrium_member/accounts`

```shell Request theme={null}
curl -X GET \
  https://vestibule.mx.com/users/test_atrium/members/test_atrium_member/accounts \
  -H 'Accept: application/vnd.mx.atrium.v1+json' \
  -H 'MX-API-Key: {your_api_key}' \
  -H 'MX-Client-ID: {your_client_id}'
```

### List a member's transactions

**Endpoint**: `GET /users/test_atrium/members/test_atrium_member/transactions`

```shell Request theme={null}
curl -X GET \
  https://vestibule.mx.com/users/test_atrium/members/test_atrium_member/transactions \
  -H 'Accept: application/vnd.mx.atrium.v1+json' \
  -H 'MX-API-Key: {your_api_key}' \
  -H 'MX-Client-ID: {your_client_id}'
```

## Merchants

[Main docs](/api-reference/atrium/reference/members/overview).

### Read a merchant

**Endpoint**: `GET /merchants/test_atrium_merchant`

```shell Request theme={null}
curl -X GET \
  https://vestibule.mx.com/merchants/test_atrium_merchant \
  -H 'Accept: application/vnd.mx.atrium.v1+json' \
  -H 'MX-API-Key: {your_api_key}' \
  -H 'MX-Client-ID: {your_client_id}'
```

## Extended Transaction History

[Main docs](/api-reference/atrium/reference/premium-features/overview).

### Extend transaction history

**Endpoint**: `POST /users/test_atrium/members/test_atrium_member/extend_history`

```shell Request theme={null}
curl -i -X POST 'https://vestibule.mx.com/users/test_atrium/members/test_atrium_member/extend_history' \
  -H 'Accept: application/vnd.mx.atrium.v1+json' \
  -H 'MX-API-Key: {mx_api_key}' \
  -H 'MX-Client-ID: {mx_client_id}'
```

## Transactions

[Main docs](/api-reference/atrium/reference/transactions/overview).

### List Transactions for a User

**Endpoint**: `GET /users/test_atrium/transactions`

```shell Request theme={null}
curl -X GET \
  https://vestibule.mx.com/users/test_atrium/transactions \
  -H 'Accept: application/vnd.mx.atrium.v1+json' \
  -H 'MX-API-Key: {your_api_key}' \
  -H 'MX-Client-ID: {your_client_id}'
```

### List Transactions by Account

**Endpoint**: `GET /users/test_atrium/accounts/test_atrium_account/transactions`

```shell Request theme={null}
curl -X GET \
  https://vestibule.mx.com/users/test_atrium/accounts/test_atrium_account/transactions \
  -H 'Accept: application/vnd.mx.atrium.v1+json' \
  -H 'MX-API-Key: {your_api_key}' \
  -H 'MX-Client-ID: {your_client_id}'
```

### Read a Transaction

**Endpoint**: `GET /users/test_atrium/transactions/test_atrium_transaction`

```shell Request theme={null}
curl -X GET \
  https://vestibule.mx.com/users/test_atrium/transactions/test_atrium_transaction \
  -H 'Accept: application/vnd.mx.atrium.v1+json' \
  -H 'MX-API-Key: {your_api_key}' \
  -H 'MX-Client-ID: {your_client_id}'
```

### Categorize Transactions

**Endpoint**: `POST /test_transactions/cleanse_and_categorize`

```shell Request theme={null}
curl -X POST \
  https://vestibule.mx.com/test_transactions/cleanse_and_categorize \
  -H 'Accept: application/vnd.mx.atrium.v1+json' \
  -H 'Content-Type: application/json' \
  -H 'MX-API-Key: {your_api_key}' \
  -H 'MX-Client-ID: {your_client_id}' \
  -d '{
  "transactions": [
    {
      "amount": 11.22,
      "description": "BEER BAR 65000000764SALT LAKE C",
      "identifier": "12",
      "type": "DEBIT"
    },
    {
      "amount": 21.33,
      "description": "IN-N-OUT BURGER #239AMERICAN FO",
      "identifier": "13",
      "type": "DEBIT"
    },
    {
      "amount": 1595.33,
      "description": "ONLINE PAYMENT - THANK YOU",
      "identifier": "14",
      "type": "CREDIT"
    }
  ]
}'
```

## Users

[Main docs](/api-reference/atrium/reference/users/overview).

### Create a User

**Endpoint**: `POST /test_users`

```shell Request theme={null}
curl -X POST \
  https://vestibule.mx.com/test_users \
  -H 'Accept: application/vnd.mx.atrium.v1+json' \
  -H 'Content-Type: application/json' \
  -H 'MX-API-Key: {your_api_key}' \
  -H 'MX-Client-ID: {your_client_id}' \
  -d '{
  "user": {
    "identifier": "unique_id",
    "metadata": "{\"first_name\": \"Steven\"}"
  }
}'
```

### List Users

**Endpoint**: `GET /test_users`

```shell Request theme={null}
curl -X GET \
  https://vestibule.mx.com/test_users\
  -H 'Accept: application/vnd.mx.atrium.v1+json' \
  -H 'MX-API-Key: {your_api_key}' \
  -H 'MX-Client-ID: {your_client_id}'
```

### Read a User

**Endpoint**: `GET /users/test_atrium`

```shell Request theme={null}
curl -X GET \
  https://vestibule.mx.com/users/test_atrium \
  -H 'Accept: application/vnd.mx.atrium.v1+json' \
  -H 'MX-API-Key: {your_api_key}' \
  -H 'MX-Client-ID: {your_client_id}'
```

### Update a User

**Endpoint**: `PUT /users/test_atrium`

```shell Request theme={null}
curl -X GET \
  https://vestibule.mx.com/users/test_atrium \
  -H 'Accept: application/vnd.mx.atrium.v1+json' \
  -H 'MX-API-Key: {your_api_key}' \
  -H 'MX-Client-ID: {your_client_id}'
```

### Delete a user

**Endpoint**: `DELETE /users/test_atrium`

```shell Request theme={null}
curl -X DELETE \
  https://vestibule.mx.com/users/test_atrium\
  -H 'Accept: application/vnd.mx.atrium.v1+json' \
  -H 'MX-API-Key: {your_api_key}' \
  -H 'MX-Client-ID: {your_client_id}'
```

## Instant Account Verification

[Main docs](/api-reference/atrium/reference/users/overview).

### Verify

**Endpoint**: `POST /users/test_atrium/members/test_atrium_member/verify`

```shell Request theme={null}
curl -i -X POST 'https://vestibule.mx.com/users/test_atrium/members/test_atrium_member/verify' \
  -H 'Accept: application/vnd.mx.atrium.v1+json' \
  -H 'MX-API-Key: {mx_api_key}' \
  -H 'MX-Client-ID: {mx_client_id}'
```

### Read Account Numbers

**Endpoint**: `/users/test_atrium/members/test_atrium_member/account_numbers`

```shell Request theme={null}
curl -X GET \
  https://vestibule.mx.com/users/test_atrium/members/test_atrium_member/account_numbers \
  -H 'Accept: application/vnd.mx.atrium.v1+json' \
  -H 'MX-API-Key: {your_api_key}' \
  -H 'MX-Client-ID: {your_client_id}'
```
