Generate IRN

You can generate an IRN by sending a PUT request to E-Invoicing API with the following request headers.

Taxpayers with AATO greater than or equal to 100 crores have to report the invoices to the IRP portal within 30 days of it's issuance from 1st November 2023.

Request URL

PUT: {{HOST}}/einv/v2/eInvoice/generate

Request Headers

Parameter
Data Type
Field Validations
Description

X-Cleartax-Auth-Token

String

NA

Mandatory. The auth token generated from ClearTax user id and password.

Content-Type

String

NA

Mandatory. This will always be "application/json" for JSON and "application/xml" for XML

Accept

String

NA

Optional. This will be "application/xml" if you want the response in XML.

gstin

String

NA

Mandatory. GSTIN number for the user

branch

String

NA

Optional. Branch name for the user.

Request Path Params

There are no path parameters for this API.

Request Query Params

Parameter
Data Type
Field Validations
Description

dryRun

Boolean

NA

Optional. If the flag is set to true, only ClearTax validations will run, however the EInvoice won’t be generated. Default - false

Request Body

This API accepts an array of E-Invoice Custom Objects as the request body. Maximum up to 10 Invoices can be sent in one request.

E-Invoice Custom Object

Parameter
Parameter Type
Validations

transaction

Object

Mandatory. E-Invoice Object.

custom_fields

Object

Max: 10

Optional. Key value pair of custom fields. You can send a maximum of 10 custom fields only.

Sample Request

