Skip to main content
Official SDK
TypeScript
Node.js 18+

Node.js/TypeScript SDK

Production-grade TypeScript SDK with full type safety, automatic retries, and more.

Full TypeScript Support

Complete type inference and IntelliSense

Automatic Retries

Exponential backoff with configurable retry logic

Request Deduplication

Prevents duplicate in-flight requests

Small Bundle

<50KB minified and gzipped

Installation

Install the SDK using your preferred package manager

npm install @settler/sdk
# or
yarn add @settler/sdk
# or
pnpm add @settler/sdk

Quick Start

Get started in 5 minutes

import { SettlerClient } from '@settler/sdk';

const client = new SettlerClient({
  apiKey: 'sk_your_api_key_here',
});

// Create a reconciliation job
const job = await client.jobs.create({
  name: 'Shopify-Stripe Reconciliation',
  source: {
    adapter: 'shopify',
    config: {
      apiKey: process.env.SHOPIFY_API_KEY,
      shopDomain: 'your-shop.myshopify.com',
    },
  },
  target: {
    adapter: 'stripe',
    config: {
      apiKey: process.env.STRIPE_SECRET_KEY,
    },
  },
  rules: {
    matching: [
      { field: 'order_id', type: 'exact' },
      { field: 'amount', type: 'exact', tolerance: 0.01 },
    ],
  },
});

console.log('Job created:', job.data.id);

Examples

Common use cases and patterns

// Iterate over all jobs
for await (const job of client.jobs.listPaginated()) {
  console.log(job.name);
}

// Or collect all at once
import { collectPaginated } from '@settler/sdk';
const allJobs = await collectPaginated(client.jobs.listPaginated());

API Reference

Complete API documentation

Full API Reference

Complete documentation for all SDK methods and types

View on GitHub