Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.swippee.com/llms.txt

Use this file to discover all available pages before exploring further.

Swippee ships two official packages. Both are MIT-licensed, have zero runtime dependencies, and work in Node 18+ and modern browsers.

@swippee/sdk

TypeScript client for the whole API — parse, products, enrichment, banks, data. Use it server-side with your secret key.

@swippee/connect-react

React component for the hosted Connect consent flow. Use it in the browser.

@swippee/sdk — API client

npm install @swippee/sdk
import { Swippee } from "@swippee/sdk";

const swippee = new Swippee({ apiKey: process.env.SWIPPEE_SECRET_KEY! });

// Parse a bank statement PDF
const report = await swippee.parse({ file: pdfBlob, bank: "NABIL" });
console.log(report.statement.bank, report.transactions.length);
The SDK uses your secret key — keep it server-side, never ship it to the browser.

@swippee/connect-react — hosted Connect

npm install @swippee/connect-react
The consumer authenticates and consents in a Swippee-hosted popup; your app never sees their statement or login. On approval you get a public_token to exchange on your server.
import { SwippeeConnect } from "@swippee/connect-react";

<SwippeeConnect
  // your backend: POST /v1/connect/request → { connect_url }
  createRequest={() => fetch("/api/connect-request").then((r) => r.json())}
  onHostedSuccess={({ publicToken }) => exchangeOnYourServer(publicToken)}
  onExit={(info) => console.log("closed:", info.reason)}
/>
Prefer your own trigger? Use the headless hook:
import { useSwippeeConnect } from "@swippee/connect-react";

const { open } = useSwippeeConnect({
  createRequest: () => fetch("/api/connect-request").then((r) => r.json()),
  onHostedSuccess: ({ publicToken }) => exchangeOnYourServer(publicToken),
});
// <MyButton onClick={open}>Connect bank</MyButton>
No bundler? The same hosted flow is available as a plain <script> drop-in — see the Connect guide.