[
  {
    "transaction": {
      "Version": "1.1",
      "TranDtls": {
        "TaxSch": "GST",
        "SupTyp": "B2B",
        "RegRev": "N",
        "EcmGstin": null,
        "IgstOnIntra": "N"
      },
      "DocDtls": {
        "Typ": "INV",
        "No": "IRNTEST/002",
        "Dt": "10/04/2023"
      },
      "SellerDtls": {
        "Gstin": "29AAFCD5862R000",
        "LglNm": "NIC Company Pvt Ltd",
        "TrdNm": "NIC Industries",
        "Addr1": "5th block, kuvempu layout",
        "Addr2": "kuvempu layout",
        "Loc": "GANDHINAGAR",
        "Pin": 560037,
        "Stcd": "29",
        "Ph": "9000000000",
        "Em": "abc@gmail.com"
      },
      "BuyerDtls": {
        "Gstin": "29AWGPV7107B1Z1",
        "LglNm": "XYZ Company Pvt Ltd",
        "TrdNm": "XYZ Industries",
        "Pos": "12",
        "Addr1": "7th block, kuvempu layout",
        "Addr2": "kuvempu layout",
        "Loc": "GANDHINAGAR",
        "Pin": 562160,
        "Stcd": "29",
        "Ph": "91111111111",
        "Em": "xyz@yahoo.com"
      },
      "DispDtls": {
        "Nm": "ABC company pvt ltd",
        "Addr1": "7th block, kuvempu layout",
        "Addr2": "kuvempu layout",
        "Loc": "Banagalore",
        "Pin": 562160,
        "Stcd": "29"
      },
      "ShipDtls": {
        "Gstin": "29AWGPV7107B1Z1",
        "LglNm": "CBE company pvt ltd",
        "TrdNm": "kuvempu layout",
        "Addr1": "7th block, kuvempu layout",
        "Addr2": "kuvempu layout",
        "Loc": "Banagalore",
        "Pin": 562160,
        "Stcd": "29"
      },
      "ItemList": [
        {
          "SlNo": "1",
          "PrdDesc": "Rice",
          "IsServc": "N",
          "HsnCd": "10019920",
          "Barcde": "123456",
          "Qty": 100.345,
          "FreeQty": 10,
          "Unit": "BAG",
          "UnitPrice": 99.545,
          "TotAmt": 9988.84,
          "Discount": 10,
          "PreTaxVal": 1,
          "AssAmt": 9978.84,
          "GstRt": 12.0,
          "IgstAmt": 1197.46,
          "CgstAmt": 0,
          "SgstAmt": 0,
          "CesRt": 5,
          "CesAmt": 498.94,
          "CesNonAdvlAmt": 10,
          "StateCesRt": 12,
          "StateCesAmt": 1197.46,
          "StateCesNonAdvlAmt": 5,
          "OthChrg": 10,
          "TotItemVal": 12897.7,
          "OrdLineRef": "3256",
          "OrgCntry": "AG",
          "PrdSlNo": "12345",
          "BchDtls": {
            "Nm": "123456",
            "ExpDt": "01/08/2020",
            "WrDt": "01/09/2020"
          },
          "AttribDtls": [
            {
              "Nm": "Rice",
              "Val": "10000"
            }
          ]
        }
      ],
      "ValDtls": {
        "AssVal": 9978.84,
        "CgstVal": 0,
        "SgstVal": 0,
        "IgstVal": 1197.46,
        "CesVal": 508.94,
        "StCesVal": 1202.46,
        "Discount": 10,
        "OthChrg": 20,
        "RndOffAmt": 0.3,
        "TotInvVal": 12908,
        "TotInvValFc": 12897.7
      },
      "PayDtls": {
        "Nm": "ABCDE",
        "AccDet": "5697389713210",
        "Mode": "Cash",
        "FinInsBr": "SBIN11000",
        "PayTerm": "100",
        "PayInstr": "Gift",
        "CrTrn": "test",
        "DirDr": "test",
        "CrDay": 100,
        "PaidAmt": 10000,
        "PaymtDue": 5000
      },
      "RefDtls": {
        "InvRm": "TEST",
        "DocPerdDtls": {
          "InvStDt": "01/08/2020",
          "InvEndDt": "01/09/2020"
        },
        "PrecDocDtls": [
          {
            "InvNo": "DOC/002",
            "InvDt": "01/08/2020",
            "OthRefNo": "123456"
          }
        ],
        "ContrDtls": [
          {
            "RecAdvRefr": "Doc/003",
            "RecAdvDt": "01/08/2020",
            "TendRefr": "Abc001",
            "ContrRefr": "Co123",
            "ExtRefr": "Yo456",
            "ProjRefr": "Doc-456",
            "PORefr": "Doc-789",
            "PORefDt": "01/08/2020"
          }
        ]
      },
      "AddlDocDtls": [
        {
          "Url": "https://einv-apisandbox.nic.in",
          "Docs": "Test Doc",
          "Info": "Document Test"
        }
      ],
      "ExpDtls": {
        "ShipBNo": "A-248",
        "ShipBDt": "01/08/2020",
        "Port": "INABG1",
        "RefClm": "N",
        "ForCur": "AED",
        "CntCode": "AE"
      },
      "EwbDtls": {
        "TransId": "12AWGPV7107B1Z1",
        "TransName": "XYZ EXPORTS",
        "Distance": 100,
        "TransDocNo": "Doc01",
        "TransDocDt": "10/04/2023",
        "VehNo": "ka123456",
        "VehType": "R",
        "TransMode": "1"
      }
    },
    "custom_fields": {
      "customfieldLable1": "CustomFieldValue1",
      "customfieldLable2": "CustomFieldValue2",
      "customfieldLable3": "CustomFieldValue3"
    }
  }
]

Sample Response

Success - (Dryrun = False)

