UNPKG

plaid

Version:

A node.js client for the Plaid API

853 lines (834 loc) 3.96 MB
/* tslint:disable */ /* eslint-disable */ /** * The Plaid API * The Plaid REST API. Please see https://plaid.com/docs/api for more details. * * The version of the OpenAPI document: 2020-09-14_1.664.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ import { Configuration } from './configuration'; import globalAxios, { AxiosPromise, AxiosInstance } from 'axios'; // Some imports not used depending on template conditions // @ts-ignore import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from './common'; // @ts-ignore import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } from './base'; /** * Analyzed AAMVA data for the associated hit. Note: This field is only available for U.S. driver\'s licenses issued by participating states. * @export * @interface AAMVAAnalysis */ export interface AAMVAAnalysis { /** * The overall outcome of checking the associated hit against the issuing state database. * @type {boolean} * @memberof AAMVAAnalysis */ is_verified: boolean; /** * * @type {AAMVAMatchResult} * @memberof AAMVAAnalysis */ id_number: AAMVAMatchResult; /** * * @type {AAMVAMatchResult} * @memberof AAMVAAnalysis */ id_issue_date: AAMVAMatchResult; /** * * @type {AAMVAMatchResult} * @memberof AAMVAAnalysis */ id_expiration_date: AAMVAMatchResult; /** * * @type {AAMVADetailedMatchResult} * @memberof AAMVAAnalysis */ street: AAMVADetailedMatchResult; /** * * @type {AAMVAMatchResult} * @memberof AAMVAAnalysis */ city: AAMVAMatchResult; /** * * @type {AAMVADetailedMatchResult} * @memberof AAMVAAnalysis */ postal_code: AAMVADetailedMatchResult; /** * * @type {AAMVAMatchResult} * @memberof AAMVAAnalysis */ date_of_birth: AAMVAMatchResult; /** * * @type {AAMVAMatchResult} * @memberof AAMVAAnalysis */ gender: AAMVAMatchResult; /** * * @type {AAMVAMatchResult} * @memberof AAMVAAnalysis */ height: AAMVAMatchResult; /** * * @type {AAMVAMatchResult} * @memberof AAMVAAnalysis */ eye_color: AAMVAMatchResult; /** * * @type {AAMVADetailedMatchResult} * @memberof AAMVAAnalysis */ first_name: AAMVADetailedMatchResult; /** * * @type {AAMVADetailedMatchResult} * @memberof AAMVAAnalysis */ middle_name: AAMVADetailedMatchResult; /** * * @type {AAMVADetailedMatchResult} * @memberof AAMVAAnalysis */ last_name: AAMVADetailedMatchResult; } /** * The outcome of checking the associated hit against state databases. `match` - The field is an exact match with the state database. `partial_match` - The field is a partial match with the state database. `no_match` - The field is not an exact match with the state database. `no_data` - The field was unable to be checked against state databases. * @export * @enum {string} */ export enum AAMVADetailedMatchResult { Match = 'match', PartialMatch = 'partial_match', NoMatch = 'no_match', NoData = 'no_data' } /** * The outcome of checking the particular field against state databases. `match` - The field is an exact match with the state database. `no_match` - The field is not an exact match with the state database. `no_data` - The field was unable to be checked against state databases. * @export * @enum {string} */ export enum AAMVAMatchResult { Match = 'match', NoMatch = 'no_match', NoData = 'no_data' } /** * Specifies the use case of the transfer. Required for transfers on an ACH network. For more details, see [ACH SEC codes](https://plaid.com/docs/transfer/creating-transfers/#ach-sec-codes). Codes supported for credits: `ccd`, `ppd` Codes supported for debits: `ccd`, `tel`, `web` `\"ccd\"` - Corporate Credit or Debit - fund transfer between two corporate bank accounts `\"ppd\"` - Prearranged Payment or Deposit - The transfer is part of a pre-existing relationship with a consumer. Authorization was obtained in writing either in person or via an electronic document signing, e.g. Docusign, by the consumer. Can be used for credits or debits. `\"web\"` - Internet-Initiated Entry. The transfer debits a consumer’s bank account. Authorization from the consumer is obtained over the Internet (e.g. a web or mobile application). Can be used for single debits or recurring debits. `\"tel\"` - Telephone-Initiated Entry. The transfer debits a consumer. Debit authorization has been received orally over the telephone via a recorded call. * @export * @enum {string} */ export enum ACHClass { Ccd = 'ccd', Ppd = 'ppd', Tel = 'tel', Web = 'web' } /** * Information about the APR on the account. * @export * @interface APR */ export interface APR { /** * Annual Percentage Rate applied. * @type {number} * @memberof APR */ apr_percentage: number; /** * The type of balance to which the APR applies. * @type {string} * @memberof APR */ apr_type: APRAprTypeEnum; /** * Amount of money that is subjected to the APR if a balance was carried beyond payment due date. How it is calculated can vary by card issuer. It is often calculated as an average daily balance. * @type {number} * @memberof APR */ balance_subject_to_apr: number | null; /** * Amount of money charged due to interest from last statement. * @type {number} * @memberof APR */ interest_charge_amount: number | null; } /** * @export * @enum {string} */ export enum APRAprTypeEnum { BalanceTransferApr = 'balance_transfer_apr', CashApr = 'cash_apr', PurchaseApr = 'purchase_apr', Special = 'special' } /** * Allow or disallow product access by account. Unlisted (e.g. missing) accounts will be considered `new_accounts`. * @export * @interface AccountAccess */ export interface AccountAccess { /** * The unique account identifier for this account. This value must match that returned by the data access API for this account. * @type {string} * @memberof AccountAccess */ unique_id: string; /** * Allow the application to see this account (and associated details, including balance) in the list of accounts If unset, defaults to `true`. * @type {boolean} * @memberof AccountAccess */ authorized?: boolean | null; /** * * @type {AccountProductAccessNullable} * @memberof AccountAccess */ account_product_access?: AccountProductAccessNullable | null; } /** * Asset information about an account * @export * @interface AccountAssets */ export interface AccountAssets { /** * Plaid’s unique identifier for the account. This value will not change unless Plaid can\'t reconcile the account with the data returned by the financial institution. This may occur, for example, when the name of the account changes. If this happens a new `account_id` will be assigned to the account. The `account_id` can also change if the `access_token` is deleted and the same credentials that were used to generate that `access_token` are used to generate a new `access_token` on a later date. In that case, the new `account_id` will be different from the old `account_id`. If an account with a specific `account_id` disappears instead of changing, the account is likely closed. Closed accounts are not returned by the Plaid API. Like all Plaid identifiers, the `account_id` is case sensitive. * @type {string} * @memberof AccountAssets */ account_id: string; /** * * @type {AssetReportAccountBalance} * @memberof AccountAssets */ balances: AssetReportAccountBalance; /** * The last 2-4 alphanumeric characters of an account\'s official account number. Note that the mask may be non-unique between an Item\'s accounts, and it may also not match the mask that the bank displays to the user. * @type {string} * @memberof AccountAssets */ mask: string | null; /** * The name of the account, either assigned by the user or by the financial institution itself * @type {string} * @memberof AccountAssets */ name: string; /** * The official name of the account as given by the financial institution * @type {string} * @memberof AccountAssets */ official_name: string | null; /** * * @type {AccountType} * @memberof AccountAssets */ type: AccountType; /** * * @type {AccountSubtype} * @memberof AccountAssets */ subtype: AccountSubtype | null; /** * The current verification status of an Auth Item initiated through Automated or Manual micro-deposits. Returned for Auth Items only. `pending_automatic_verification`: The Item is pending automatic verification `pending_manual_verification`: The Item is pending manual micro-deposit verification. Items remain in this state until the user successfully verifies the micro-deposit. `automatically_verified`: The Item has successfully been automatically verified `manually_verified`: The Item has successfully been manually verified `verification_expired`: Plaid was unable to automatically verify the deposit within 7 calendar days and will no longer attempt to validate the Item. Users may retry by submitting their information again through Link. `verification_failed`: The Item failed manual micro-deposit verification because the user exhausted all 3 verification attempts. Users may retry by submitting their information again through Link. `database_matched`: The Item has successfully been verified using Plaid\'s data sources. Note: Database Match is currently a beta feature, please contact your account manager for more information. * @type {string} * @memberof AccountAssets */ verification_status?: AccountAssetsVerificationStatusEnum; /** * A unique and persistent identifier for accounts that can be used to trace multiple instances of the same account across different Items for depository accounts. This is currently an opt-in field and only supported for Chase Items. * @type {string} * @memberof AccountAssets */ persistent_account_id?: string; /** * The duration of transaction history available within this report for this Item, typically defined as the time since the date of the earliest transaction in that account. * @type {number} * @memberof AccountAssets */ days_available: number; /** * Transaction history associated with the account. * @type {Array<AssetReportTransaction>} * @memberof AccountAssets */ transactions: Array<AssetReportTransaction>; /** * * @type {AssetReportInvestments} * @memberof AccountAssets */ investments?: AssetReportInvestments; /** * Data returned by the financial institution about the account owner or owners.For business accounts, the name reported may be either the name of the individual or the name of the business, depending on the institution. Multiple owners on a single account will be represented in the same `owner` object, not in multiple owner objects within the array. In API versions 2018-05-22 and earlier, the `owners` object is not returned, and instead identity information is returned in the top level `identity` object. For more details, see [Plaid API versioning](https://plaid.com/docs/api/versioning/#version-2019-05-29) * @type {Array<Owner>} * @memberof AccountAssets */ owners: Array<Owner>; /** * * @type {OwnershipType} * @memberof AccountAssets */ ownership_type?: OwnershipType | null; /** * Calculated data about the historical balances on the account. * @type {Array<HistoricalBalance>} * @memberof AccountAssets */ historical_balances: Array<HistoricalBalance>; } /** * @export * @enum {string} */ export enum AccountAssetsVerificationStatusEnum { AutomaticallyVerified = 'automatically_verified', PendingAutomaticVerification = 'pending_automatic_verification', PendingManualVerification = 'pending_manual_verification', ManuallyVerified = 'manually_verified', VerificationExpired = 'verification_expired', VerificationFailed = 'verification_failed', DatabaseMatched = 'database_matched' } /** * A set of fields describing the balance for an account. Balance information may be cached unless the balance object was returned by `/accounts/balance/get`. * @export * @interface AccountBalance */ export interface AccountBalance { /** * The amount of funds available to be withdrawn from the account, as determined by the financial institution. For `credit`-type accounts, the `available` balance typically equals the `limit` less the `current` balance, less any pending outflows plus any pending inflows. For `depository`-type accounts, the `available` balance typically equals the `current` balance less any pending outflows plus any pending inflows. For `depository`-type accounts, the `available` balance does not include the overdraft limit. For `investment`-type accounts (or `brokerage`-type accounts for API versions 2018-05-22 and earlier), the `available` balance is the total cash available to withdraw as presented by the institution. Note that not all institutions calculate the `available` balance. In the event that `available` balance is unavailable, Plaid will return an `available` balance value of `null`. Available balance may be cached and is not guaranteed to be up-to-date in realtime unless the value was returned by `/accounts/balance/get`. If `current` is `null` this field is guaranteed not to be `null`. * @type {number} * @memberof AccountBalance */ available: number | null; /** * The total amount of funds in or owed by the account. For `credit`-type accounts, a positive balance indicates the amount owed; a negative amount indicates the lender owing the account holder. For `loan`-type accounts, the current balance is the principal remaining on the loan, except in the case of student loan accounts at Sallie Mae (`ins_116944`). For Sallie Mae student loans, the account\'s balance includes both principal and any outstanding interest. Similar to `credit`-type accounts, a positive balance is typically expected, while a negative amount indicates the lender owing the account holder. For `investment`-type accounts (or `brokerage`-type accounts for API versions 2018-05-22 and earlier), the current balance is the total value of assets as presented by the institution. Note that balance information may be cached unless the value was returned by `/accounts/balance/get`; if the Item is enabled for Transactions, the balance will be at least as recent as the most recent Transaction update. If you require realtime balance information, use the `available` balance as provided by `/accounts/balance/get`. When returned by `/accounts/balance/get`, this field may be `null`. When this happens, `available` is guaranteed not to be `null`. * @type {number} * @memberof AccountBalance */ current: number | null; /** * For `credit`-type accounts, this represents the credit limit. For `depository`-type accounts, this represents the pre-arranged overdraft limit, which is common for current (checking) accounts in Europe. In North America, this field is typically only available for `credit`-type accounts. * @type {number} * @memberof AccountBalance */ limit: number | null; /** * The ISO-4217 currency code of the balance. Always null if `unofficial_currency_code` is non-null. * @type {string} * @memberof AccountBalance */ iso_currency_code: string | null; /** * The unofficial currency code associated with the balance. Always null if `iso_currency_code` is non-null. Unofficial currency codes are used for currencies that do not have official ISO currency codes, such as cryptocurrencies and the currencies of certain countries. See the [currency code schema](https://plaid.com/docs/api/accounts#currency-code-schema) for a full listing of supported `unofficial_currency_code`s. * @type {string} * @memberof AccountBalance */ unofficial_currency_code: string | null; /** * Timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format (`YYYY-MM-DDTHH:mm:ssZ`) indicating the last time the balance was updated. This field is returned only when the institution is `ins_128026` (Capital One). * @type {string} * @memberof AccountBalance */ last_updated_datetime?: string | null; } /** * A single account at a financial institution. * @export * @interface AccountBase */ export interface AccountBase { /** * Plaid’s unique identifier for the account. This value will not change unless Plaid can\'t reconcile the account with the data returned by the financial institution. This may occur, for example, when the name of the account changes. If this happens a new `account_id` will be assigned to the account. The `account_id` can also change if the `access_token` is deleted and the same credentials that were used to generate that `access_token` are used to generate a new `access_token` on a later date. In that case, the new `account_id` will be different from the old `account_id`. If an account with a specific `account_id` disappears instead of changing, the account is likely closed. Closed accounts are not returned by the Plaid API. When using a CRA endpoint (an endpoint associated with Plaid Check Consumer Report, i.e. any endpoint beginning with `/cra/`), the `account_id` returned will not match the `account_id` returned by a non-CRA endpoint. Like all Plaid identifiers, the `account_id` is case sensitive. * @type {string} * @memberof AccountBase */ account_id: string; /** * * @type {AccountBalance} * @memberof AccountBase */ balances: AccountBalance; /** * The last 2-4 alphanumeric characters of either the account’s displayed mask or the account’s official account number. Note that the mask may be non-unique between an Item’s accounts. * @type {string} * @memberof AccountBase */ mask: string | null; /** * The name of the account, either assigned by the user or by the financial institution itself * @type {string} * @memberof AccountBase */ name: string; /** * The official name of the account as given by the financial institution * @type {string} * @memberof AccountBase */ official_name: string | null; /** * * @type {AccountType} * @memberof AccountBase */ type: AccountType; /** * * @type {AccountSubtype} * @memberof AccountBase */ subtype: AccountSubtype | null; /** * The current verification status of an Auth Item initiated through micro-deposits or database verification. Returned for Auth Items only. `pending_automatic_verification`: The Item is pending automatic verification `pending_manual_verification`: The Item is pending manual micro-deposit verification. Items remain in this state until the user successfully verifies the micro-deposit. `automatically_verified`: The Item has successfully been automatically verified `manually_verified`: The Item has successfully been manually verified `verification_expired`: Plaid was unable to automatically verify the deposit within 7 calendar days and will no longer attempt to validate the Item. Users may retry by submitting their information again through Link. `verification_failed`: The Item failed manual micro-deposit verification because the user exhausted all 3 verification attempts. Users may retry by submitting their information again through Link. `unsent`: The Item is pending micro-deposit verification, but Plaid has not yet sent the micro-deposit. `database_matched`: The Item has successfully been verified using Plaid\'s data sources. Only returned for Auth Items created via Database Match. `database_insights_pass`: The Item\'s numbers have been verified using Plaid\'s data sources: the routing and account number match a routing and account number of an account recognized on the Plaid network, and the account is not known by Plaid to be frozen or closed. Only returned for Auth Items created via Database Auth. `database_insights_pass_with_caution`:The Item\'s numbers have been verified using Plaid\'s data sources and have some signal for being valid: the routing and account number were not recognized on the Plaid network, but the routing number is valid and the account number is a potential valid account number for that routing number. Only returned for Auth Items created via Database Auth. `database_insights_fail`: The Item\'s numbers have been verified using Plaid\'s data sources and have signal for being invalid and/or have no signal for being valid. Typically this indicates that the routing number is invalid, the account number does not match the account number format associated with the routing number, or the account has been reported as closed or frozen. Only returned for Auth Items created via Database Auth. * @type {string} * @memberof AccountBase */ verification_status?: AccountBaseVerificationStatusEnum; /** * The account holder name that was used for micro-deposit and/or database verification. Only returned for Auth Items created via micro-deposit or database verification. This name was manually-entered by the user during Link, unless it was otherwise provided via the `user.legal_name` request field in `/link/token/create` for the Link session that created the Item. * @type {string} * @memberof AccountBase */ verification_name?: string; /** * * @type {AccountVerificationInsights} * @memberof AccountBase */ verification_insights?: AccountVerificationInsights; /** * A unique and persistent identifier for accounts that can be used to trace multiple instances of the same account across different Items for depository accounts. This field is currently supported only for Items at institutions that use Tokenized Account Numbers (i.e., Chase and PNC, and in May 2025 US Bank). Because these accounts have a different account number each time they are linked, this field may be used instead of the account number to uniquely identify an account across multiple Items for payments use cases, helping to reduce duplicate Items or attempted fraud. In Sandbox, this field is populated for TAN-based institutions (`ins_56`, `ins_13`) as well as the OAuth Sandbox institution (`ins_127287`); in Production, it will only be populated for accounts at applicable institutions. * @type {string} * @memberof AccountBase */ persistent_account_id?: string; /** * * @type {AccountHolderCategory} * @memberof AccountBase */ holder_category?: AccountHolderCategory | null; } /** * @export * @enum {string} */ export enum AccountBaseVerificationStatusEnum { AutomaticallyVerified = 'automatically_verified', PendingAutomaticVerification = 'pending_automatic_verification', PendingManualVerification = 'pending_manual_verification', Unsent = 'unsent', ManuallyVerified = 'manually_verified', VerificationExpired = 'verification_expired', VerificationFailed = 'verification_failed', DatabaseMatched = 'database_matched', DatabaseInsightsPass = 'database_insights_pass', DatabaseInsightsPassWithCaution = 'database_insights_pass_with_caution', DatabaseInsightsFail = 'database_insights_fail' } /** * A single account at a financial institution. * @export * @interface AccountBaseNullable */ export interface AccountBaseNullable { /** * Plaid’s unique identifier for the account. This value will not change unless Plaid can\'t reconcile the account with the data returned by the financial institution. This may occur, for example, when the name of the account changes. If this happens a new `account_id` will be assigned to the account. The `account_id` can also change if the `access_token` is deleted and the same credentials that were used to generate that `access_token` are used to generate a new `access_token` on a later date. In that case, the new `account_id` will be different from the old `account_id`. If an account with a specific `account_id` disappears instead of changing, the account is likely closed. Closed accounts are not returned by the Plaid API. When using a CRA endpoint (an endpoint associated with Plaid Check Consumer Report, i.e. any endpoint beginning with `/cra/`), the `account_id` returned will not match the `account_id` returned by a non-CRA endpoint. Like all Plaid identifiers, the `account_id` is case sensitive. * @type {string} * @memberof AccountBaseNullable */ account_id: string; /** * * @type {AccountBalance} * @memberof AccountBaseNullable */ balances: AccountBalance; /** * The last 2-4 alphanumeric characters of either the account’s displayed mask or the account’s official account number. Note that the mask may be non-unique between an Item’s accounts. * @type {string} * @memberof AccountBaseNullable */ mask: string | null; /** * The name of the account, either assigned by the user or by the financial institution itself * @type {string} * @memberof AccountBaseNullable */ name: string; /** * The official name of the account as given by the financial institution * @type {string} * @memberof AccountBaseNullable */ official_name: string | null; /** * * @type {AccountType} * @memberof AccountBaseNullable */ type: AccountType; /** * * @type {AccountSubtype} * @memberof AccountBaseNullable */ subtype: AccountSubtype | null; /** * The current verification status of an Auth Item initiated through micro-deposits or database verification. Returned for Auth Items only. `pending_automatic_verification`: The Item is pending automatic verification `pending_manual_verification`: The Item is pending manual micro-deposit verification. Items remain in this state until the user successfully verifies the micro-deposit. `automatically_verified`: The Item has successfully been automatically verified `manually_verified`: The Item has successfully been manually verified `verification_expired`: Plaid was unable to automatically verify the deposit within 7 calendar days and will no longer attempt to validate the Item. Users may retry by submitting their information again through Link. `verification_failed`: The Item failed manual micro-deposit verification because the user exhausted all 3 verification attempts. Users may retry by submitting their information again through Link. `unsent`: The Item is pending micro-deposit verification, but Plaid has not yet sent the micro-deposit. `database_matched`: The Item has successfully been verified using Plaid\'s data sources. Only returned for Auth Items created via Database Match. `database_insights_pass`: The Item\'s numbers have been verified using Plaid\'s data sources: the routing and account number match a routing and account number of an account recognized on the Plaid network, and the account is not known by Plaid to be frozen or closed. Only returned for Auth Items created via Database Auth. `database_insights_pass_with_caution`:The Item\'s numbers have been verified using Plaid\'s data sources and have some signal for being valid: the routing and account number were not recognized on the Plaid network, but the routing number is valid and the account number is a potential valid account number for that routing number. Only returned for Auth Items created via Database Auth. `database_insights_fail`: The Item\'s numbers have been verified using Plaid\'s data sources and have signal for being invalid and/or have no signal for being valid. Typically this indicates that the routing number is invalid, the account number does not match the account number format associated with the routing number, or the account has been reported as closed or frozen. Only returned for Auth Items created via Database Auth. * @type {string} * @memberof AccountBaseNullable */ verification_status?: AccountBaseNullableVerificationStatusEnum; /** * The account holder name that was used for micro-deposit and/or database verification. Only returned for Auth Items created via micro-deposit or database verification. This name was manually-entered by the user during Link, unless it was otherwise provided via the `user.legal_name` request field in `/link/token/create` for the Link session that created the Item. * @type {string} * @memberof AccountBaseNullable */ verification_name?: string; /** * * @type {AccountVerificationInsights} * @memberof AccountBaseNullable */ verification_insights?: AccountVerificationInsights; /** * A unique and persistent identifier for accounts that can be used to trace multiple instances of the same account across different Items for depository accounts. This field is currently supported only for Items at institutions that use Tokenized Account Numbers (i.e., Chase and PNC, and in May 2025 US Bank). Because these accounts have a different account number each time they are linked, this field may be used instead of the account number to uniquely identify an account across multiple Items for payments use cases, helping to reduce duplicate Items or attempted fraud. In Sandbox, this field is populated for TAN-based institutions (`ins_56`, `ins_13`) as well as the OAuth Sandbox institution (`ins_127287`); in Production, it will only be populated for accounts at applicable institutions. * @type {string} * @memberof AccountBaseNullable */ persistent_account_id?: string; /** * * @type {AccountHolderCategory} * @memberof AccountBaseNullable */ holder_category?: AccountHolderCategory | null; } /** * @export * @enum {string} */ export enum AccountBaseNullableVerificationStatusEnum { AutomaticallyVerified = 'automatically_verified', PendingAutomaticVerification = 'pending_automatic_verification', PendingManualVerification = 'pending_manual_verification', Unsent = 'unsent', ManuallyVerified = 'manually_verified', VerificationExpired = 'verification_expired', VerificationFailed = 'verification_failed', DatabaseMatched = 'database_matched', DatabaseInsightsPass = 'database_insights_pass', DatabaseInsightsPassWithCaution = 'database_insights_pass_with_caution', DatabaseInsightsFail = 'database_insights_fail' } /** * Enumerates the account subtypes that the application wishes for the user to be able to select from. For more details refer to Plaid documentation on account filters. * @export * @interface AccountFilter */ export interface AccountFilter { /** * A list of account subtypes to be filtered. * @type {Array<string>} * @memberof AccountFilter */ depository?: Array<string>; /** * A list of account subtypes to be filtered. * @type {Array<string>} * @memberof AccountFilter */ credit?: Array<string>; /** * A list of account subtypes to be filtered. * @type {Array<string>} * @memberof AccountFilter */ loan?: Array<string>; /** * A list of account subtypes to be filtered. * @type {Array<string>} * @memberof AccountFilter */ investment?: Array<string>; } /** * The `account_filters` specified in the original call to `/link/token/create`. * @export * @interface AccountFiltersResponse */ export interface AccountFiltersResponse { /** * * @type {DepositoryFilter} * @memberof AccountFiltersResponse */ depository?: DepositoryFilter; /** * * @type {CreditFilter} * @memberof AccountFiltersResponse */ credit?: CreditFilter; /** * * @type {LoanFilter} * @memberof AccountFiltersResponse */ loan?: LoanFilter; /** * * @type {InvestmentFilter} * @memberof AccountFiltersResponse */ investment?: InvestmentFilter; } /** * Indicates the account\'s categorization as either a personal or a business account. This field is currently in beta; to request access, contact your account manager. * @export * @enum {string} */ export enum AccountHolderCategory { Business = 'business', Personal = 'personal', Unrecognized = 'unrecognized' } /** * Identity information about an account * @export * @interface AccountIdentity */ export interface AccountIdentity { /** * Plaid’s unique identifier for the account. This value will not change unless Plaid can\'t reconcile the account with the data returned by the financial institution. This may occur, for example, when the name of the account changes. If this happens a new `account_id` will be assigned to the account. The `account_id` can also change if the `access_token` is deleted and the same credentials that were used to generate that `access_token` are used to generate a new `access_token` on a later date. In that case, the new `account_id` will be different from the old `account_id`. If an account with a specific `account_id` disappears instead of changing, the account is likely closed. Closed accounts are not returned by the Plaid API. When using a CRA endpoint (an endpoint associated with Plaid Check Consumer Report, i.e. any endpoint beginning with `/cra/`), the `account_id` returned will not match the `account_id` returned by a non-CRA endpoint. Like all Plaid identifiers, the `account_id` is case sensitive. * @type {string} * @memberof AccountIdentity */ account_id: string; /** * * @type {AccountBalance} * @memberof AccountIdentity */ balances: AccountBalance; /** * The last 2-4 alphanumeric characters of either the account’s displayed mask or the account’s official account number. Note that the mask may be non-unique between an Item’s accounts. * @type {string} * @memberof AccountIdentity */ mask: string | null; /** * The name of the account, either assigned by the user or by the financial institution itself * @type {string} * @memberof AccountIdentity */ name: string; /** * The official name of the account as given by the financial institution * @type {string} * @memberof AccountIdentity */ official_name: string | null; /** * * @type {AccountType} * @memberof AccountIdentity */ type: AccountType; /** * * @type {AccountSubtype} * @memberof AccountIdentity */ subtype: AccountSubtype | null; /** * The current verification status of an Auth Item initiated through micro-deposits or database verification. Returned for Auth Items only. `pending_automatic_verification`: The Item is pending automatic verification `pending_manual_verification`: The Item is pending manual micro-deposit verification. Items remain in this state until the user successfully verifies the micro-deposit. `automatically_verified`: The Item has successfully been automatically verified `manually_verified`: The Item has successfully been manually verified `verification_expired`: Plaid was unable to automatically verify the deposit within 7 calendar days and will no longer attempt to validate the Item. Users may retry by submitting their information again through Link. `verification_failed`: The Item failed manual micro-deposit verification because the user exhausted all 3 verification attempts. Users may retry by submitting their information again through Link. `unsent`: The Item is pending micro-deposit verification, but Plaid has not yet sent the micro-deposit. `database_matched`: The Item has successfully been verified using Plaid\'s data sources. Only returned for Auth Items created via Database Match. `database_insights_pass`: The Item\'s numbers have been verified using Plaid\'s data sources: the routing and account number match a routing and account number of an account recognized on the Plaid network, and the account is not known by Plaid to be frozen or closed. Only returned for Auth Items created via Database Auth. `database_insights_pass_with_caution`:The Item\'s numbers have been verified using Plaid\'s data sources and have some signal for being valid: the routing and account number were not recognized on the Plaid network, but the routing number is valid and the account number is a potential valid account number for that routing number. Only returned for Auth Items created via Database Auth. `database_insights_fail`: The Item\'s numbers have been verified using Plaid\'s data sources and have signal for being invalid and/or have no signal for being valid. Typically this indicates that the routing number is invalid, the account number does not match the account number format associated with the routing number, or the account has been reported as closed or frozen. Only returned for Auth Items created via Database Auth. * @type {string} * @memberof AccountIdentity */ verification_status?: AccountIdentityVerificationStatusEnum; /** * The account holder name that was used for micro-deposit and/or database verification. Only returned for Auth Items created via micro-deposit or database verification. This name was manually-entered by the user during Link, unless it was otherwise provided via the `user.legal_name` request field in `/link/token/create` for the Link session that created the Item. * @type {string} * @memberof AccountIdentity */ verification_name?: string; /** * * @type {AccountVerificationInsights} * @memberof AccountIdentity */ verification_insights?: AccountVerificationInsights; /** * A unique and persistent identifier for accounts that can be used to trace multiple instances of the same account across different Items for depository accounts. This field is currently supported only for Items at institutions that use Tokenized Account Numbers (i.e., Chase and PNC, and in May 2025 US Bank). Because these accounts have a different account number each time they are linked, this field may be used instead of the account number to uniquely identify an account across multiple Items for payments use cases, helping to reduce duplicate Items or attempted fraud. In Sandbox, this field is populated for TAN-based institutions (`ins_56`, `ins_13`) as well as the OAuth Sandbox institution (`ins_127287`); in Production, it will only be populated for accounts at applicable institutions. * @type {string} * @memberof AccountIdentity */ persistent_account_id?: string; /** * * @type {AccountHolderCategory} * @memberof AccountIdentity */ holder_category?: AccountHolderCategory | null; /** * Data returned by the financial institution about the account owner or owners. Only returned by Identity or Assets endpoints. For business accounts, the name reported may be either the name of the individual or the name of the business, depending on the institution; detecting whether the linked account is a business account is not currently supported. Multiple owners on a single account will be represented in the same `owner` object, not in multiple owner objects within the array. In API versions 2018-05-22 and earlier, the `owners` object is not returned, and instead identity information is returned in the top level `identity` object. For more details, see [Plaid API versioning](https://plaid.com/docs/api/versioning/#version-2019-05-29) * @type {Array<Owner>} * @memberof AccountIdentity */ owners: Array<Owner>; } /** * @export * @enum {string} */ export enum AccountIdentityVerificationStatusEnum { AutomaticallyVerified = 'automatically_verified', PendingAutomaticVerification = 'pending_automatic_verification', PendingManualVerification = 'pending_manual_verification', Unsent = 'unsent', ManuallyVerified = 'manually_verified', VerificationExpired = 'verification_expired', VerificationFailed = 'verification_failed', DatabaseMatched = 'database_matched', DatabaseInsightsPass = 'database_insights_pass', DatabaseInsightsPassWithCaution = 'database_insights_pass_with_caution', DatabaseInsightsFail = 'database_insights_fail' } /** * * @export * @interface AccountIdentityAllOf */ export interface AccountIdentityAllOf { /** * Data returned by the financial institution about the account owner or owners. Only returned by Identity or Assets endpoints. For business accounts, the name reported may be either the name of the individual or the name of the business, depending on the institution; detecting whether the linked account is a business account is not currently supported. Multiple owners on a single account will be represented in the same `owner` object, not in multiple owner objects within the array. In API versions 2018-05-22 and earlier, the `owners` object is not returned, and instead identity information is returned in the top level `identity` object. For more details, see [Plaid API versioning](https://plaid.com/docs/api/versioning/#version-2019-05-29) * @type {Array<Owner>} * @memberof AccountIdentityAllOf */ owners: Array<Owner>; } /** * Identity information about an account * @export * @interface AccountIdentityDocumentUpload */ export interface AccountIdentityDocumentUpload { /** * Plaid’s unique identifier for the account. This value will not change unless Plaid can\'t reconcile the account with the data returned by the financial institution. This may occur, for example, when the name of the account changes. If this happens a new `account_id` will be assigned to the account. The `account_id` can also change if the `access_token` is deleted and the same credentials that were used to generate that `access_token` are used to generate a new `access_token` on a later date. In that case, the new `account_id` will be different from the old `account_id`. If an account with a specific `account_id` disappears instead of changing, the account is likely closed. Closed accounts are not returned by the Plaid API. When using a CRA endpoint (an endpoint associated with Plaid Check Consumer Report, i.e. any endpoint beginning with `/cra/`), the `account_id` returned will not match the `account_id` returned by a non-CRA endpoint. Like all Plaid identifiers, the `account_id` is case sensitive. * @type {string} * @memberof AccountIdentityDocumentUpload */ account_id: string; /** * * @type {AccountBalance} * @memberof AccountIdentityDocumentUpload */ balances: AccountBalance; /** * The last 2-4 alphanumeric characters of either the account’s displayed mask or the account’s official account number. Note that the mask may be non-unique between an Item’s accounts. * @type {string} * @memberof AccountIdentityDocumentUpload */ mask: string | null; /** * The name of the account, either assigned by the user or by the financial institution itself * @type {string} * @memberof AccountIdentityDocumentUpload */ name: string; /** * The official name of the account as given by the financial institution * @type {string} * @memberof AccountIdentityDocumentUpload */ official_name: string | null; /** * * @type {AccountType} * @memberof AccountIdentityDocumentUpload */ type: AccountType; /** * * @type {AccountSubtype} * @memberof AccountIdentityDocumentUpload */ subtype: AccountSubtype | null; /** * The current verification status of an Auth Item initiated through micro-deposits or database verification. Returned for Auth Items only. `pending_automatic_verification`: The Item is pending automatic verification `pending_manual_verification`: The Item is pending manual micro-deposit verification. Items remain in this state until the user successfully verifies the micro-deposit. `automatically_verified`: The Item has successfully been automatically verified `manually_verified`: The Item has successfully been manually verified `verification_expired`: Plaid was unable to automatically verify the deposit within 7 calendar days and will no longer attempt to validate the Item. Users may retry by submitting their information again through Link. `verification_failed`: The Item failed manual micro-deposit verification because the user exhausted all 3 verification attempts. Users may retry by submitting their information again through Link. `unsent`: The Item is pending micro-deposit verification, but Plaid has not yet sent the micro-deposit. `database_matched`: The Item has successfully been verified using Plaid\'s data sources. Only returned for Auth Items created via Database Match. `database_insights_pass`: The Item\'s numbers have been verified using Plaid\'s data sources: the routing and account number match a routing and account number of an account recognized on the Plaid network, and the account is not known by Plaid to be frozen or closed. Only returned for Auth Items created via Database Auth. `database_insights_pass_with_caution`:The Item\'s numbers have been verified using Plaid\'s data sources and have some signal for being valid: the routing and account number were not recognized on the Plaid network, but the routing number is valid and the account number is a potential valid account number for that routing number. Only returned for Auth Items created via Database Auth. `database_insights_fail`: The Item\'s numbers have been verified using Plaid\'s data sources and have signal for being invalid and/or have no signal for being valid. Typically this indicates that the routing number is invalid, the account number does not match the account number format associated with the routing number, or the account has been reported as closed or frozen. Only returned for Auth Items created via Database Auth. * @type {string} * @memberof AccountIdentityDocumentUpload */ verification_status?: AccountIdentityDocumentUploadVerificationStatusEnum; /** * The account holder name that was used for micro-deposit and/or database verification. Only returned for Auth Items created via micro-deposit or database verification. This name was manually-entered by the user during Link, unless it was otherwise provided via the `user.legal_name` request field in `/link/token/create` for the Link session that created the Item. * @type {string} * @memberof AccountIdentityDocumentUpload */ verification_name?: string; /** * * @type {AccountVerificationInsights} * @memberof AccountIdentityDocumentUpload */ verification_insights?: AccountVerificationInsights; /** * A unique and persistent identifier for accounts that can be used to trace multiple instances of the same account across different Items for depository accounts. This field is currently supported only for Items at institutions that use Tokenized Account Numbers (i.e., Chase and PNC, and in May 2025 US Bank). Because these accounts have a different account number each time they are linked, this field may be used instead of the account number to uniquely identify an account across multiple Items for payments use cases, helping to reduce duplicate Items or attempted fraud. In Sandbox, this field is populated for TAN-based institutions (`ins_56`, `ins_13`) as well as the OAuth Sandbox institution (`ins_127287`); in Production, it will only be populated for accounts at applicable institutions. * @type {string} * @memberof AccountIdentityDocumentUpload */ persistent_account_id?: string; /** * * @type {AccountHolderCategory} * @memberof AccountIdentityDocumentUpload */ holder_category?: AccountHolderCategory | null; /** * Data returned by the financial institution about the account owner or owners. Only returned by Identity or Assets endpoints. For business accounts, the name reported may be either the name of the individual or the name of the business, depending on the institution; detecting whether the linked account is a business account is not currently supported. Multiple owners on a single account will be represented in the same `owner` object, not in multiple owner objects within the array. In API versions 2018-05-22 and earlier, the `owners` object is not returned, and instead identity information is returned in the top level `identity` object. For more details, see [Plaid API versioning](https://plaid.com/docs/api/versioning/#version-2019-05-29) * @type {Array<Owner>} * @memberof AccountIdentityDocumentUpload */ owners: Array<Owner>; /** * Data about the documents that were uploaded as proof of account ownership. * @type {Array<IdentityDocumentUpload>} * @memberof AccountIdentityDocumentUpload */ documents?: Array<IdentityDocumentUpload> | null; } /** * @export