gstin-validator

Module to validate GSTIN and verify Signed QR of GST eInvoice

Usage no npm install needed!

<script type="module">
  import gstinValidator from 'https://cdn.skypack.dev/gstin-validator';
</script>

README

GSTIN Validator

  • Validates GSTIN number for length (15 digits), format (State code, PAN, Entity Number, Z, Checksum) and checksum as per the algorithm published at GSTN portal
  • Verifies Signed QR of eInvoices and returns invoice data of both signed QR of e-invoice as well as signed e-invoice data.

build coverage npm Codacy Badge Gitpod ready-to-code

Installation

  npm install gstin-validator

Use

  var validator = require('gstin-validator');
  validator.isValidGSTNumber('12AAACI1681G1Z0');
  validator.ValidateGSTIN('47AAACI1681G1Z0');
  validator.getGSTINInfo('12AAACI1681G1Z0');
  validator.validateSignedInvoice('SignedInvoiceString');
  validator.validateEInvoiceSignedQR('SignedQROfEInvoice');

Test

  npm test
  npm run test-coverage