[
    {
        "custom_fields": null,
        "deleted": false,
        "document_status": "IRN_GENERATED",
        "error_response": null,
        "errors": null,
        "govt_response": {
            "Success": "Y",
            "AckNo": 112310153714784,
            "AckDt": "2023-04-11 13:38:00",
            "Irn": "94b6c41efd740424c469908d0927db66d8f24d9dad78b02dab04ad1659813dc9",
            "SignedInvoice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aEj6RvvKM7LPdHYw4AMjtSjusqNWrvzH4w6-0liQKRETgmDGPeho9MLC6nOyBMoNXCuj5c3YYQcqq_AxtO-1DvPiwwO9XygZySLVw",
            "Status": "ACT",
            "EwbNo": 171010133427,
            "EwbDt": "2023-04-11 13:38:00",
            "EwbValidTill": "2023-04-12 23:59:00"
        },
        "group_id": null,
        "gstin": "29AAFCD5862R000",
        "is_deleted": false,
        "owner_id": null,
        "tag_identifier": null,
        "transaction": {
            "Version": "1.1",
            "TranDtls": {
                "TaxSch": "GST",
                "RegRev": "N",
                "SupTyp": "B2B"
            },
            "DocDtls": {
                "Typ": "INV",
                "No": "IRNTEST/002",
                "Dt": "10/04/2023"
            },
            "SellerDtls": {
                "Gstin": "29AAFCD5862R000",
                "LglNm": "NIC company pvt ltd",
                "TrdNm": "NIC Industries",
                "Addr1": "5th block, kuvempu layout",
                "Addr2": "kuvempu layout",
                "Loc": "BENGALURU",
                "Pin": 560103,
                "Stcd": "29"
            },
            "BuyerDtls": {
                "Gstin": "29AWGPV7107B1Z1",
                "LglNm": "XYZ company pvt ltd",
                "TrdNm": "XYZ Industries",
                "Pos": "29",
                "Addr1": "7th block, kuvempu layout",
                "Addr2": "kuvempu layout",
                "Loc": "BENGALURU",
                "Pin": 560105,
                "Stcd": "29"
            },
            "DispDtls": {
                "Nm": "ABC company pvt ltd",
                "Addr1": "7th block, kuvempu layout",
                "Addr2": "kuvempu layout",
                "Loc": "Banagalore",
                "Pin": 562160,
                "Stcd": "29"
            },
            "ShipDtls": {
                "Gstin": "29AWGPV7107B1Z1",
                "LglNm": "CBE company pvt ltd",
                "TrdNm": "kuvempu layout",
                "Addr1": "7th block, kuvempu layout",
                "Addr2": "kuvempu layout",
                "Loc": "Banagalore",
                "Pin": 562160,
                "Stcd": "29"
            },
            "ItemList": [
                {
                    "SlNo": "1",
                    "PrdDesc": "SERVICE CHARGES(SMART SUITES) ",
                    "IsServc": "N",
                    "HsnCd": "10019920",
                    "Qty": 1.000,
                    "FreeQty": 1.000,
                    "Unit": "OTH",
                    "UnitPrice": 100.000,
                    "TotAmt": 100.00,
                    "Discount": 0.00,
                    "AssAmt": 100.00,
                    "GstRt": 18.00,
                    "IgstAmt": 0.00,
                    "CgstAmt": 9.00,
                    "SgstAmt": 9.00,
                    "CesRt": 0.00,
                    "CesAmt": 0.00,
                    "CesNonAdvlAmt": 0.00,
                    "StateCesRt": 0.00,
                    "StateCesAmt": 0.00,
                    "StateCesNonAdvlAmt": 0.00,
                    "OthChrg": 0.00,
                    "TotItemVal": 118.00
                }
            ],
            "ValDtls": {
                "AssVal": 100.00,
                "CgstVal": 9.00,
                "SgstVal": 9.00,
                "IgstVal": 0.00,
                "CesVal": 0.00,
                "StCesVal": 0.00,
                "Discount": 0.00,
                "OthChrg": 0.00,
                "RndOffAmt": 0.00,
                "TotInvVal": 118.00,
                "TotInvValFc": 118.00
            },
            "EwbDtls": {
                "TransId": "12AWGPV7107B1Z1",
                "TransName": "XYZ EXPORTS",
                "TransMode": "1",
                "Distance": 100,
                "TransDocNo": "Doc01",
                "TransDocDt": "10/04/2023",
                "VehNo": "ka123456",
                "VehType": "R"
            }
        },
        "transaction_id": "29AAFCD5862R000_IRNTEST/002_INV_2023",
        "transaction_metadata": null
    }
]

Success - (Dryrun = True)

The parameter "Success" : "Y" denotes that the document has been successfully validated by ClearTax.

