Developer ToolsFree generatorPDF, Excel, Word exportAny ERPManufacturingIndia

GST E-Invoice JSON Payload Generator for IRP Testing

To report an invoice to the Invoice Registration Portal, your ERP sends a JSON file with seller, buyer, item and value blocks. This generator produces a clean skeleton that you can compare with your own connector output.

Fill in

Maximum 16 characters.

Sample value only.

Sample value only.

Quantity x unit price less discount.

Use 0 for intra-state and fill CGST and SGST instead.

Generated code
Download:

Sample e-invoice payload

{
  "Version": "1.1",
  "TranDtls": {
    "TaxSch": "GST",
    "SupTyp": "B2B",
    "RegRev": "N",
    "IgstOnIntra": "N"
  },
  "DocDtls": {
    "Typ": "INV",
    "No": "INV/26-27/00421",
    "Dt": "20/10/2026"
  },
  "SellerDtls": {
    "Gstin": "27AAAAA0000A1Z5",
    "LglNm": "Sample Precision Components Pvt Ltd",
    "Addr1": "Plant address line",
    "Loc": "Location",
    "Pin": 411019,
    "Stcd": "27"
  },
  "BuyerDtls": {
    "Gstin": "29BBBBB1111B1Z6",
    "LglNm": "Sample Aerospace Systems Ltd",
    "Pos": "29",
    "Addr1": "Buyer address line",
    "Loc": "Location",
    "Pin": 560100,
    "Stcd": "29"
  },
  "ItemList": [
    {
      "SlNo": "1",
      "PrdDesc": "Machined aluminium housing",
      "IsServc": "N",
      "HsnCd": "88033000",
      "Qty": 100,
      "Unit": "NOS",
      "UnitPrice": 2500,
      "TotAmt": 250000,
      "Discount": 0,
      "AssAmt": 250000,
      "GstRt": 18,
      "IgstAmt": 45000,
      "CgstAmt": 0,
      "SgstAmt": 0,
      "TotItemVal": 295000
    }
  ],
  "ValDtls": {
    "AssVal": 250000,
    "CgstVal": 0,
    "SgstVal": 0,
    "IgstVal": 45000,
    "TotInvVal": 295000
  }
}

Mapping notes

SellerDtls and BuyerDtls come from the company and customer masters. ItemList repeats once per invoice line. ValDtls must equal the sum of the line values within the rounding tolerance the IRP accepts. Add optional blocks (DispDtls, ShipDtls, PayDtls, RefDtls, EwbDtls) when your process needs them.

Starting point only. Field names, mandatory rules and schema versions are published by the GST e-invoice system and are updated periodically. Validate against the current schema and test in the IRP sandbox before production. Sample GSTINs are not real.

Want the ERP mapping reviewed?

An optional review of your invoice-to-JSON mapping against common IRP validation failures.

Optional. The tool and every export work without this. No spam.

How to use the generator

Fill the fields with sample values from a real test invoice, or leave the defaults. The generated JSON follows the block structure used by the e-invoice schema: transaction details, document details, seller, buyer, item list and value details. Copy the output into a test file, validate it with the offline tool or the sandbox API, and use it as the reference when you map ERP tables to JSON keys. Change intra-state versus inter-state tax fields by moving amounts between IGST and CGST plus SGST.

How the payload is organised

TranDtls carries the tax scheme, supply type and reverse charge flag. DocDtls holds the document type, number and date in DD/MM/YYYY format. SellerDtls and BuyerDtls hold GSTIN, legal name, address, pincode and state code, with Pos (place of supply) on the buyer side. ItemList holds one object per line with HSN, quantity, unit, price, assessable value, rate and tax amounts. ValDtls holds the invoice totals.

  • Document number is limited to 16 characters
  • Dates in the payload use DD/MM/YYYY
  • HSN is mandatory at line level
  • Totals in ValDtls must reconcile to item values

Common mistakes

Developers frequently send amounts with too many decimals, mismatch ValDtls against the sum of items, or use the wrong state code for the buyer when the ship-to address differs. Another common error is formatting the date as ISO. A third is sending IGST for a supply that is intra-state because the place of supply was copied from the bill-to rather than the correct state. Keep a unit test that loads this skeleton, replaces values from a real invoice, and compares the totals.

ERP notes

Map each JSON key to one source column and document it. For SAP, this usually means billing document header and item tables plus customer master fields. For Oracle, Infor and Dynamics, use the invoice header, lines and tax lines. Keep the mapping in a version-controlled sheet so changes to the schema can be tracked.

Frequently Asked Questions

Is this JSON valid for production use?

It is a skeleton for learning and testing. Mandatory fields, validations and schema versions are controlled by the GST e-invoice system and change over time. Validate with the offline tool or the sandbox before sending anything to production.

Which date format does the IRP expect?

The document date in the payload uses DD/MM/YYYY. Many ERPs store dates in ISO format, so add a conversion step in the integration instead of editing the output by hand.

How do I handle multiple lines?

Repeat the object inside ItemList once per invoice line, increment SlNo, and make sure ValDtls equals the sum of the line values. The IRP checks totals against the items within a small rounding tolerance.

Do CGST and SGST appear together?

Yes, for intra-state supplies you fill CgstAmt and SgstAmt with equal amounts and set IgstAmt to zero. For inter-state supplies you fill IgstAmt and leave the other two as zero. The place of supply decides which applies.

Netray can help build and test the ERP-to-IRP mapping, including the exceptions report for invoices that failed validation.