# E-Invoice JSON Payload Generator for the GST IRP

> Source: https://netray.co/tools/e-invoice-irp-json-payload-generator-india
> Publisher: Netray (netray.co), AI and integration engineering for ERP and manufacturing systems.
> Section: Free Tools

## Short answer

Fill in the seller, buyer, document and one item line to generate the e-invoice JSON structure (INV-01 schema style) that an ERP sends to the Invoice Registration Portal.

## Category

regional

## Region

India

## Audience

- ERP developer
- GST accountant
- Finance controller

## Tool

**Kind:** template

**Output:** code

**Language:** json

**Fields:**

#### Invoice number

**Key:** doc_no

**Type:** text

**Default:** INV/26-27/00418

#### Invoice date (dd/mm/yyyy)

**Key:** doc_date

**Type:** text

**Default:** 19/10/2026

#### Supply type

**Key:** supply_type

**Type:** select

**Options:**

- B2B
- SEZWP
- SEZWOP
- EXPWP
- EXPWOP
- DEXP

**Default:** B2B

#### Seller GSTIN

**Key:** s_gstin

**Type:** text

**Default:** 29ABCDE1234F1Z5

#### Seller legal name

**Key:** s_name

**Type:** text

**Default:** Acme Precision Components Pvt Ltd

#### Seller address line

**Key:** s_addr

**Type:** text

**Default:** Plot 12, Peenya Industrial Area

#### Seller location

**Key:** s_loc

**Type:** text

**Default:** Bengaluru

#### Seller PIN code

**Key:** s_pin

**Type:** text

**Default:** 560058

#### Seller state code

**Key:** s_state

**Type:** text

**Default:** 29

#### Buyer GSTIN

**Key:** b_gstin

**Type:** text

**Default:** 33AAAAA0000A1Z5

#### Buyer legal name

**Key:** b_name

**Type:** text

**Default:** Southern Drives Ltd

#### Place of supply state code

**Key:** b_pos

**Type:** text

**Default:** 33

#### Buyer address line

**Key:** b_addr

**Type:** text

**Default:** 14 SIDCO Estate

#### Buyer location

**Key:** b_loc

**Type:** text

**Default:** Chennai

#### Buyer PIN code

**Key:** b_pin

**Type:** text

**Default:** 600032

#### Item description

**Key:** desc

**Type:** text

**Default:** Bearing housing, machined

#### HSN code

**Key:** hsn

**Type:** text

**Default:** 84829900

#### Quantity

**Key:** qty

**Type:** number

**Default:** 250

#### Unit price (Rs)

**Key:** unit_price

**Type:** number

**Default:** 740

#### GST rate (%)

**Key:** gst_rate

**Type:** number

**Default:** 18

**Blocks:**

#### E-invoice JSON for an inter-state B2B sale (IGST)

**Body:** {
  "Version": "1.1",
  "TranDtls": {
    "TaxSch": "GST",
    "SupTyp": "{{supply_type}}",
    "RegRev": "N",
    "IgstOnIntra": "N"
  },
  "DocDtls": {
    "Typ": "INV",
    "No": "{{doc_no}}",
    "Dt": "{{doc_date}}"
  },
  "SellerDtls": {
    "Gstin": "{{s_gstin}}",
    "LglNm": "{{s_name}}",
    "Addr1": "{{s_addr}}",
    "Loc": "{{s_loc}}",
    "Pin": {{s_pin}},
    "Stcd": "{{s_state}}"
  },
  "BuyerDtls": {
    "Gstin": "{{b_gstin}}",
    "LglNm": "{{b_name}}",
    "Pos": "{{b_pos}}",
    "Addr1": "{{b_addr}}",
    "Loc": "{{b_loc}}",
    "Pin": {{b_pin}},
    "Stcd": "{{b_pos}}"
  },
  "ItemList": [
    {
      "SlNo": "1",
      "PrdDesc": "{{desc}}",
      "IsServc": "N",
      "HsnCd": "{{hsn}}",
      "Qty": {{qty}},
      "Unit": "NOS",
      "UnitPrice": {{unit_price}},
      "TotAmt": 0,
      "AssAmt": 0,
      "GstRt": {{gst_rate}},
      "IgstAmt": 0,
      "CgstAmt": 0,
      "SgstAmt": 0,
      "TotItemVal": 0
    }
  ],
  "ValDtls": {
    "AssVal": 0,
    "CgstVal": 0,
    "SgstVal": 0,
    "IgstVal": 0,
    "TotInvVal": 0
  }
}

