The `plaid` package is the official Node.js client library for interacting with the Plaid API, providing programmatic access to financial data. Currently at version 42.1.0, the library is actively maintained with updates typically released on a monthly basis, aligning with Plaid API developments. It is generated directly from Plaid's OpenAPI schema, ensuring comprehensive coverage of the latest API version (specifically `2020-09-14`). A key differentiator is its direct support for various Plaid environments (sandbox, development, production) and its use of semantic versioning, with major version increments indicating potentially breaking changes. This client simplifies authentication and API request handling, abstracting the underlying HTTP requests and providing TypeScript type definitions for robust development.
npm install plaidVerified import paths — ran on the pinned version, not inferred.
This quickstart demonstrates how to initialize the Plaid client with API credentials and environment, then fetch a list of top institutions using the `institutionsGet` endpoint. It includes basic error handling and best practices for environment variables and API versioning.
Review the official Plaid client library changelog on GitHub and the API upgrade guide for specific migration instructions for your target version. Pay close attention to changes in model imports, enum usage, and request/response structures.
Always ensure your client library is updated to a recent version. Explicitly include `'Plaid-Version': '2020-09-14'` in your request headers via `baseOptions` during `Configuration` initialization to guarantee API version compatibility.
Only log specific parts of the error object, such as `error.response.data` for API-specific error details, and avoid logging `error.response.config.headers` or the entire `error` object.
Ensure all date and datetime strings sent in API requests precisely match the specified `YYYY-MM-DD` or `YYYY-MM-DDTHH:mm:ssZ` (ISO 8601) formats, including the 'Z' for UTC if applicable. For TypeScript, consider using helper functions or libraries to ensure correct formatting.
Verify that your `PLAID_CLIENT_ID` and `PLAID_SECRET` environment variables (or hardcoded values during development) exactly match your credentials from the Plaid Dashboard for the chosen environment (Sandbox, Development, or Production).
Switch to ES Module `import` statements: `import { Configuration, PlaidApi, PlaidEnvironments } from 'plaid';`. If you must use CommonJS, ensure your environment supports it correctly, or investigate if an older version of the library explicitly supported CommonJS exports.Review the specific endpoint documentation for the correct date format. Ensure all date parameters are formatted as `YYYY-MM-DD` strings. For datetimes, use `YYYY-MM-DDTHH:mm:ssZ`.
No dependency data recorded yet.