Loading Settler...
Loading Settler...
Loading documentation...
Production-grade TypeScript SDK with full type safety, automatic retries, and more.
Complete type inference and IntelliSense
Exponential backoff with configurable retry logic
Prevents duplicate in-flight requests
<50KB minified and gzipped
Install the SDK using your preferred package manager
npm install @settler/sdk
# or
yarn add @settler/sdk
# or
pnpm add @settler/sdkReview the package quickstart
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 },
],
},
});
// eslint-disable-next-line no-console
console.log('Job created:', job.data.id);Common use cases and patterns
// Iterate over all jobs
for await (const job of client.jobs.listPaginated()) {
// eslint-disable-next-line no-console
console.log(job.name);
}
// Or collect all at once
import { collectPaginated } from '@settler/sdk';
const allJobs = await collectPaginated(client.jobs.listPaginated());Complete API documentation
Complete documentation for all SDK methods and types