Production Ready

JavaScript SDK Now Available

Install from npm and start building tax intelligence into your apps today. 23 tests passing, 60.6% coverage.

JavaScript / TypeScript SDK

Build with Node.js

Official JavaScript/TypeScript SDK for integrating Taxu into your Node.js, React, Next.js, or any JavaScript application.

Installation

npm
npm install @taxu/taxu-js

Latest version: v1.0.0 | View changelog

Quick Start

import { TaxuClient } from '@taxu/taxu-js';

const taxu = new TaxuClient({
  apiKey: process.env.TAXU_API_KEY,
  environment: 'production' // or 'sandbox'
});

// Estimate refund
const estimate = await taxu.refunds.estimate({
  income: 75000,
  filingStatus: 'single',
  deductions: ['standard']
});

console.log(`Estimated refund: $${estimate.amount}`);

Core Features

Tax Returns

// Create a new tax return
const taxReturn = await taxu.returns.create({
  userId: 'user_123',
  taxYear: 2024,
  filingStatus: 'married_jointly'
});

// Add income
await taxu.returns.addIncome(taxReturn.id, {
  type: 'W2',
  employer: 'Acme Corp',
  amount: 85000
});

// File the return
const filed = await taxu.returns.file(taxReturn.id);

Document Upload

// Upload and parse documents
const document = await taxu.documents.upload({
  file: fs.createReadStream('./w2.pdf'),
  type: 'W2',
  returnId: 'ret_abc123'
});

// Get parsed data
console.log(document.parsed);
// { employer: 'Acme Corp', wages: 85000, ... }

Webhooks

// Verify webhook signature
app.post('/webhooks/taxu', (req, res) => {
  const signature = req.headers['taxu-signature'];
  
  const event = taxu.webhooks.verify(
    req.body,
    signature
  );
  
  switch (event.type) {
    case 'return.filed':
      console.log('Return filed:', event.data);
      break;
    case 'refund.issued':
      console.log('Refund issued:', event.data);
      break;
  }
  
  res.json({ received: true });
});

TypeScript Support

Fully Typed

The SDK includes complete TypeScript definitions with IntelliSense support for all methods, parameters, and return types.

import { TaxuClient, TaxReturn, FilingStatus } from '@taxu/taxu-js';

const taxu = new TaxuClient({ apiKey: process.env.TAXU_API_KEY });

const status: FilingStatus = 'single';
const taxReturn: TaxReturn = await taxu.returns.create({
  userId: 'user_123',
  taxYear: 2024,
  filingStatus: status
});

Next Steps

API Reference

Complete documentation of all SDK methods

GitHub Repository

Source code, issues, and contributions

Example Apps

Full working examples and templates