Skip to content

Packages

Getting started

Packages

Merchant HTTP client (@fiscal402/node), verify, and CLI. They do not contain the tax engine. They are not published to npm yet.

Public surface vs private engine

Fiscal402’s interoperability primitive is fiscal402.receipt. The public packages verify and transport that object. They do not classify VAT, look up FX, or sign receipts. Signing and tax stay in the proprietary backend.

packages/

source clients (not on npm)
  @fiscal402/node      Fiscal402.recordSettlement → POST /settlements
  @fiscal402/express   post-settlement middleware
  @fiscal402/verify    verifyReceipt + CLI

NOT in these packages:
  EU VAT engine
  VIES orchestration
  FX oracles
  Ed25519 signing keys
  settlement ingest implementation

Publication status

PackageRolenpm
HTTP POST /settlementsproduction merchant ingestn/a
@fiscal402/noderecordSettlement source clientnot published
@fiscal402/expresspost-settlement Express middlewarenot published
@fiscal402/verifylocal receipt verifier + CLInot published

f402

f402 verify takes a receipt file, optional UBL bytes, and JWKS. A transaction hash is rejected — Fiscal402 does not fiscalize a hash. Exit 0 means VERIFIED, 1 means verification failure, 2 means invalid invocation.

loading example bundle…

SDK

Fiscal402.recordSettlement submits POST /settlements. It does not run the tax engine locally. A raw transaction hash is rejected. The package is not on npm.

sdk.ts

import { Fiscal402 } from "@fiscal402/node"; // source only — not on npm

const fiscal = new Fiscal402({
  apiKey: process.env.FISCAL402_API_KEY!,
  origin: process.env.FISCAL402_ORIGIN ?? "https://api.fiscal402.com",
});

const result = await fiscal.recordSettlement({
  amountUsdc: "1.00",
  txHash: "0xYOUR_SETTLED_TX",
  timestamp: "2026-09-10T12:00:00.000Z",
  payerWallet: "0xPAYER",
  receiverWallet: "0xPAY_TO",
  network: "eip155:1",
  buyer: { country: "DE", legalName: "Buyer GmbH" },
  supply: { kind: "digital", description: "Inference units" },
  idempotencyKey: "acme-nl-de-1",
});

console.log(result.id, result.reviewStatus);

What adding a rail or jurisdiction does not change

  • verifyReceipt still verifies the same receipt bytes.
  • The CLI still verifies files.
  • Tax engines stay out of the public packages.