indian-gst-einvoice

Calculates Indian GST breakdowns, validates GSTINs, and submits e-Invoices to the IRP API.

Updated Mar 31, 2026
One-click install
npx skills add https://github.com/gengirish/dropflow --skill indian-gst-einvoice-gengirish
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: indian-gst-einvoice
Source: https://github.com/gengirish/dropflow/tree/main/.cursor/skills/indian-gst-einvoice
Command: npx skills add https://github.com/gengirish/dropflow --skill indian-gst-einvoice-gengirish

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Building India-compliant invoicing requires correct GST tax computation (CGST/SGST vs IGST), GSTIN format and checksum validation, and integration with the government IRP e-Invoice API, all of which are error-prone to implement from scratch. ## Core Features & Use Cases - GST Calculation Engine: Computes intra-state (CGST+SGST 50/50 split) and inter-state (IGST) tax breakdowns in integer paise, with export/LUT zero-rating and HSN-code-based rate lookup. - GSTIN Validation: Validates the 15-character GSTIN format, state codes (01-37), and the mod-36 checksum before storing taxpayer IDs. - e-Invoice IRP Integration: Authenticates against the NIC IRP REST API and generates IRNs with signed invoices and QR codes, with sandbox and production endpoints. - Use Case: When a customer places an order on DropFlow, calculate the exact GST breakdown from the HSN code and buyer/seller state codes, validate the buyer's GSTIN, and submit the invoice to the IRP to obtain an IRN. ## Quick Start Ask the AI to calculate the GST breakdown for an order with a given subtotal, HSN code, and seller and buyer state codes using the packages/gst module.

Frequently Asked Questions about indian-gst-einvoice

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I calculate GST for intra-state vs inter-state transactions in India?▼

Compare the seller and buyer state codes: if equal, split the HSN rate 50/50 into CGST and SGST; if different, apply the full rate as IGST. All arithmetic uses integer paise with Math.round to avoid floating-point errors.

How to validate a GSTIN number in TypeScript?▼

Validate the 15-character format with a regex, check the state code is between 01 and 37, then verify the mod-36 checksum over the first 14 characters against the final check character before storing the GSTIN.

How do I generate an e-Invoice IRN using the NIC IRP API?▼

Authenticate via the /eivital/v1.04/auth endpoint with GSTIN and credentials to get an AuthToken, then POST the invoice payload to /eicore/v1.03/Invoice to receive the IRN, signed invoice, and signed QR code.

Does the IRP integration support a sandbox environment for testing?▼

Yes, use https://einv-apisandbox.nic.in during development and switch to https://einv-api.nic.in for production via environment configuration. Credentials are supplied through environment variables.

Why does my GST calculation have rounding mismatches on odd amounts?▼

Odd paise amounts cause the CGST/SGST 50/50 split to round unevenly. The convention is that CGST plus SGST must exactly equal the full-rate amount, with the rounding difference assigned to SGST.