[
    {
        "custom_fields": null,
        "deleted": false,
        "document_status": "DOCUMENT_VALIDATION",
        "error_response": null,
        "errors": null,
        "govt_response": {
            "Success": "Y"
        },
        "group_id": null,
        "gstin": "24AAFCD5862R005",
        "is_deleted": false,
        "owner_id": null,
        "tag_identifier": null,
        "transaction": {
            "Version": "1.1",
            "TranDtls": {
                "TaxSch": "GST",
                "SupTyp": "B2B",
                "IgstOnIntra": "N"
            },
            "DocDtls": {
                "Typ": "INV",
                "No": "sumit1234",
                "Dt": "18/01/2024"
            },
            "SellerDtls": {
                "Gstin": "29AAFCD5862R000",
                "LglNm": "NIC company pvt ltd",
                "TrdNm": "NIC Industries",
                "Addr1": "5th block, kuvempu layout",
                "Addr2": "kuvempu layout",
                "Loc": "BENGALURU",
                "Pin": 560103,
                "Stcd": "29"
            },
             "BuyerDtls": {
                "Gstin": "29AWGPV7107B1Z1",
                "LglNm": "XYZ company pvt ltd",
                "TrdNm": "XYZ Industries",
                "Pos": "29",
                "Addr1": "7th block, kuvempu layout",
                "Addr2": "kuvempu layout",
                "Loc": "BENGALURU",
                "Pin": 560105,
                "Stcd": "29"
            },
              "DispDtls": {
                "Nm": "ABC company pvt ltd",
                "Addr1": "7th block, kuvempu layout",
                "Addr2": "kuvempu layout",
                "Loc": "Banagalore",
                "Pin": 562160,
                "Stcd": "29"
            },
            "ShipDtls": {
                "Gstin": "29AWGPV7107B1Z1",
                "LglNm": "CBE company pvt ltd",
                "TrdNm": "kuvempu layout",
                "Addr1": "7th block, kuvempu layout",
                "Addr2": "kuvempu layout",
                "Loc": "Banagalore",
                "Pin": 562160,
                "Stcd": "29"
            },
            "ItemList": [
                {
                    "SlNo": "1",
                    "PrdDesc": "SERVICE CHARGES(SMART SUITES) ",
                    "IsServc": "N",
                    "HsnCd": "10019920",
                    "Qty": 1.000,
                    "FreeQty": 1.000,
                    "Unit": "OTH",
                    "UnitPrice": 100.000,
                    "TotAmt": 100.00,
                    "Discount": 0.00,
                    "AssAmt": 100.00,
                    "GstRt": 18.00,
                    "IgstAmt": 0.00,
                    "CgstAmt": 9.00,
                    "SgstAmt": 9.00,
                    "CesRt": 0.00,
                    "CesAmt": 0.00,
                    "CesNonAdvlAmt": 0.00,
                    "StateCesRt": 0.00,
                    "StateCesAmt": 0.00,
                    "StateCesNonAdvlAmt": 0.00,
                    "OthChrg": 0.00,
                    "TotItemVal": 118.00
                }
            ],
            "ValDtls": {
                "AssVal": 100.00,
                "CgstVal": 9.00,
                "SgstVal": 9.00,
                "IgstVal": 0.00,
                "CesVal": 0.00,
                "StCesVal": 0.00,
                "Discount": 0.00,
                "OthChrg": 0.00,
                "RndOffAmt": 0.00,
                "TotInvVal": 118.00,
                "TotInvValFc": 118.00
            },
            "EwbDtls": {
                "TransId": "12AWGPV7107B1Z1",
                "TransName": "XYZ EXPORTS",
                "TransMode": "1",
                "Distance": 100,
                "TransDocNo": "Doc01",
                "TransDocDt": "10/04/2023",
                "VehNo": "ka123456",
                "VehType": "R"
            }
        },
        "transaction_id": "24AAFCD5862R005_sumit1234_INV_2023",
        "transaction_metadata": null
    }
]

Sample Response

Error - (Dryrun = False)

