SDKs & LibrariesSDK Overview
SDK v1.4Enterprise DX
SDK Overview
Official xaqiiji-sdk npm package and REST guides aligned with the live Xaqiiji API.
SDK status
The official xaqiiji-sdk package is published on npm. Install with npm install xaqiiji-sdk — works in Node.js 18+ and any runtime with fetch.
Install
npm
npm install xaqiiji-sdkQuick example
TypeScript
import { Xaqiiji } from "xaqiiji-sdk";const client = new Xaqiiji({ apiKey: process.env.XAQIIJI_API_KEY!, environment: "test", // use "live" with xq_live_* keys});const result = await client.verify.citizen( { nationalId: "12345678901", purpose: "pre_employment", }, { idempotencyKey: "verify-2026-06-02-001" },);console.log(result.result); // verified | not_found | expired | ...console.log(result.reference); // certificate reference numberconsole.log(result.isCached); // true when replayed within idempotency windowconsole.log(result.citizen?.fullName);What the SDK covers
The published SDK supports API-key authentication for verify.citizen(), verify.business(), verify.list(), billing.getBalance(), billing.listTransactions(), and billing.listPackages(). API key CRUD and Stripe checkout require a portal session and throw XaqiijiPortalSessionError. Simulated EVC checkout is not exposed on the SDK. Both xq_test_* and xq_live_* keys deduct credits on definitive verifications.
SDK Features
xaqiiji-sdk on npm (v1.0.0)
Verify Citizen (live)
List Verifications (live)
Bearer API Key Auth
Idempotency Keys
Typed SDK Errors
Automatic 503 Retries
OpenAPI 3.1 Contract
Guides
OpenAPI contract
Generate additional clients from the live spec at /api/v1/docs/openapi.json, or use xaqiiji-sdk for JavaScript and TypeScript today.
Edit this page
Was this page helpful?