e-Invoice IRN Generation API
POST
https://apisandbox.whitebooks.in/einvoice/type/GENERATE/version/V1_03Generate Invoice Reference Number
e-Invoice Web App
Explore FeatureInstant B2B e-Invoice IRN & QR Code Generation
Generate 64-character IRNs and signed QR codes in bulk from Excel, ERP connectors, or web forms with instant IRP dispatch.
Parameters
query parameters
emailstringrequiredUser Email
header parameters
ip_addressstringrequiredIP Address
client_idstringrequiredClient ID
client_secretstringrequiredClient Secret
usernamestringrequiredUser name
auth-tokenstringrequiredToken
gstinstringrequiredGSTIN number
Request Body
application/jsonrequired
VersionstringoptionalVersion Type
Example: "1.1"
TranDtlsobjectoptionalTaxSchstringoptionalTax type
Example: "GST"
SupTypstringoptionalSupply Type
Example: "B2B"
RegRevstringoptionalReg Rev
Example: "N"
EcmGstinstringoptionalnullableEcom GSTIN
Example: null
IgstOnIntrastringoptionalIGST On Intra
Example: "N"
DocDtlsobjectoptionalTypstringoptionalType
Example: "INV"
NostringoptionalInvoice Number
Example: "MAHI/10"
DtstringoptionalInvoice Date
Example: "08/08/2020"
SellerDtlsobjectoptionalGstinstringoptionalGST Number
Example: "29AAGCB1286Q000"
LglNmstringoptionalLegal Name
Example: "ABC company pvt ltd"
TrdNmstringoptionalTrade Name
Example: "NIC Industries"
Addr1stringoptionalAddress1
Example: "5th block, kuvempu layout"
Addr2stringoptionalAddress2
Example: "kuvempu layout"
LocstringoptionalLocation Name
Example: "GANDHINAGAR"
PinnumberoptionalPincode Number
Example: 560001
StcdstringoptionalState Code
Example: "29"
PhstringoptionalPhone Number
Example: "9000000000"
EmstringoptionalEmail Id
Example: "abc@gmail.com"
BuyerDtlsobjectoptionalGstinstringoptionalGST Number
Example: "29AWGPV7107B1Z1"
LglNmstringoptionalLegal Name
Example: "XYZ company pvt ltd"
TrdNmstringoptionalTrade Name
Example: "XYZ Industries"
PosstringoptionalPlace of Supply
Example: "37"
Addr1stringoptionalAddress1
Example: "7th block, kuvempu layout"
Addr2stringoptionalAddress2
Example: "kuvempu layout"
LocstringoptionalLocation Name
Example: "GANDHINAGAR"
PinnumberoptionalPincode Number
Example: 560004
StcdstringoptionalState Code
Example: "29"
PhstringoptionalPhone Number
Example: "9000000000"
EmstringoptionalEmail Id
Example: "abc@gmail.com"
DispDtlsobjectoptionalNmstringoptionalName
Example: "ABC company pvt ltd"
Addr1stringoptionalAddress1
Example: "7th block, kuvempu layout"
Addr2stringoptionalAddress2
Example: "kuvempu layout"
LocstringoptionalLocation Name
Example: "Banagalore"
PinnumberoptionalPincode Number
Example: 518360
StcdstringoptionalState Name
Example: "37"
ShipDtlsobjectoptionalGstinstringoptionalGST Number
Example: "29AWGPV7107B1Z1"
LglNmstringoptionalLegal Name
Example: "CBE company pvt ltd"
TrdNmstringoptionalTrade Name
Example: "kuvempu layout"
Addr1stringoptionalAddress1
Example: "7th block, kuvempu layout"
Addr2stringoptionalAddress2
Example: "kuvempu layout"
LocstringoptionalLocation Name
Example: "Banagalore"
PinnumberoptionalPincode Number
Example: 518360
StcdstringoptionalState Name
Example: "37"
ItemListarray<einvoicetypeGENERATEversionV1_1_ItemList>optionalArray items:
SlNostringoptionalSerial Number
Example: "1"
IsServcstringoptionalService
Example: "N"
PrdDescstringoptionalProduct Description
Example: "Rice"
HsnCdstringoptionalHSN Code
Example: "1001"
BarcdestringoptionalBar Code
Example: "123456"
BchDtlsobjectoptionalNmstringoptionalTax type
Example: "123456"
ExpdtstringoptionalTax type
Example: "01/08/2020"
wrDtstringoptionalTax type
Example: "01/09/2020"
QtynumberoptionalQuntity
Example: 100.345
FreeQtynumberoptionalFree Quntity
Example: 10
UnitstringoptionalUnits Of Measurment
Example: "NOS"
UnitPricenumberoptionalUnit Price
Example: 99.545
TotAmtnumberoptionalTotal Amount
Example: 9988.84
DiscountnumberoptionalDiscount
Example: 10
PreTaxValnumberoptionalDiscount
Example: 1
AssAmtnumberoptionalAssesment Amount
Example: 9978.84
GstRtnumberoptionalnullablegst Rate
Example: 12
SgstAmtnumberoptionalSgst Rate
Example: 0
IgstAmtnumberoptionalIgst Rate
Example: 1197.46
CgstAmtnumberoptionalCgst Rate
Example: 0
CesRtnumberoptionalCess Rate
Example: 5
CesAmtnumberoptionalCess Amount
Example: 498.94
CesNonAdvlAmtnumberoptionalCesNonAd value
Example: 10
StateCesRtnumberoptionalState Cess Rate
Example: 12
StateCesAmtnumberoptionalState Cess Amount
Example: 1197.46
StateCesNonAdvlAmtnumberoptionalState Cess none advance Amount
Example: 5
OthChrgnumberoptionalOther Charges
Example: 10
TotItemValnumberoptionalTotal Item Value
Example: 12897.7
OrdLineRefstringoptionalTotal Item Value
Example: "3256"
OrgCntrystringoptionalTotal Item Value
Example: "AG"
PrdSlNostringoptionalTotal Item Value
Example: "12345"
AttribDtlsarray<einvoicetypeGENERATEversionV1_1_AttribDtls>optionalArray items:
NmstringoptionalTax type
Example: "Rice"
ValstringoptionalTax type
Example: "10000"
ValDtlsobjectoptionalAssValnumberoptionalAssestment Val
Example: 9978.84
CgstValnumberoptionalCgst Value
Example: 0
SgstValnumberoptionalSgst Value
Example: 0
IgstValnumberoptionalIgst Value
Example: 1197.46
CesValnumberoptionalCess Value
Example: 508.94
StCesValnumberoptionalStCess Value
Example: 1202.46
DiscountnumberoptionalStCess Value
Example: 10
OthChrgnumberoptionalStCess Value
Example: 20
RndOffAmtnumberoptionalRound off
Example: 0.3
TotInvValnumberoptionalTotal Invoice Value
Example: 12908
TotInvValFcnumberoptionalStCess Value
Example: 12897.7
PayDtlsobjectoptionalNmstringoptionalState Name
Example: "ABCDE"
AccdetstringoptionalState Name
Example: "5697389713210"
ModestringoptionalState Name
Example: "Cash"
FininsbrstringoptionalState Name
Example: "SBIN11000"
PaytermstringoptionalState Name
Example: "100"
PayinstrstringoptionalState Name
Example: "Gift"
CrtrnstringoptionalState Name
Example: "test"
DirdrstringoptionalState Name
Example: "test"
CrdaynumberoptionalState Name
Example: 100
PaidamtnumberoptionalState Name
Example: 10000
PaymtduenumberoptionalState Name
Example: 5000
RefDtlsobjectoptionalInvRmstringoptionalGST Number
Example: "TEST"
DocPerdDtlsobjectoptionalInvStDtstringoptionalState Name
Example: "01/08/2020"
InvEndDtstringoptionalState Name
Example: "01/09/2020"
PrecDocDtlsarray<einvoicetypeGENERATEversionV1_1_PrecDocDtls>optionalArray items:
InvNostringoptionalState Name
Example: "DOC/002"
InvDtstringoptionalState Name
Example: "01/08/2020"
OthRefNostringoptionalState Name
Example: "123456"
ContrDtlsarray<einvoicetypeGENERATEversionV1_1_ContrDtls>optionalArray items:
RecAdvRefrstringoptionalState Name
Example: "DOC/002"
RecAdvDtstringoptionalState Name
Example: "01/08/2020"
TendrefrstringoptionalState Name
Example: "Abc001"
ContrrefrstringoptionalState Name
Example: "Co123"
ExtrefrstringoptionalState Name
Example: "Yo456"
ProjrefrstringoptionalState Name
Example: "Doc-456"
PorefrstringoptionalState Name
Example: "Doc-789"
PoRefDtstringoptionalState Name
Example: "01/08/2020"
AddlDocDtlsarray<einvoicetypeGENERATEversionV1_1_AddlDocDtls>optionalArray items:
UrlstringoptionalState Name
Example: "https://einv-apisandbox.nic.in"
DocsstringoptionalState Name
Example: "Test Doc"
InfostringoptionalState Name
Example: "Document Test"
ExpDtlsobjectoptionalShipBNostringoptionalState Name
Example: "A-248"
ShipBDtstringoptionalState Name
Example: "01/08/2020"
PortstringoptionalState Name
Example: "INABG1"
RefClmstringoptionalState Name
Example: "N"
ForCurstringoptionalState Name
Example: "AED"
CntCodestringoptionalState Name
Example: "AE"
EwbDtlsobjectoptionalTransidstringoptionalState Name
Example: "12AWGPV7107B1Z1"
TransnamestringoptionalState Name
Example: "XYZ EXPORTS"
DistancenumberoptionalState Name
Example: 100
TransdocnostringoptionalState Name
Example: "DOC01"
TransdocDtstringoptionalState Name
Example: "01/08/2020"
VehnostringoptionalState Name
Example: "ka123456"
VehtypestringoptionalState Name
Example: "R"
TransModestringoptionalState Name
Example: "1"
Response
Not Found. If requested entity is not found or if requested API is not found.
Frequently Asked Questions
Requests require the standard WhiteBooks OAuth Bearer token (
Authorization: Bearer <access_token>) and x-api-key in the headers, along with business routing parameters (gstin, ip_address, and username). Your private client_secret is used only during initial token acquisition at /authentication/authtoken and should never be sent on endpoint calls.The payload body requires
Version (e.g. 1.03), TranDtls (tax supply details), DocDtls (document type, number, date), SellerDtls, and BuyerDtls. Optional sections like DispDtls, ShipDtls, ItemList, ValDtls, and EwbDtls should be provided when applicable to the transaction.The IRP computes the 64-character hash using Supplier GSTIN, Document Number (
DocDtls.No), Document Type (DocDtls.Typ), and Financial Year. If an IRN has already been generated for this combination, the portal rejects it. You cannot regenerate an IRN for the same invoice number in the same financial year.Yes. By populating the
EwbDtls object (containing TransMode, Distance, TransId, and vehicle/transport document details) within the IRN generation payload, the IRP generates both the IRN and the Part-A/Part-B e-Way Bill in a single synchronous call.Under NIC guidelines, an IRN can be cancelled via the cancellation endpoint within 24 hours of generation. After 24 hours, the IRN cannot be cancelled on the IRP; credit notes must be issued instead to reverse the tax liability.
No example available.