[
    {
        "custom_fields": null,
        "deleted": false,
        "document_status": "NOT_CREATED",
        "error_response": null,
        "errors": null,
        "govt_response": {
            "Success": "N",
            "ErrorDetails": [
                {
                    "error_code": "107",
                    "error_message": "EInvoice.ValDtls.TotInvVal : Invalid Total Invoice Value. The Total Invoice Value should be equal to the Sum of Total Value of All Items - Invoice Discount + Invoice Other charges + Round-off amount. Please correct the Invoice Value and try again.",
                    "error_source": "CLEARTAX"
                }
            ]
        },
        "group_id": null,
        "gstin": "29AAFCD5862R000",
        "is_deleted": false,
        "owner_id": null,
        "tag_identifier": null,
        "transaction": {
            "Version": "1.1",
            "TranDtls": {
                "TaxSch": "GST",
                "RegRev": "N",
                "SupTyp": "B2B"
            },
            "DocDtls": {
                "Typ": "INV",
                "No": "IRNTEST/003",
                "Dt": "10/04/2023"
            },
            "SellerDtls": {
                "Gstin": "29AAFCD5862R000",
                "LglNm": "NIC company pvt ltd",
                "TrdNm": "NIC Industries",
                "Addr1": "5th block, kuvempu layout",
                "Addr2": "kuvempu layout",
                "Loc": "BENGALURU",
                "Pin": 560103,
                "Stcd": "29"
            },
            "BuyerDtls": {
                "Gstin": "29AWGPV7107B1Z1",
                "LglNm": "XYZ company pvt ltd",
                "TrdNm": "XYZ Industries",
                "Pos": "29",
                "Addr1": "7th block, kuvempu layout",
                "Addr2": "kuvempu layout",
                "Loc": "BENGALURU",
                "Pin": 560105,
                "Stcd": "29"
            },
            "DispDtls": {
                "Nm": "ABC company pvt ltd",
                "Addr1": "7th block, kuvempu layout",
                "Addr2": "kuvempu layout",
                "Loc": "Banagalore",
                "Pin": 562160,
                "Stcd": "29"
            },
            "ShipDtls": {
                "Gstin": "29AWGPV7107B1Z1",
                "LglNm": "CBE company pvt ltd",
                "TrdNm": "kuvempu layout",
                "Addr1": "7th block, kuvempu layout",
                "Addr2": "kuvempu layout",
                "Loc": "Banagalore",
                "Pin": 562160,
                "Stcd": "29"
            },
            "ItemList": [
                {
                    "SlNo": "1",
                    "PrdDesc": "SERVICE CHARGES(SMART SUITES) ",
                    "IsServc": "N",
                    "HsnCd": "10019920",
                    "Qty": 1.000,
                    "FreeQty": 1.000,
                    "Unit": "OTH",
                    "UnitPrice": 100.000,
                    "TotAmt": 100.00,
                    "Discount": 0.00,
                    "AssAmt": 100.00,
                    "GstRt": 18.00,
                    "IgstAmt": 0.00,
                    "CgstAmt": 9.00,
                    "SgstAmt": 9.00,
                    "CesRt": 0.00,
                    "CesAmt": 0.00,
                    "CesNonAdvlAmt": 0.00,
                    "StateCesRt": 0.00,
                    "StateCesAmt": 0.00,
                    "StateCesNonAdvlAmt": 0.00,
                    "OthChrg": 0.00,
                    "TotItemVal": 118.00
                }
            ],
            "ValDtls": {
                "AssVal": 100.00,
                "CgstVal": 9.00,
                "SgstVal": 9.00,
                "IgstVal": 0.00,
                "CesVal": 0.00,
                "StCesVal": 0.00,
                "Discount": 0.00,
                "OthChrg": 0.00,
                "RndOffAmt": 0.00,
                "TotInvVal": 0.00,
                "TotInvValFc": 118.00
            },
            "EwbDtls": {
                "TransId": "12AWGPV7107B1Z1",
                "TransName": "XYZ EXPORTS",
                "TransMode": "1",
                "Distance": 100,
                "TransDocNo": "Doc01",
                "TransDocDt": "10/04/2023",
                "VehNo": "ka123456",
                "VehType": "R"
            }
        },
        "transaction_id": "29AAFCD5862R000_IRNTEST/003_INV_2023",
        "transaction_metadata": null
    }
]

Error - (Dryrun = True)