#### Fill the computed amounts

**Body:** The amount fields are shown as zero on purpose. Compute them in your ERP: TotAmt is quantity times unit price, AssAmt is TotAmt less discount, the tax amounts are AssAmt times the rate (IGST for inter-state, or CGST and SGST halves for intra-state), and TotItemVal adds them. ValDtls sums the items, and TotInvVal includes round-off and other charges.

**Notes:** Follows the commonly published structure of the e-invoice schema (version 1.1). Mandatory and optional fields, enumerations and length limits can change. Validate against the current schema from the e-invoice portal before sending any real document. Not for production without testing in the sandbox.

## Content

**Intro:** E-invoicing in India means an ERP sends a JSON payload to the Invoice Registration Portal (IRP), which returns an Invoice Reference Number (IRN), a signed QR code and the signed JSON. This generator shows the shape of that payload so developers and finance teams can see what each section needs.

**Sections:**

#### How to use it

**Body:** Choose the supply type, enter the seller and buyer, add one item, then copy the JSON. Use it as a reference when mapping your ERP billing document to the schema. For more items, repeat the object in ItemList with the next SlNo. The tool does not call the portal. Test real payloads in the sandbox that the e-invoice system provides.

#### What each block carries

**Body:** TranDtls says what kind of transaction it is, including the tax scheme, the supply type and whether reverse charge applies. DocDtls has the type, number and date. SellerDtls and BuyerDtls hold GSTIN, legal name, address, PIN and state code, and the buyer also has the place of supply. ItemList holds the lines, and ValDtls gives the invoice totals. The IRP checks the totals against the lines.

**Bullets:**

- SupTyp B2B, SEZ and export variants change validation
- Pos must match the tax type used
- Pin must be consistent with the state code

#### Common rejections

**Body:** The IRP rejects documents when the invoice number has more than 16 characters or unsupported symbols, when the document is a duplicate, when the GSTIN is not valid or not active, when the date is wrong, and when the totals do not reconcile within the tolerance it allows. Keep invoice numbering within the allowed length and character set, and test the round-off logic.

#### ERP notes

**Body:** Most ERP vendors and GST suites provide a connector to the IRP, either directly or through a GST Suvidha Provider. Use this generator to verify what your connector sends. Store the returned IRN and acknowledgement number on the billing document, because credit notes and cancellations refer to them.

**Cta:** If your e-invoice posting fails often or needs manual clean-up, we can help review the payload mapping and add checks before submission.

**Faq:**

#### Who must issue e-invoices?

**Answer:** Registered persons whose aggregate turnover crosses the notified threshold in any year since 2017-18, with some exceptions. The threshold has been lowered in steps, so check the latest notification for your turnover and class of taxpayer.

#### Is the IRN generated by my ERP?

**Answer:** No. The IRN is generated by the IRP as a hash of key fields, and the portal returns it with a signed QR code. Your ERP creates the JSON and stores the response. Print the QR code on the invoice as required.

#### Can I cancel an e-invoice?

**Answer:** Cancellation is allowed within a short time limit after generation and must be done through the portal or the API. After that, use a credit note. Check the current time limit and whether an e-way bill was already generated on the invoice.

#### Do credit notes need e-invoicing?

**Answer:** Yes, credit and debit notes are reported on the IRP like invoices when the taxpayer is covered. Use the document type CRN or DBN in DocDtls, and refer to the original invoice in the reference section of the schema.

## Search terms

e-invoice json format, e-invoice schema inv-01, irp json payload sample, e-invoice api json, e-invoice json generator, einvoice json for erp, e-invoice sellerdtls buyerdtls, gst e-invoice json example

---
Talk to an engineer: https://netray.co/contact?intent=erp_ai | Machine catalog: https://netray.co/agent/catalog.json
