TypeScript SDK
Install and start using the TypeScript SDK.
Intro
The The Plaid API SDK provides access to the The Plaid API REST APIs.
The Plaid REST API. Please see https://plaid.com/docs/api for more details.
Installation
To add the SDK to your project from npm:
npm install apimatic-plaid-sdkTo install from the SDK source instead, compile it to dist/ — run its build script once in the SDK folder — then add it to your project by path:
npm install <path-to-sdk>Quick Start
Create one client and reuse it. Configure its behaviour through ClientOptions.
import { ServerEnvironment, ThePlaidApiClient } from "apimatic-plaid-sdk";
const client = new ThePlaidApiClient({
serverEnvironment: ServerEnvironment.Production,
plaidClientId: "YOUR_API_KEY",
plaidSecret: "YOUR_API_KEY",
plaidVersion: "YOUR_API_KEY",
});Nothing in ClientOptions is required — new ThePlaidApiClient() compiles — and each option left out falls back to its default. serverEnvironment is spelled out above so the environment a call reaches is visible where the client is built rather than inherited silently.
From CommonJS
The package ships both dialects from a single entry, so require works with full types. In a TypeScript CommonJS file use the import ... = require(...) form — a plain destructuring require runs fine but gives you any.
import sdk = require("apimatic-plaid-sdk");
const client = new sdk.ThePlaidApiClient({
serverEnvironment: sdk.ServerEnvironment.Production,
plaidClientId: "YOUR_API_KEY",
plaidSecret: "YOUR_API_KEY",
plaidVersion: "YOUR_API_KEY",
});