[
    {
        "custom_fields": null,
        "deleted": false,
        "document_status": "DOCUMENT_VALIDATION",
        "error_response": null,
        "errors": null,
        "govt_response": {
            "Success": "N",
            "ErrorDetails": [
                {
                    "error_code": "300104",
                    "error_message": "Supply Type is not provided to generate IRN. Please provide a valid supply type as one of [B2B, SEZWP, SEZWOP, EXPWP, EXPWOP]",
                    "error_source": "CLEARTAX"
                }
            ]
        },
        "group_id": null,
        "gstin": "24AAFCD5862R005",
        "is_deleted": false,
        "owner_id": null,
        "tag_identifier": null,
        "transaction": {
            "Version": "1.1",
            "TranDtls": {
                "TaxSch": "GST",
                "IgstOnIntra": "N"
            },
           "DocDtls": {
                "Typ": "INV",
                "No": "IRNTEST/002",
                "Dt": "10/04/2023"
            },
            "SellerDtls": {
                "Gstin": "29AAFCD5862R000",
                "LglNm": "NIC company pvt ltd",
                "TrdNm": "NIC Industries",
                "Addr1": "5th block, kuvempu layout",
                "Addr2": "kuvempu layout",
                "Loc": "BENGALURU",
                "Pin": 560103,
                "Stcd": "29"
            },
            "BuyerDtls": {
                "Gstin": "29AWGPV7107B1Z1",
                "LglNm": "XYZ company pvt ltd",
                "TrdNm": "XYZ Industries",
                "Pos": "29",
                "Addr1": "7th block, kuvempu layout",
                "Addr2": "kuvempu layout",
                "Loc": "BENGALURU",
                "Pin": 560105,
                "Stcd": "29"
            },
            "DispDtls": {
                "Nm": "ABC company pvt ltd",
                "Addr1": "7th block, kuvempu layout",
                "Addr2": "kuvempu layout",
                "Loc": "Banagalore",
                "Pin": 562160,
                "Stcd": "29"
            },
            "ShipDtls": {
                "Gstin": "29AWGPV7107B1Z1",
                "LglNm": "CBE company pvt ltd",
                "TrdNm": "kuvempu layout",
                "Addr1": "7th block, kuvempu layout",
                "Addr2": "kuvempu layout",
                "Loc": "Banagalore",
                "Pin": 562160,
                "Stcd": "29"
            },
            "ItemList": [
                {
                    "SlNo": "1",
                    "PrdDesc": "SERVICE CHARGES(SMART SUITES) ",
                    "IsServc": "N",
                    "HsnCd": "10019920",
                    "Qty": 1.000,
                    "FreeQty": 1.000,
                    "Unit": "OTH",
                    "UnitPrice": 100.000,
                    "TotAmt": 100.00,
                    "Discount": 0.00,
                    "AssAmt": 100.00,
                    "GstRt": 18.00,
                    "IgstAmt": 0.00,
                    "CgstAmt": 9.00,
                    "SgstAmt": 9.00,
                    "CesRt": 0.00,
                    "CesAmt": 0.00,
                    "CesNonAdvlAmt": 0.00,
                    "StateCesRt": 0.00,
                    "StateCesAmt": 0.00,
                    "StateCesNonAdvlAmt": 0.00,
                    "OthChrg": 0.00,
                    "TotItemVal": 118.00
                }
            ],
            "ValDtls": {
                "AssVal": 100.00,
                "CgstVal": 9.00,
                "SgstVal": 9.00,
                "IgstVal": 0.00,
                "CesVal": 0.00,
                "StCesVal": 0.00,
                "Discount": 0.00,
                "OthChrg": 0.00,
                "RndOffAmt": 0.00,
                "TotInvVal": 118.00,
                "TotInvValFc": 118.00
            },
            "EwbDtls": {
                "TransId": "12AWGPV7107B1Z1",
                "TransName": "XYZ EXPORTS",
                "TransMode": "1",
                "Distance": 100,
                "TransDocNo": "Doc01",
                "TransDocDt": "10/04/2023",
                "VehNo": "ka123456",
                "VehType": "R"
            }
        },
        "transaction_id": "24AAFCD5862R005_sumit1234_INV_2023",
        "transaction_metadata": null
    }
]

For bulk generation, you can send a list of up to 10 Invoice Objects in the same request body.

The invoice you receive in response to this API is the invoice persisted by ClearTax. This may include fields sent by you at the time of generation which may not be part of the invoice returned by the Government.

Last updated