India
Enabling support for India involves different prerequisites depending on the environment and integration process you choose.
Prerequisites
- Sandbox and production (new)
- Fill out the following documents and share them with the Professional Services team:
- Sandbox (new)
-
You can use the following table containing each state-specific GSTIN (Goods and Service Tax Identification Number) and the associated credentials to test different business scenarios for inter and intrastate transactions and their applicable tax types.
State GSTIN Username Password Jammu and Kashmir TBD TBD TBD Himachal Pradesh 02AAACI9260R000 SOVOS@HP SOVOS@hp01 Punjab 03AAACI9260R000 SOVOS@PJ SOVOS@pj01 Chandigarh 04AAACI9260R000 SOVOS@CG SOVOS@cg01 Uttarakhand 05AAACI9260R000 SOVOS@UK SOVOS@uk01 Haryana 06AAACI9260R000 SOVOS@HR SOVOS@hr01 Delhi 07AAACI9260R001 SOVOS@DL SOVOS@dl01 Rajasthan 08AAACI9260R000 SOVOS@RJ SOVOS@rj01 Uttar Pradesh 09AAACI9260R001 SOVOS@UP SOVOS@up01 Bihar 10AAACI9260R000 SOVOS@BH SOVOS@bh01 Sikkim 11AAACI9260R000 SOVOS@SK SOVOS@sk01 Arunachal Pradesh 12AAACI9260R000 SOVOS@AP SOVOS@ap01 Nagaland 13AAACI9260R000 SOVOS@NL SOVOS@nl01 Manipur 14AAACI9260R000 SOVOS@MN SOVOS@MN01 Mizoram 15AAACI9260R000 SOVOS@MZ SOVOS@mz01 Tripura 16AAACI9260R000 SOVOS@TP SOVOS@tp01 Meghalaya 17AAACI9260R000 SOVOS@MG SOVOS@mg01 Assam 18AAACI9260R000 SOVOS@AS SOVOS@as01 West Bengal 19AAACI9260R000 SOVOS@WB SOVOS@wb01 Jharkhand 20AAACI9260R000 SOVOS@JH SOVOS@jh01 Orissa 21AAACI9260R000 SOVOS@OD SOVOS@od01 Chhattisgarh 22AAACI9260R000 SOVOS@CH SOVOS@ch01 Madhya Pradesh 23AAACI9260R000 SOVOS@MP SOVOS@mp01 Gujarat 24AAACI9260R003 SOVOS@GJ SOVOS@gj01 Daman and Diu 25AAACI9260R000 SOVOS@DNH SOVOS@dnh01 Dadra Nagar Haveli 26AAACI9260R000 SOVOS@DH SOVOS@dh01 Maharashtra 27AAACI9260R009 SOVOS@MH SOVOS@mh01 Karnataka 29AAACI9260R004 SOVOS@KRN SOVOS@krn01 Goa 30AAACI9260R000 SOVOS@GOA SOVOS@goa01 Lakshadweep 31AAACI9260R000 SOVOS@LKS SOVOS@lks01 Kerela 32AAACI9260R000 SOVOS@KRL SOVOS@krl01 Tamil Nadu 33AAACI9260R001 SOVOS@TN SOVOS@tn01 Pondicherry 34AAACI9260R000 SOVOS@PUD SOVOS@pud01 Andaman and Nicobar 35AAACI9260R000 SOVOS@AAN SOVOS@aan01 Telangana 36AAACI9260R000 SOVOS@TL SOVOS@tl01 Andhra Pradesh 37AAACI9260R000 SOVOS@ANP SOVOS@anp01 Ladakh 38AAACI9260R000 SOVOS@LAD SOVOS@lad01 - Sandbox
-
A valid UAT TLS certificate from Sovos. To request it, fill out the following documents and share them with the Professional Services team:
You can use the following dummy GSTIN and associated credentials to get started:
- GSTIN
- 08AAACI9260R002
- Username
- Irisonyx_rj
- Password
- Irisonyxrj_01
Note:Each GSTIN number should be registered as a
companyId
and each company should only have one branch. This is because the Indian authorities require having a separate archive for each GSTIN number. We recommend following this approach even if you do not want to store Indian fiscal documents using Sovos eArchive. This is to avoid complications if you later decide to use Sovos eArchive to store Indian tax documents.You can also use the following table containing state-specific GSTINs and associated credentials to test different business scenarios for inter and intrastate transactions and their applicable tax types:
State GSTIN Username Password Karnataka 29AAACI9260R000 IrisTest_01 Irisgst@1 Jammu and Kashmir 01AAACI9260R002 IrisTestjk_01 Irisgstjk_01 Himachal Pradesh 02AAACI9260R002 Irisonyx_hp Irisonyxhp_01 Punjab 03AAPFG0689N1ZV Irisonyx_pbb Abcd@12345678 Chandigarh 04AAACI9260R002 Irisonyx_cd Irisonyxcd_01 Uttarakhand 05AAACI9260R002 Irisonyx_ut Irisonyxut_01 Haryana 06AAACI9260R002 Irisonyx_hy Irisonyxhy_01 Delhi 07AAACI9260R002 Irisonyx_dl Irisonyxdl_01 Rajasthan 08AAACI9260R002 Irisonyx_rj Irisonyxrj_01 Maharashtra 27AAACI9260R002 Irisonyx_mh Irisonyxmh_01 Uttar Pradesh 09AAACI9260R002 Irisonyx_up Irisonyxup_01 Bihar 10AAACI9260R002 Irisonyx_bh Irisonyxbh_01 Sikkim 11AAACI9260R002 Irisonyx_sk Irisonyxsk_01 Arunachal Pradesh 12AAACI9260R002 Irisonyx_ap Irisonyxap_01 Nagaland 13AAACI9260R002 Irisonyx_ng Irisonyxng_01 Manipur 14AAACI9260R002 Irisonyx_mn Irisonyxmn_01 Mizoram 15AAACI9260R002 Irisonyx_mz Irisonyxmz_01 Tripura 16AAACI9260R002 Irisonyx_tr Irisonyxtr_01 Meghalaya 17AAACI9260R002 Irisonyx_mg Irisonyxmg_01 Assam 18AAACI9260R002 Irisonyx_assam Irisonyxassam_01 West Bengal 19AAACI9260R002 Irisonyx_wb Irisonyxwb_01 Jharkhand 20AAACI9260R002 Irisonyx_jh Irisonyxjh_01 Orissa 21AAACI9260R002 Irisonyx_od Irisonyxod_01 Chhattisgarh 22AAACI9260R002 Irisonyx_ch Irisonyxch_01 Madhya Pradesh 23AAACI9260R002 Irisonyx_mp Irisonyxmp_01 Gujarat 24AAACI9260R002 Irisonyx_gj Irisonyxgj_01 Daman and Diu 25AAACI9260R002 Irisonyx_dd Irisonyxdd_01 Dadra Nagar Haveli 26AAACI9260R002 Irisonyx_dnh Irisonyxdnh_01 Goa 30AAACI9260R002 Irisonyx_goa Irisonyxgoa_01 Lakshadweep 31AAACI9260R002 Irisonyx_ld Irisonyxld_01 Kerela 32AAACI9260R002 Irisonyx_kl Irisonyxkl_01 Tamil Nadu 33AAACI9260R002 Irisonyx_tn Irisonyxtn_01 Pondicherry 34AAACI9260R002 Irisonyxpy_01 Irisonyxpy_01 Andaman and Nicobar 35AAACI9260R002 Irisonyx_an Irisonyxan_01 Telangana 36AAACI9260R002 Irisonyx_ts Irisonyxts_01 Andhra Pradesh 37AAACI9260R002 Irisonyx_andhra Irisonyxandhra@01 - Production (new)
-
-
A valid GSTIN (obtained by registering in the GST Portal or using the Indian Government's GST Seva Kendra setup)
-
Registering in the IRIS portal to obtain the API credentials for production.Note:
For more information, see the user onboarding website.
If you want to register for e-invoice eligibility for the first time, you should do it only through the Government Portal/NIC.
-
- Production
-
-
A valid Production TLS certificate Sovos provides during the official integration project, after the testing phase
-
A valid GSTIN (obtained by registering in the GST Portal or using the Indian Government's GST Seva Kendra setup)
-
Registering in the e-invoicing portal to obtain the API credentials for production
-
IRP (Invoice Registration Portal) workflow
It is not possible to send transactions directly to the GST Portal. Instead, they must first pass through an IRP.
The Sovos solution uses a GSP (GST Suvidha Provider) to issue invoices to the IRP.
When you submit an invoice to an IRP, it undergoes several mandatory services, including duplicate checks against the GST Portal, digital signing with a JSON Web Signature (JWS), generation and validation of the IRN (Invoice Reference Number), and creation of a signed QR code.
Each IRP retains invoices for up to 24 hours before transferring them to the GST (Goods and Services Tax) database, so you can cancel them during this period using the IRP's services. After 24 hours, because the Indirect Tax API does not support cancellations, you must cancel the invoice on the GST Portal or issue a credit or a debit note.
You can send transactions to an IRP using one of these channels:
-
Web-based
-
API-based
-
SMS-based
-
Mobile-app based
-
Offline-tool based
-
GSP-based
Offline invoice validation
The IRP generates a signed QR code to validate the invoice offline using a mobile app. This QR code includes the IRN, along with the following parameters from the invoice:
-
Supplier's GSTIN
Buyer's GSTIN
Supplier's invoice number
Date of invoice generation
Invoice value (taxable value and gross tax)
Number of line items
HSN code of the main item (the line item has the highest taxable value)
This is not a visual QR code, but rather data that can be used to generate one.
Resources
Official government resources that include detailed and valuable information on various topics:
Available products
-
in_GSTInvoice__1.1
Error handling
When handling errors, the client application must follow the Indirect Tax API's error handling principles, as specified in the error handling documentation.
In general, all error codes in the 400 range are client errors, which you need to analyze. After fixing the error, you can resend the request. Error codes 408 and 429 are exceptions: In these cases, you should wait at least 60 seconds before retrying. Error codes in the 500 range are server errors. In that case, resend the request according to the instructions given on the error handling documentation, which also includes a full list of error codes Indirect Tax API can return.
Errors coming from the tax authority are shown in the application response. This means that, for a response with an error code in the 400 range, the errors.message
field can include an error code and message from the tax authority.
You need to take immediate action after receiving an error code and a message from the tax authority. Continuous submission of transactions with the same errors results in the blocking of the associated GSTIN.
For additional help on error handling, see this government documentation, which includes all the error codes the tax authority can return, including descriptions and resolutions.
Configure transmission credentials for India (new)
You must have already configured a company and a product and obtained the required credentials.
Upon successful creation, the API will return a JSON object containing the uploaded transmission credentials and their assigned SETTING-ID
.
Samples for uploading transmission credentials for India (new)
Request sample
Request sample for uploading new credentials:
curl --location --request POST 'https://api-test.sovos.com/v2/configurations/organizations/{orgId}/settings' \
--header 'Authorization: Bearer {accessToken}' \
--header 'x-correlationId: {uniqueValue}' \
--header 'Content-Type: application/json' \
--data-raw '
[
{
"context": "transmission",
"configurations": [
{
"name": "partner_credentials_gst",
"value": {
"username": INSERT-USERNAME-HERE,
"password": INSERT-PASSWORD-HERE
},
"scope": {
"category": "IN_INV",
"productId": "in_GSTInvoice__1.1",
"orgId": {orgId},
"taxId": {taxId}
}
}
]
}
]'
Response sample
Response sample for adding new credentials:
{
"status": 201,
"message": "Created",
"success": true,
"timestamp": 1666259266257,
"data": [
{
"message": "Configurations are created",
"statusCode": 201,
"configurationContextResponse": {
"context": "Transmission",
"configurations": [
{
"id": SETTING-ID,
"name": "partner_credentials_gst",
"value": {
"username": INSERT-USERNAME-HERE,
"password": INSERT-PASSWORD-HERE,
},
"scope": {
"category": "IN_INV",
"productId": "in_GSTInvoice__1.1",
"orgId": {orgId},
"taxId": {taxId}
},
"auditData": {
"createdAt": 1666259265,
"createdBy": "user@company.com",
"isDeleted": false,
"version": 1
}
}
]
}
}
]
}
Issue invoice (new)
Issuing invoices in India is based on the Default business process, which follows this order: Mapping and Transmission. The following diagram provides a detailed overview:
Step 1: Supplier creates the Standard Business Document
Every invoice sent to Sovos must be part of a Standard Business Document (SBD). This document includes a Standard Business Document Header (SBDH) and a Sovos Document node, which in turn includes a Sovos Canonical Invoice (SCI). To create the SBD, follow the detailed instructions in the SBDH, Sovos Document, and SCI pages.
Here are some key elements that should be included in the SBD:
Node | Required | Attributes | Value |
---|---|---|---|
StandardBusinessDocumentHeader.Sender.Identifier | Yes | Authority="IN" | Supplier's GSTIN |
StandardBusinessDocumentHeader.Receiver.Identifier | Yes | Authority="IN" | |
StandardBusinessDocumentHeader.DocumentIdentification.Standard | Yes | urn:oasis:names:specification:ubl:schema:xsd:Invoice-2 | |
StandardBusinessDocumentHeader.DocumentIdentification.TypeVersion | Yes | 2.1 | |
StandardBusinessDocumentHeader.DocumentIdentification.Type | Yes | Invoice | |
StandardBusinessDocumentHeader.BusinessScope.Scope (with child nodes) | Yes |
Child node Child node | |
StandardBusinessDocumentHeader.BusinessScope.Scope (with child nodes) | Yes |
Child node Child node | |
StandardBusinessDocumentHeader.BusinessScope.Scope (with child nodes) | Yes |
Child node Child node | |
StandardBusinessDocumentHeader.BusinessScope.Scope (with child nodes) | Yes |
Child node Child node | |
StandardBusinessDocumentHeader.BusinessScope.Scope (with child nodes) | Yes |
Child node Child node | |
StandardBusinessDocumentHeader.BusinessScope.Scope (with child nodes) | Yes |
Child node Child node | |
StandardBusinessDocumentHeader.BusinessScope.Scope (with child nodes) | Yes |
Child node Child node | |
StandardBusinessDocumentHeader.BusinessScope.Scope (with child nodes) | Yes |
Child node Child node | |
StandardBusinessDocumentHeader.BusinessScope.Scope (with child nodes) | Yes |
Child node Child node | |
StandardBusinessDocumentHeader.BusinessScope.Scope.BusinessService.BusinessServiceName | Yes | Default | |
SovosDocument.SovosCanonicalInvoice.Invoice | Yes | SCI |
Include all the mandatory nodes, as specified in the SBDH schema. If the information cannot be provided, and the respective mandatory node has not been mentioned on the current page, for example the receiver.identifier
, the node can be left empty but must still be included in the SBDH.
- SBD sample
- Below is a sample of the SBD. In addition, there's a full sample of the SBD on the Postman Samples page.
<sbd:StandardBusinessDocument xmlns="http://uri.etsi.org/01903/v1.4.1#" xmlns:cac="urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2" xmlns:cbc="urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2" xmlns:sbd="http://www.unece.org/cefact/namespaces/StandardBusinessDocumentHeader" xmlns:xades="http://uri.etsi.org/01903/v1.3.2#" xmlns:ad="http://www.sovos.com/namespaces/additionalData" xmlns:sci="http://www.sovos.com/namespaces/sovosCanonicalInvoice" xmlns:svs="http://www.sovos.com/namespaces/sovosDocument" xmlns:sov="http://www.sovos.com/namespaces/sovosExtensions" xmlns:ds="http://www.w3.org/2000/09/xmldsig#" xmlns:ext="urn:oasis:names:specification:ubl:schema:xsd:CommonExtensionComponents-2" xmlns:inv="urn:oasis:names:specification:ubl:schema:xsd:Invoice-2"> <sbd:StandardBusinessDocumentHeader> <sbd:HeaderVersion>1.0</sbd:HeaderVersion> <sbd:Sender> <sbd:Identifier Authority="IN">YOUR-TAXID</sbd:Identifier> <sbd:ContactInformation> <sbd:Contact>YOUR-TAXID</sbd:Contact> <sbd:EmailAddress/> <sbd:FaxNumber/> <sbd:TelephoneNumber/> <sbd:ContactTypeIdentifier/> </sbd:ContactInformation> </sbd:Sender> <sbd:Receiver> <sbd:Identifier Authority="IN"/> <sbd:ContactInformation> <sbd:Contact/> <sbd:EmailAddress/> <sbd:FaxNumber/> <sbd:TelephoneNumber/> <sbd:ContactTypeIdentifier/> </sbd:ContactInformation> </sbd:Receiver> <sbd:DocumentIdentification> <sbd:Standard>urn:oasis:names:specification:ubl:schema:xsd:Invoice-2</sbd:Standard> <sbd:TypeVersion>2.1</sbd:TypeVersion> <sbd:InstanceIdentifier/> <sbd:Type>Invoice</sbd:Type> <sbd:MultipleType>false</sbd:MultipleType> <sbd:CreationDateAndTime>2020-06-16T00:31:52Z</sbd:CreationDateAndTime> </sbd:DocumentIdentification> <sbd:BusinessScope> <sbd:Scope> <sbd:Type>Version</sbd:Type> <sbd:InstanceIdentifier/> <sbd:Identifier>1.1</sbd:Identifier> </sbd:Scope> <sbd:Scope> <sbd:Type>SenderDocumentId</sbd:Type> <sbd:InstanceIdentifier/> <sbd:Identifier>DOCUMENT-ID</sbd:Identifier> </sbd:Scope> <sbd:Scope> <sbd:Type>SenderSystemId</sbd:Type> <sbd:InstanceIdentifier/> <sbd:Identifier>SystemERP</sbd:Identifier> </sbd:Scope> <sbd:Scope> <sbd:Type>CompanyCode</sbd:Type> <sbd:InstanceIdentifier/> <sbd:Identifier>YOUR-TAXID</sbd:Identifier> </sbd:Scope> <sbd:Scope> <sbd:Type>Country</sbd:Type> <sbd:InstanceIdentifier/> <sbd:Identifier>IN</sbd:Identifier> </sbd:Scope> <sbd:Scope> <sbd:Type>ProcessType</sbd:Type> <sbd:InstanceIdentifier/> <sbd:Identifier>Outbound</sbd:Identifier> </sbd:Scope> <sbd:Scope> <sbd:Type>Mapping.TransformDocument</sbd:Type> <sbd:InstanceIdentifier/> <sbd:Identifier>SCI-TO-LEGAL_INVOICE</sbd:Identifier> </sbd:Scope> <sbd:Scope> <sbd:Type>Mapping.OutputSchema</sbd:Type> <sbd:InstanceIdentifier/> <sbd:Identifier>GSTInvoice</sbd:Identifier> </sbd:Scope> <sbd:Scope> <sbd:Type>BusinessCategory</sbd:Type> <sbd:InstanceIdentifier/> <sbd:Identifier>B2B</sbd:Identifier> </sbd:Scope> <sbd:Scope> <sbd:Type>BusinessProcess</sbd:Type> <sbd:InstanceIdentifier/> <sbd:BusinessService> <sbd:BusinessServiceName>Default</sbd:BusinessServiceName> </sbd:BusinessService> </sbd:Scope> </sbd:BusinessScope> </sbd:StandardBusinessDocumentHeader> <svs:SovosDocument> <sci:SovosCanonicalInvoice> <inv:Invoice> *UBL Elements* </inv:Invoice> </sci:SovosCanonicalInvoice> </svs:SovosDocument> </sbd:StandardBusinessDocument>
Step 2: Supplier sends the SBD to Sovos
The supplier sends a POST request to the /documents endpoint.
The request must include the following request body parameters:
Name | Type | Required | Description |
---|---|---|---|
data | string | Yes | The SBD encoded in Base64, as created in step 1. |
dataEncoding | string | Yes | Enter "base64". |
After receiving the document, Sovos performs a structure/schema validation of both the SCI and the SBD parts.
- Request sample
-
curl --location --request POST 'https://api-test.sovos.com/v1/documents' \ --header 'Content-Type: application/json' \ --header 'Authorization: Bearer TOKEN' \ --header 'x-correlationId: SET-TO-UNIQUE-VALUE' \ --data-raw '{ "data": "PD9...d4=", "dataEncoding" : "base64" }'
- Response sample
-
{ "timestamp": 1605282724079, "status": 202, "success": true, "message": "Document Received", "data": { "documentId": "DOCUMENT-ID" } }
Step 3: Sovos maps the SCI into JSON
This step will be skipped if the SBD contains the invoice in the local format (JSON).
Step 4: Sovos performs the schema validation
Sovos performs a schema validation to determine whether the JSON file conforms to the expected structure by validating the file against the official JSON schema.
Step 5: Sovos transmits the JSON
Sovos transmits the JSON file to the tax authority.
Step 6: Tax authority processes the JSON
The tax authority checks for duplicate invoices, then performs a schema validation and several business validations.
If the document fails the checks and validations, the tax authority rejects it. Then, they generate a rejection response error message along with an error message, where applicable.
If the tax authority approves the document, they generate an approval message, generate a hash (which becomes the IRN), sign the JSON with its private key, then proceed to generate and sign the QR code. They store the signed JSON in the central registry and can use it for duplication checks.
Step 7: Tax authority sends the response to Sovos
After performing its services, the tax authority sends the response to Sovos. The application response contains the signed JSON, the signed QR code data, the formal identifiers, IRN, acknowledgment number, and acknowledgment date.
Step 8: Supplier retrieves the application responses
- Attachments configuration
- Sovos highly recommends configuring your application response attachments as download links instead of base64-encoded data to avoid potential size limitations when retrieving responses. The default option is "download links".Note:
When you use "download links", the response contains a URL to download the file. When you use "binary data", the file is embedded in the base64-encoded response. This configuration is available through the Professional Services team.
As a response to the initial sending of the document, the client receives a JSON response message with an HTTP status code of 202 (asynchronous transaction). This means that the supplier must retrieve the application responses that become available during the transaction, which provide status information and the cleared XML encoded in Base64 after it's available during the process.
Additionally, you must consider the following details included in the response:
- Transmission message
- It maps to the
SCIGovtStatusCode
andStatusReason
elements in the response message, as described in the application responses documentation, which details any warnings or additional notes to consider. The tax authority doesn't define any specific set of rules about what action to take on each warning. Depending on the type of message, you may have to modify the invoice, take some additional action, or simply make a note for the future.
Options for retrieving application responses (notifications):
- Fetch everything in one single response (notification)
- When polling for responses, Sovos only returns one final notification with
SCICloudStatusCode
of 209 that contains all the relevant attachments and data. Detailed description follows. - Fetch multiple responses (notifications) containing different information
- When polling for responses, Sovos returns multiple notifications with different
SCICloudStatusCode
values containing different attachments and data until the final one (with status 209) is returned. Detailed description follows.
To configure notifications for your company or update your current configuration, contact the Professional Services team.
To complete a transaction, the supplier retrieves only one notification, the complete workflow one, with SCICloudStatusCode
of 209 and all the necessary attachments and data. Afterwards, the notification needs to be parsed for the SCIResponseCode
value. Possible values for SCIResponseCode
:
- AP
- The document's compliance status has been accepted with all the necessary attachments and data included.
- RE
- The document's compliance status has been rejected, and more parsing is needed:
-
If
SCIGovtStatusCode
is present, the error can be found by readingStatusReason
. -
if
SCIInternalValidationCode
is present, the error can be found by readingStatusReason
.
-
# | SCICloudStatusCode | SCIResponseCode | Sample |
---|---|---|---|
1 | 209 | AP |
Workflow Successfully Completed |
2 | 209 | RE | Workflow Successfully Completed |
To complete a transaction, the supplier must retrieve the application responses until the transaction has finished. If the supplier has subscribed to all notifications, the transaction can generate different application responses. See the table below:
# | SCICloudStatusCode | SCIResponseCode | Sample |
---|---|---|---|
1 | 100 | IP |
Document received successfully |
2 | 101 | IP |
Document mapped successfully |
3 | 200 | AP |
Authorized by the tax authority |
4 | 209 | AP |
Workflow Successfully Completed |
5 | 400 | RE |
Rejected by the tax authority or the counterparty |
6 | 401 | RE |
Error processing document |
SCICloudStatusCode
with a value in the 5xx range still remains an option, as it indicates a server error. In this case, the workflow doesn't finish in the sense that it doesn't return a notification with SCICloudStatusCode
of 209.The supplier can use the following Indirect Tax API endpoints to retrieve application responses:
-
GET /notifications/IN
-
GET /documents/IN/{documentId}/notifications
- GET /notifications/IN
- The supplier can send a GET request to the /notifications/IN endpoint to retrieve application responses that match the configured search criteria. To make this request, set the following query parameters:
Name Type Required Default Description taxId string No Include only notifications related to the specified
taxId
. This value relates to theCompanyCode
set in the SBDH.Note: If a request doesn't include this parameter, it will return all the notifications related to the country and the
sourceSystemId
parameter.page integer No 1 To specify the page to be returned, enter a value between 1 and 10. perPage integer No 10 To specify the number of results for the returned page, enter a value between 1 and 100.
Note: If the attachment file is configured to return the binary content instead of a link, use only values between 1 and 10.
sourceSystemId string Yes Include only notifications related to documents that originate from the given source system. This value is related to the SenderSystemId
in the SBDH.includeAcknowledged boolean No false Enter "true" to specify whether previously acknowledged notifications, within 24 hours of their acknowledgment, must be included in the result. processType string No Enter "0" to only include notifications related to outbound documents. - Request sample
-
curl --location --request GET 'https://api-test.sovos.com/v1/notifications/IN?page=1&perPage=2&includeAcknowledged=true&taxId={taxId}&sourceSystemId={sourceSystemId}&processType=0' \ --header 'Content-Type: application/json' \ --header 'Authorization: Bearer TOKEN' \ --header 'x-correlationId: SET-TO-UNIQUE-VALUE'
- Response sample
-
{ "timestamp": 1633685509314, "status": 200, "success": true, "message": "Notifications Listed", "data": { "pageState": { "page": 1, "perPage": 50, "totalEntries": 1 }, "notifications": [ { "createdDate": 1633681296, "metadata": { "productId": "in_GSTInvoice__1.1", "documentId": "DOCUMENT-ID", "erpDocumentId": "ERP-DOCUMENT-ID", "erpSystemId": "SystemERP", "processType": "0", "taxId": "YOUR-TAXID", "sciCloudStatusCode": "200", "sciResponseCode": "AP", "sciStatusAction": "NOA", "sciGovtStatusCode": "100" }, "appPrefix": "DLT", "notificationId": "a8dc1aa2-...-97a3d5fdb91c", "content": "PEF...NlPg==" } ] } }
- GET /documents/IN/{documentId}/notifications
- The supplier can send a GET request to the /documents/IN/{documentId}/notifications endpoint to retrieve application responses related to a single document. To make this request, set the following path parameter:
Name Type Required Description documentId string Yes The ID of the document returned in step 2 - Request sample
-
curl --location --request GET 'https://api-test.sovos.com/v1/documents/IN/{documentId}/notifications' \ --header 'Content-Type: application/json' \ --header 'Authorization: Bearer TOKEN' \ --header 'x-correlationId: SET-TO-UNIQUE-VALUE'
- Response sample
-
{ "timestamp": 1633685509314, "status": 200, "success": true, "message": "Notifications Listed", "data": { "pageState": { "page": 1, "perPage": 50, "totalEntries": 1 }, "notifications": [ { "createdDate": 1633681296, "metadata": { "productId": "in_GSTInvoice__1.1", "documentId": "DOCUMENT-ID", "erpDocumentId": "ERP-DOCUMENT-ID", "erpSystemId": "SystemERP", "processType": "0", "taxId": "YOUR-TAXID", "sciCloudStatusCode": "200", "sciResponseCode": "AP", "sciStatusAction": "NOA", "sciGovtStatusCode": "100" }, "appPrefix": "DLT", "notificationId": "a8dc1aa2-...-97a3d5fdb91c", "content": "PEF...NlPg==" } ] } }
Step 9: Supplier marks the application responses as acknowledged
The supplier must process the retrieved application responses and mark them as acknowledged. This can be done by sending a PUT request to the /notifications/IN endpoint.
To make this request, set the following request body parameters:
Name | Type | Required | Description |
---|---|---|---|
status | string | Yes | Enter "read". |
notificationId | string | Yes | The ID of the notification that must be marked as acknowledged. |
notificationId
values can be acknowledged in one Indirect Tax API call by including them in a single request.- Request sample
-
curl --location --request PUT 'https://api-test.sovos.com/v1/notifications/IN' \ --header 'Content-Type: application/json' \ --header 'Authorization: Bearer TOKEN' \ --header 'x-correlationId: SET-TO-UNIQUE-VALUE' \ --data-raw '[ { "status": "read", "notificationId": "51341d39-...-a73d73e0de76" } ]'
- Response sample
-
{ "timestamp": 1601673284, "status": 200, "success": true, "message": "Notifications acknowledged successfully." }
Step 10: Archiving
You can compliantly archive the XML, the application response, and any graphical representation, such as a PDF, using Sovos' Compliant Archive.
For suppliers integrating with the Sovos solution for India for the first time, we recommend the bundled approach, in which archiving is part of the invoice clearance flow. Archiving can also be done separately through an explicit API call that uses another archive. For more information on standalone archiving, see the eArchiving documentation page.
Step 11: Supplier sends the invoice to the buyer
The supplier must design a solution that accommodates the preferred business processes for delivering the invoice to the buyer because this process is outside the scope of Sovos and the tax authority.
Cancel invoice (new)
You can only use the invoice cancellation method described here for cancellations within 24 hours of the invoice issuance. After 24 hours, you must either cancel the invoice on the GST Portal or issue a credit or a debit note. In addition, you cannot cancel an invoice if there is a valid e-Waybill for that IRN. Finally, once an invoice (IRN) is canceled, the same invoice number cannot be reused to generate another IRN.
The following diagram provides a detailed overview:
Step 1: Supplier sends a POST request to Sovos
When the supplier wants to cancel an invoice in India, they send a POST request to the /documents/IN/action endpoint. To make this request, set the following request body parameters:
Name | Type | Required | Description | ||
---|---|---|---|---|---|
actionCode | string | Yes | Enter "document.cancellation" | ||
documents | array of objects | Yes | An array of objects to include the metadata and the document ID | ||
metadata | object | No | An object that includes the required metadata | ||
reason | string | No | The reason for canceling the invoice. The max length is 100 characters. | ||
reasonCode | string | No | The reason code for the cancellation | ||
documentId | string | Yes | The documentId retrieved when the document was originally submitted. |
- Request sample
-
curl --location --request POST 'https://api-test.sovos.com/v1/documents/IN/action' \ --header 'Content-Type: application/json' \ --header 'Authorization: Bearer TOKEN' \ --header 'x-correlationId: SET-TO-UNIQUE-VALUE' \ --data '{ "actionCode": "document.cancellation", "documents": [ { "metadata": { "reason": "Faulty document data", "reasonCode": "1" }, "documentId": "DOCUMENT-ID" } ] }'
- Response sample
-
{ "status": 202, "message": "Accepted", "success": true, "timestamp": 1699440641940, "data": [ { "status": 202, "documentId": "DOCUMENT-ID" } ] }
Step 2: Sovos transmits the request
Sovos transmits the cancellation request to the tax authority.
Step 3: Tax authority processes the request
The tax authority performs the validation and the cancellation action.
Step 4: Tax authority returns the response
The tax authority sends the response to Sovos.
Step 5: Supplier retrieves the application responses
- Attachments configuration
- Sovos highly recommends configuring your application response attachments as download links instead of base64-encoded data to avoid potential size limitations when retrieving responses. The default option is "download links".Note:
When you use "download links", the response contains a URL to download the file. When you use "binary data", the file is embedded in the base64-encoded response. This configuration is available through the Professional Services team.
As a response to the initial sending of the document, the client receives a JSON response message with an HTTP status code of 202 (asynchronous transaction). This means that the supplier must retrieve the application responses that become available during the transaction, which provide status information and the cleared XML encoded in Base64 after it's available during the process.
To complete a transaction, the supplier must retrieve application responses until the transaction is finished. If the supplier has subscribed to all notifications, the transaction can generate different application responses. See the table below:
# | SCICloudStatusCode | SCIResponseCode | Sample |
---|---|---|---|
1 | 101 | IP |
Document mapped successfully |
2 | 201 | AP |
Canceled
|
3 | 209 | AP |
Workflow Successfully Completed |
4 | 400 | RE | Rejected by the tax authority or the counter party |
The supplier can use the following Indirect Tax API endpoints to retrieve application responses:
-
GET /notifications/IN
-
GET /documents/IN/{documentId}/notifications
- GET /notifications/IN
- The supplier can send a GET request to the /notifications/IN endpoint to retrieve application responses that match the configured search criteria. To make this request, set the following query parameters:
Name Type Required Default Description taxId string No Include only notifications related to the specified
taxId
. This value relates to theCompanyCode
set in the SBDH.page integer No 1 To specify the page to be returned, enter a value between 1 and 10. perPage integer No 10 To specify the number of results for the returned page, enter a value between 1 and 100.
Note: If the attachment file is configured to return the binary content instead of a link, use only values between 1 and 10.
sourceSystemId string Yes Include only notifications related to documents that originate from the given source system. This value is related to the SenderSystemId
in the SBDH.includeAcknowledged boolean No false Enter "true" to specify whether previously acknowledged notifications, within 24 hours of their acknowledgment, must be included in the result. processType string No Enter "0" to only include notifications related to outbound documents. - Request sample
-
curl --location --request GET 'https://api-test.sovos.com/v1/notifications/IN?page=1&perPage=2&taxId={taxId}&sourceSystemId={sourceSystemId}&processType=0' \ --header 'Content-Type: application/json' \ --header 'Authorization: Bearer TOKEN' \ --header 'x-correlationId: SET-TO-UNIQUE-VALUE'
- Response sample
-
{ "status": 200, "message": "Notifications Listed", "success": true, "timestamp": 0, "data": { "pageState": { "page": 1, "perPage": 20, "totalEntries": 1, "totalPages": 1 }, "notifications": [ { "notificationId": "6385272d-...-e35e80b3b8e7", "correlationId": "rrt-...-1", "appPrefix": "DLT", "metadata": { "productId": "in_GSTInvoice__1.1", "transactionId": "TRANSACTION-ID", "documentId": "DOCUMENT-ID", "erpDocumentId": "ERP-DOCUMENT-ID", "erpSystemId": "SystemERP", "processType": "0", "taxId": "YOUR-TAXID", "sciCloudStatusCode": "101", "sciResponseCode": "IP", "sciStatusAction": "NOA" }, "content": "PD...2U+", "createdDate": 1686579756 } ] } }
- GET /documents/IN/{documentId}/notifications
- The supplier can send a GET request to the /documents/IN/{documentId}/notifications endpoint to retrieve application responses related to a single document. To make this request, set the following path parameter:
Name Type Required Description documentId string Yes The ID of the document returned in step 1 - Request sample
-
curl --location --request GET 'https://api-test.sovos.com/v1/documents/IN/{documentId}/notifications' \ --header 'Content-Type: application/json' \ --header 'Authorization: Bearer TOKEN' \ --header 'x-correlationId: SET-TO-UNIQUE-VALUE'
- Response sample
-
{ "status": 200, "message": "Notifications Listed", "success": true, "timestamp": 0, "data": { "pageState": { "page": 1, "perPage": 20, "totalEntries": 1, "totalPages": 1 }, "notifications": [ { "notificationId": "6385272d-...-e35e80b3b8e7", "correlationId": "rrt-...-1", "appPrefix": "DLT", "metadata": { "productId": "in_GSTInvoice__1.1", "transactionId": "TRANSACTION-ID", "documentId": "DOCUMENT-ID", "erpDocumentId": "ERP-DOCUMENT-ID", "erpSystemId": "SystemERP", "processType": "0", "taxId": "YOUR-TAXID", "sciCloudStatusCode": "101", "sciResponseCode": "IP", "sciStatusAction": "NOA" }, "content": "PD...2U+", "createdDate": 1686579756 } ] } }
Step 6: Supplier marks the application responses as acknowledged
The supplier must process the retrieved application responses and mark them as acknowledged. This can be done by sending a PUT request to the /notifications/IN endpoint.
To make this request, set the following request body parameters:
Name | Type | Required | Description |
---|---|---|---|
status | string | Yes | Enter "read" |
notificationId | string | Yes | The ID of the notification that must be marked as acknowledged |
- Request sample
-
curl --location --request PUT 'https://api-test.sovos.com/v1/notifications/IN' \ --header 'Content-Type: application/json' \ --header 'Authorization: Bearer TOKEN' \ --header 'x-correlationId: SET-TO-UNIQUE-VALUE' \ --data-raw '[ { "status": "read", "notificationId": "DOCUMENT-ID" } ]'
- Response sample
-
{ "status": 200, "message": "OK", "success": true, "timestamp": 1657019349646, "data": {} }
Issue invoice
Issuing invoices in India is based on the Default business process, which follows this order: Mapping and Transmission. The following diagram provides a detailed overview:
This topic only describes the invoice clearance process in India. If signing invoices for integrity and authenticity purposes is part of your business process, you should also follow the guidelines in the Post Audit page. Invoice signing happens after the "map into PDF" step.
Step 1: Supplier creates the Standard Business Document
Every invoice sent to Sovos must be part of a Standard Business Document (SBD). This document includes a Standard Business Document Header (SBDH) and a Sovos Document node, which in turn includes a Sovos Canonical Invoice (SCI). To create the SBD, follow the detailed instructions in the SBDH, Sovos Document, and SCI pages.
Here are some key elements that should be included in the SBD:
Use the following values in the SBDH for invoices that use the SCI format.
Node | Required | Attributes | Value |
---|---|---|---|
StandardBusinessDocumentHeader.Sender.Identifier | Yes | Authority="IN" | Supplier's GSTIN |
StandardBusinessDocumentHeader.Sender.ContactInformation.Contact | Yes | The companyId registered during the configuration process | |
StandardBusinessDocumentHeader.Receiver.Identifier | Yes | Authority="IN" | |
StandardBusinessDocumentHeader.DocumentIdentification.Standard | Yes | urn:oasis:names:specification:ubl:schema:xsd:Invoice-2 | |
StandardBusinessDocumentHeader.DocumentIdentification.TypeVersion | Yes | 2.1 | |
StandardBusinessDocumentHeader.DocumentIdentification.Type | Yes | Invoice | |
StandardBusinessDocumentHeader.BusinessScope.Scope (with child nodes) | Yes |
Child node Child node | |
StandardBusinessDocumentHeader.BusinessScope.Scope (with child nodes) | Yes |
Child node Child node | |
StandardBusinessDocumentHeader.BusinessScope.Scope (with child nodes) | Yes |
Child node Child node | |
StandardBusinessDocumentHeader.BusinessScope.Scope (with child nodes) | Yes |
Child node Child node | |
StandardBusinessDocumentHeader.BusinessScope.Scope (with child nodes) | Yes |
Child node Child node | |
StandardBusinessDocumentHeader.BusinessScope.Scope.BusinessService.BusinessServiceName | Yes | Default | |
SovosDocument.SovosCanonicalInvoice.Invoice | Yes | SCI |
Alternatively, the supplier can use the local format (JSON) for invoices. Use the following values in the SBDH for documents that use the local invoice format.
Node | Required | Value |
---|---|---|
StandardBusinessDocumentHeader.DocumentIdentification.Standard | Yes | http://json-schema.org/draft-07/schema# |
StandardBusinessDocumentHeader.DocumentIdentification.TypeVersion | Yes | 1.03 |
StandardBusinessDocumentHeader.DocumentIdentification.Type | Yes | GSTInvoice |
StandardBusinessDocumentHeader.BusinessScope.Scope.BusinessService.BusinessServiceName | Yes | Transmission (Default can only be used for SCI) |
StandardBusinessDocumentHeader.BusinessScope.Scope (with child nodes) | No | Child node Type : Mapping.TransformDocument
|
StandardBusinessDocumentHeader.BusinessScope.Scope (with child nodes) | Yes | Child node Type : Mapping.OutputSchema
|
SovosDocument.SovosLegalDocument.GSTInvoice | Yes | The JSON invoice wrapped in a CDATA tag. |
Supported document types for the local format (JSON) document:
-
Invoice (INV)
-
Credit Note (CRN)
-
Debit Note (DBN)
The following notes are related to the content of the invoice, whether you are using SCI or the local format:
SCI node | JSON field | Required | Value | Notes |
---|---|---|---|---|
Invoice.AccountingSupplierParty.Party.PartyIdentification.ID | SellerDtls.Gstin | Yes | Supplier's GSTIN | This value is used in the identificationNumber field during the Create Branch API call. |
Invoice.ID | DocDtls.No | Yes | The value must not start with "0", "/", or "-" | |
Invoice.InvoiceTypeCode | Invoice.DocDtls.Typ | Yes | Enter "INV" for the issuance of invoice data, "CRN" for credit note data, and "DBN" for debit note data | When sending a credit note or a debit note, you must include a reference to the original invoice. You can do this by using the PrecDocDtls JSON block or the corresponding elements in the SCI. |
Invoice/Delivery/CarrierParty/PartyIdentification/ID and Invoice/Delivery/DeliveryLocation/Description | EwbDtls/TransId and EwbDtls.Distance | No | If you want to also generate an e-Waybill, you must enter the e-waybill details. If you provide these fields but omit the other fields, only part A of the e-Waybill is generated. In practice, this means that the assigned transporter must generate part B using the e-Waybill portal, since you cannot do this using the API. |
Include all the mandatory nodes, as specified in the SBDH schema. If the information cannot be provided, and the respective mandatory node has not been mentioned on the current page, for example the receiver.identifier
, the node can be left empty but must still be included in the SBDH.
- SBD sample
- Below is a sample of the SBD. In addition, there's a full sample of the SBD on the Postman Samples page.
<sbd:StandardBusinessDocument xmlns="http://uri.etsi.org/01903/v1.4.1#" xmlns:cac="urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2" xmlns:cbc="urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2" xmlns:sbd="http://www.unece.org/cefact/namespaces/StandardBusinessDocumentHeader" xmlns:xades="http://uri.etsi.org/01903/v1.3.2#" xmlns:ad="http://www.sovos.com/namespaces/additionalData" xmlns:sci="http://www.sovos.com/namespaces/sovosCanonicalInvoice" xmlns:svs="http://www.sovos.com/namespaces/sovosDocument" xmlns:sov="http://www.sovos.com/namespaces/sovosExtensions" xmlns:ds="http://www.w3.org/2000/09/xmldsig#" xmlns:ext="urn:oasis:names:specification:ubl:schema:xsd:CommonExtensionComponents-2" xmlns:inv="urn:oasis:names:specification:ubl:schema:xsd:Invoice-2"> <sbd:StandardBusinessDocumentHeader> <sbd:HeaderVersion>1.0</sbd:HeaderVersion> <sbd:Sender> <sbd:Identifier Authority="IN">08AAACI9260R002</sbd:Identifier> <sbd:ContactInformation> <sbd:Contact>08AAACI9260R002</sbd:Contact> <sbd:EmailAddress/> <sbd:FaxNumber/> <sbd:TelephoneNumber/> <sbd:ContactTypeIdentifier/> </sbd:ContactInformation> </sbd:Sender> <sbd:Receiver> <sbd:Identifier Authority="IN"/> <sbd:ContactInformation> <sbd:Contact/> <sbd:EmailAddress/> <sbd:FaxNumber/> <sbd:TelephoneNumber/> <sbd:ContactTypeIdentifier/> </sbd:ContactInformation> </sbd:Receiver> <sbd:DocumentIdentification> <sbd:Standard>urn:oasis:names:specification:ubl:schema:xsd:Invoice-2</sbd:Standard> <sbd:TypeVersion>2.1</sbd:TypeVersion> <sbd:InstanceIdentifier/> <sbd:Type>Invoice</sbd:Type> <sbd:MultipleType>false</sbd:MultipleType> <sbd:CreationDateAndTime>2020-06-16T00:31:52Z</sbd:CreationDateAndTime> </sbd:DocumentIdentification> <sbd:BusinessScope> <sbd:Scope> <sbd:Type>SenderDocumentId</sbd:Type> <sbd:InstanceIdentifier/> <sbd:Identifier>321412</sbd:Identifier> </sbd:Scope> <sbd:Scope> <sbd:Type>Country</sbd:Type> <sbd:InstanceIdentifier/> <sbd:Identifier>IN</sbd:Identifier> </sbd:Scope> <sbd:Scope> <sbd:Type>ProcessType</sbd:Type> <sbd:InstanceIdentifier/> <sbd:Identifier>Outbound</sbd:Identifier> </sbd:Scope> <sbd:Scope> <sbd:Type>Mapping.TransformDocument</sbd:Type> <sbd:InstanceIdentifier/> <sbd:Identifier>SCI-TO-LEGAL_INVOICE</sbd:Identifier> </sbd:Scope> <sbd:Scope> <sbd:Type>Mapping.OutputSchema</sbd:Type> <sbd:InstanceIdentifier/> <sbd:Identifier>GSTInvoice</sbd:Identifier> </sbd:Scope> <sbd:Scope> <sbd:Type>BusinessProcess</sbd:Type> <sbd:InstanceIdentifier/> <sbd:BusinessService> <sbd:BusinessServiceName>Default</sbd:BusinessServiceName> </sbd:BusinessService> </sbd:Scope> </sbd:BusinessScope> </sbd:StandardBusinessDocumentHeader> <svs:SovosDocument> <sci:SovosCanonicalInvoice> <inv:Invoice> *UBL Elements* </inv:Invoice> </sci:SovosCanonicalInvoice> </svs:SovosDocument> </sbd:StandardBusinessDocument>
Step 2: Supplier sends the SBD to Sovos
The supplier sends a POST request to the /documents endpoint.
The request must include the following request body parameters:
Name | Type | Required | Description |
---|---|---|---|
data | string | Yes | The SBD encoded in Base64, as created in step 1 |
dataEncoding | string | Yes | Enter "base64" |
- Request sample
-
curl --location --request POST 'https://api-test-tls.sovos.com/v1/documents' \ --header 'Content-Type: application/json' \ --header 'Authorization: Bearer TOKEN' \ --header 'x-correlationId: SET-TO-UNIQUE-VALUE' \ --data-raw '{ "data": "PD9...d4=", "dataEncoding" : "base64" }'
- Response sample
-
{ "timestamp": 1610532937756, "status": 200, "success": true, "message": "Process Completed", "data": { "notification": { "createdDate": "2020-06-16T00:31:52Z", "metadata": {}, "appPrefix": "TW", "notificationId": "MW242873231610532937726", "content": "PEF...ZT4=" } } }
Step 3: Sovos maps the SCI into JSON
This step will be skipped if the SBD contains the invoice in the local format (JSON).
Step 4: Sovos performs the schema validation
Sovos performs a schema validation to determine whether the JSON file conforms to the expected structure by validating the file against the official JSON schema.
Step 5: Sovos transmits the JSON
Sovos transmits the JSON file to the GSP, which in turn sends it to the tax authority.
Step 6: Tax authority processes the JSON
Upon receiving the file, the tax authority generates a hash (which becomes the IRN) and communicates with the GST to check for duplicate invoices. The tax authority also performs a schema validation and several business validations. It signs the JSON with its private key and generates and signs the QR code. If e-waybill details have been provided, an e-waybill is generated. Finally, the signed JSON is sent to the GST, where it is stored in the central registry and can be used for duplication checks.
Step 7: Tax authority Returns the JSON
After providing its services, the tax authority sends the signed JSON file, which includes the IRN and the signed QR code data, to the GSP. The GSP then returns the file to Sovos.
As a response to the initial POST request, because the transaction is synchronous, the supplier receives a JSON response with a status code and the application response encoded in Base-64 in the content field. The application response contains the signed JSON, the signed QR code data, the formal identifiers, IRN, acknowledgment number, and acknowledgment date. In addition, if an e-waybill has been generated, it also contains the e-waybill number, the e-waybill date, the e-waybill valid-till timestamp, and, optionally, remarks.
The signed document is the signed and cleared JSON file. The Base-64 encoded string must be decoded, which results in another Base-64 encoded string. This string is divided into three parts by two dots (.). The dots separate the header, the payload, and the signature. All three parts should be decoded separately. For more information, see the JWS JSON Serialization Overview.
Sample application response with only the part that includes the tax authority response:
<ext:UBLExtensions>
<ext:UBLExtension>
<ext:ExtensionContent>
<ad:AdditionalData>
<ad:Field name="EwbNo" type="FormalIdentifier">701008701804</ad:Field>
<ad:Field name="EwbDt" type="FormalIdentifier">2021-02-22 18:43:00</ad:Field>
<ad:Field name="EwbValidTill" type="FormalIdentifier">2021-02-23 23:59:00</ad:Field>
<ad:Field name="IRN" type="FormalIdentifier">28641fd7671af1a0250a0c6c6ca1152679c05f5860ade98a9dccf1f1a3706f74</ad:Field>
<ad:Field name="AckNo" type="FormalIdentifier">172110007896600</ad:Field>
<ad:Field name="AckDt" type="FormalIdentifier">2021-02-22 18:42:57</ad:Field>
</ad:AdditionalData>
</ext:ExtensionContent>
</ext:UBLExtension>
</ext:UBLExtensions>
Step 8: Archiving
You can compliantly archive the XML, the application response, and any graphical representation, such as a PDF, using Sovos' Compliant Archive.
For more information on standalone archiving, see the eArchiving documentation page.
Step 9: Supplier maps the JSON into PDF
For some use cases, you should generate a PDF document that includes a QR code. Sovos does not provide a mapping service or a QR Code generation service, so it is up to you to establish a business process in that case.
Step 10: Supplier sends the invoice to the buyer
The supplier must design a solution that accommodates the preferred business processes for delivering the invoice to the buyer because this process is outside the scope of Sovos and the tax authority.
GSTIN not active or not present in the invoice system
Suppose a scenario in which the client receives a 400 bad request with the subCode document.documentDataInvalid
. The message specifies the error code 3028 or 3029 and informs that the GSTIN is either invalid or not present in the invoice system. Here is a response sample:
{
"timestamp": 1615903378447,
"status": 400,
"success": false,
"message": "Bad Request",
"errors": [
{
"message": "Error code : 3028\r\nError Message : GSTIN -29AWGPV7107B1Z2 is invalid.",
"subCode": "document.documentDataInvalid"
}
]
}
While the GSTIN might be actually invalid or missing, this error also occurs if the e-invoicing system and the GST portal are not synchronized. To fix this synchronization error, log in to the e-invoicing portal and use the "Tax Payer / GSTIN" option in the search menu. This way, you can manually check the status and update the e-invoicing system with the information from the GST Portal. After that, you should retry issuing the invoice.
Duplicate invoices
Duplicate invoices are detected based on the identifier fields that you use to generate the IRN, namely the supplier's GSTIN, the Financial Year, the Document Type, and the Document Number. This duplication check is in place since there can only exist one invoice with the unique combination of these four fields.
If you issue a duplicate invoice within the next two days of the first issuance with the identifier fields populated with the exact same values as the first invoice, Sovos returns a 409 status code and a Base64-encoded application response with the exact same signed JSON and QR Code data returned when the invoice was issued. So, the application response indicates that the invoice has been rejected because of the duplication issue. Here is a sample response code:
{
"timestamp": 637384345673110000,
"success": false,
"status": 409,
"message": "Duplicate Document",
"data": {
"notification": {
"createdDate": 637384345673110000,
"metadata": {},
"appPrefix": "TW",
"notificationId": "7fd14d30491deb178036548e76edde68c05048290dfd5a6e95971cfb25354b15",
"content": "PEF...ZT4="
}
}
}
If you issue a duplicate invoice more than two days after the original issuance, you will not receive the application response containing the signed JSON and the QR code data. Instead, the response will contain a 400 status code and the error message will contain the error code 2283. This particular error code comes from the Indian tax authority and indicates that they cannot provide the IRN details because more than two days have elapsed since the original issuance.
e-Waybill not generated
You should take into account that if the e-waybill information contains errors and the invoice doesn't, the transaction will still pass, but the e-Waybill will not be created. To check whether the e-waybill has been created, see if the application response and the signed JSON returned contain the e-waybill information.
If the e-Waybill information is missing, its data didn't pass the IRP validation, so the application response Sovos returns will contain the IRP error codes and message.
Suppose there's an error in the e-Waybill details so it has not been generated, but the invoice has passed clearance. In that case, you can extract the IRN from the response and use it for the e-waybill generation process to subsequently generate the e-waybill using the Indirect Tax API.
Cancel invoice
You can only use the invoice cancellation method described here for cancellations within 24 hours of the invoice issuance. After 24 hours, you must either cancel the invoice on the GST Portal or issue a credit or a debit note. In addition, you cannot cancel an invoice if there is a valid e-Waybill for that IRN. Finally, once an invoice (IRN) is canceled, the same invoice number cannot be reused to generate another IRN.
The following diagram provides a detailed overview:
Step 1: Supplier sends a POST request to Sovos
When the supplier wants to cancel an invoice in India, they send a POST request to the /documents/IN/action endpoint. To make this request, set the following request body parameters:
Name | Type | Required | Description | ||
---|---|---|---|---|---|
actionCode | string | Yes | Enter "document.cancellation" | ||
documents | array of objects | Yes | An array of objects to include the metadata and the document ID | ||
metadata | object | No | An object that includes the required metadata | ||
reason | string | No | The reason for canceling the invoice. The max length is 100 characters. | ||
reasonCode | string | No | The reason code for the cancellation. For more information, see this NIC web page. | ||
companyId | string | The companyId registered during the configuration, which should be the GSTIN number.
| |||
branchId | string | The supplier's GSTIN number, registered in the branch during the configuration | |||
documentType | string | Enter "INCDJSON" | |||
documentId | string | Yes | The IRN of the invoice you want to cancel |
Only one invoice can be canceled per transaction, so you cannot enter multiple documentId
values in one request.
- Request sample
-
curl --location --request POST 'https://api-test.sovos.com/v1/documents/IN/action' \ --header 'Content-Type: application/json' \ --header 'Authorization: Bearer TOKEN' \ --header 'x-correlationId: SET-TO-UNIQUE-VALUE' \ --data-raw ' { "actionCode": "document.cancellation", "documents": [ { "metadata": { "reason": "{reason}", "reasonCode": "1", "companyId": "{companyId}", "branchId": "{branchId}", "documentType": "INCDJSON" }, "documentId": "{IRN of the invoice you want to cancel}" } ] }'
- Response sample
-
{ "timestamp": 1610532937756, "status": 200, "success": true, "message": "Process Completed", "data": { "notification": { "createdDate": "2020-06-16T00:31:52Z", "metadata": {}, "appPrefix": "TW", "notificationId": "MW242873231610532937726", "content": "PEF...ZT4=" } } }
Step 2: Sovos transmits the JSON
Sovos transmits the JSON to the GSP, which in turn sends it to the tax authority.
Step 3: Tax authority processes the JSON
The tax authority performs the schema validation, the hash validation, and the cancellation action.
Step 4: Tax authority returns the response
The tax authority sends the response along with the e-Waybill number to the GSP. Then, the GSP returns the response to Sovos.
As a response to the initial POST request, because the transaction is synchronous, the supplier receives a JSON response with a status code and the application response encoded in Base-64 in the content field. The application response contains the IRN of the canceled invoice and a timestamp of the cancellation.
Sample application response with the part that includes the IRP response:
<ext:UBLExtensions>
<ext:UBLExtension>
<ext:ExtensionContent>
<ad:AdditionalData>
<ad:Field name="IRN" type="FormalIdentifier">0a0f864812bf1cd7894ad53572f5cd8abf1ab4fbcf31eaa09e64c3164ca62b6f</ad:Field>
<ad:Field name="CancelDate" type="FormalIdentifier">2021-02-18 15:42:00</ad:Field>
</ad:AdditionalData>
</ext:ExtensionContent>
</ext:UBLExtension>
</ext:UBLExtensions>
Step 5: Archiving
You can compliantly archive the application response and the proof of cancellation using Sovos' Compliant Archive.
For more information on standalone archiving, see the eArchiving documentation page.
Step 6: Supplier informs the buyer
The supplier should inform the buyer about the invoice cancellation. This process is outside the scope of Sovos.
Issue e-Waybill
Before you can issue an e-waybill, you need to obtain a valid IRN by issuing the related invoice.
If you issued an e-Waybill while issuing the invoice, you don't need to issue the e-Waybill separately. This is also true if you only generated part A of the e-Waybill while issuing the invoice. In that case, the transporter must generate part B through the e-Waybill portal, so trying to use the API to issue the e-Waybill returns an error. Finally, you can only issue an e-Waybill for invoices that have at least one item with an HSN code that belongs to goods.
E-waybill generation in India is based on the Default business process, which follows this order: Transmission. The following diagram provides a detailed overview:
Step 1: Supplier creates the Standard Business Document
Every invoice sent to Sovos must be part of a Standard Business Document (SBD). This document includes a Standard Business Document Header (SBDH) and a Sovos Document node, which in turn includes a Sovos Canonical Invoice (SCI). To create the SBD, follow the detailed instructions in the SBDH, Sovos Document, and SCI pages.
Here are some key elements that should be included in the SBD:
Use the following values in the SBDH for invoices that use the SCI format.
Node | Required | Attributes | Value |
---|---|---|---|
StandardBusinessDocumentHeader.Sender.Identifier | Yes | Authority="IN" | Supplier's GSTIN |
StandardBusinessDocumentHeader.Sender.ContactInformation.Contact | Yes | The companyId registered during the configuration process | |
StandardBusinessDocumentHeader.Receiver.Identifier | Yes | Authority="IN" | |
StandardBusinessDocumentHeader.DocumentIdentification.Standard | Yes | urn:oasis:names:specification:ubl:schema:xsd:Invoice-2 | |
StandardBusinessDocumentHeader.DocumentIdentification.TypeVersion | Yes | 2.1 | |
StandardBusinessDocumentHeader.DocumentIdentification.Type | Yes | Invoice | |
StandardBusinessDocumentHeader.BusinessScope.Scope (with child nodes) | Yes |
Child node Child node | |
StandardBusinessDocumentHeader.BusinessScope.Scope (with child nodes) | Yes |
Child node Child node | |
StandardBusinessDocumentHeader.BusinessScope.Scope (with child nodes) | Yes |
Child node Child node | |
StandardBusinessDocumentHeader.BusinessScope.Scope (with child nodes) | Yes |
Child node Child node | |
StandardBusinessDocumentHeader.BusinessScope.Scope (with child nodes) | Yes |
Child node Child node | |
StandardBusinessDocumentHeader.BusinessScope.Scope.BusinessService.BusinessServiceName | Yes | Default | |
SovosDocument.SovosCanonicalInvoice.Invoice | Yes | SCI |
Alternatively, the supplier can use the local format (JSON). Use the following values in the SBDH for documents that use the local format.
Node | Required | Value |
---|---|---|
StandardBusinessDocumentHeader.DocumentIdentification.Standard | Yes | http://json-schema.org/draft-07/schema# |
StandardBusinessDocumentHeader.DocumentIdentification.TypeVersion | Yes | 1.03 |
StandardBusinessDocumentHeader.DocumentIdentification.Type | Yes | INEDJSON |
StandardBusinessDocumentHeader.BusinessScope.Scope.BusinessService.BusinessServiceName | Yes | Transmission (Default can only be used for SCI) |
StandardBusinessDocumentHeader.BusinessScope.Scope (with child nodes) | No | Child node Type : Mapping.TransformDocument
|
StandardBusinessDocumentHeader.BusinessScope.Scope (with child nodes) | Yes | Child node Type : Mapping.OutputSchema
|
SovosDocument.SovosLegalDocument.INEDJSON | Yes | A CDATA tag with the e-waybill in JSON |
Include all the mandatory nodes, as specified in the SBDH schema. If the information cannot be provided, and the respective mandatory node has not been mentioned on the current page, for example the receiver.identifier
, the node can be left empty but must still be included in the SBDH.
The IRN must match the IRN of the associated invoice and must be active.
- SBD sample
- Below is a sample of the SBD. In addition, there's a full sample of the SBD on the Postman Samples page.
<?xml version="1.0" encoding="UTF-8"?> <sbd:StandardBusinessDocument xmlns:sbd="http://www.unece.org/cefact/namespaces/StandardBusinessDocumentHeader" xmlns:cac="urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2" xmlns:cbc="urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2" xmlns:inv="urn:oasis:names:specification:ubl:schema:xsd:Invoice-2" xmlns:sci="http://www.sovos.com/namespaces/sovosCanonicalInvoice" xmlns:svs="http://www.sovos.com/namespaces/sovosDocument" xmlns:ad="http://www.sovos.com/namespaces/additionalData" xmlns:sov="http://www.sovos.com/namespaces/sovosExtensions" xmlns:ext="urn:oasis:names:specification:ubl:schema:xsd:CommonExtensionComponents-2"> <sbd:StandardBusinessDocumentHeader> <sbd:HeaderVersion>1.0</sbd:HeaderVersion> <sbd:Sender> <sbd:Identifier Authority="IN">08AAACI9260R002</sbd:Identifier> <sbd:ContactInformation> <sbd:Contact>08AAACI9260R002</sbd:Contact> <sbd:EmailAddress/> <sbd:FaxNumber/> <sbd:TelephoneNumber/> <sbd:ContactTypeIdentifier/> </sbd:ContactInformation> </sbd:Sender> <sbd:Receiver> <sbd:Identifier Authority="IN"/> <sbd:ContactInformation/> <sbd:Contact/> <sbd:EmailAddress/> <sbd:FaxNumber/> <sbd:TelephoneNumber/> <sbd:ContactTypeIdentifier/> </sbd:Receiver> <sbd:DocumentIdentification> <sbd:Standard>urn:oasis:names:specification:ubl:schema:xsd:Invoice-2</sbd:Standard> <sbd:TypeVersion>2.1</sbd:TypeVersion> <sbd:InstanceIdentifier/> <sbd:Type>Invoice</sbd:Type> <sbd:MultipleType>false</sbd:MultipleType> <sbd:CreationDateAndTime>2020-05-02T00:31:52Z</sbd:CreationDateAndTime> </sbd:DocumentIdentification> <sbd:BusinessScope> <sbd:Scope> <sbd:Type>SenderDocumentId</sbd:Type> <sbd:InstanceIdentifier/> <sbd:Identifier>100056</sbd:Identifier> </sbd:Scope> <sbd:Scope> <sbd:Type>Country</sbd:Type> <sbd:InstanceIdentifier/> <sbd:Identifier>IN</sbd:Identifier> </sbd:Scope> <sbd:Scope> <sbd:Type>ProcessType</sbd:Type> <sbd:InstanceIdentifier/> <sbd:Identifier>Outbound</sbd:Identifier> </sbd:Scope> <sbd:Scope> <sbd:Type>Mapping.TransformDocument</sbd:Type> <sbd:InstanceIdentifier/> <sbd:Identifier>SCI-TO-LEGAL_INVOICE</sbd:Identifier> </sbd:Scope> <sbd:Scope> <sbd:Type>Mapping.OutputSchema</sbd:Type> <sbd:InstanceIdentifier/> <sbd:Identifier>GSTEWayBill</sbd:Identifier> </sbd:Scope> <sbd:Scope> <sbd:Type>BusinessProcess</sbd:Type> <sbd:InstanceIdentifier/> <sbd:BusinessService> <sbd:BusinessServiceName>Default</sbd:BusinessServiceName> </sbd:BusinessService> </sbd:Scope> </sbd:BusinessScope> </sbd:StandardBusinessDocumentHeader> <svs:SovosDocument> <sci:SovosCanonicalInvoice> <inv:Invoice> *UBL Elements* </inv:Invoice> </sci:SovosCanonicalInvoice> </svs:SovosDocument> </sbd:StandardBusinessDocument>
Step 2: Supplier sends the SBD to Sovos
The supplier sends a POST request to the /documents endpoint.
The request must include the following request body parameters:
Name | Type | Required | Description |
---|---|---|---|
data | string | Yes | The SBD encoded in Base64, as created in step 1 |
dataEncoding | string | Yes | Enter "base64" |
- Request sample
-
curl --location --request POST 'https://api-test-tls.sovos.com/v1/documents' \ --header 'Content-Type: application/json' \ --header 'Authorization: Bearer TOKEN' \ --header 'x-correlationId: SET-TO-UNIQUE-VALUE' \ --data-raw '{ "data": "PD9...d4=", "dataEncoding" : "base64" }'
- Response sample
-
{ "timestamp": 1610532937756, "status": 200, "success": true, "message": "Process Completed", "data": { "notification": { "createdDate": "2020-06-16T00:31:52Z", "metadata": {}, "appPrefix": "TW", "notificationId": "MW242873231610532937726", "content": "PEF...ZT4=" } } }
Step 3: Sovos maps the SCI into JSON
This step will be skipped if the SBD contains the invoice in the local format (JSON).
Step 4: Sovos transmits the JSON
Sovos transmits the JSON file to the GSP, which in turn sends it to the tax authority.
Step 5: Tax authority processes the JSON
Upon receiving the file, the tax authority will communicate with the GST to check whether an e-Waybill already exists for the IRN. In addition, the tax authority performs a schema validation and several business validations. It issues the e-Waybill and stores it along with the GST for future duplication checks.
Step 7: Tax authority returns the response
After providing its services, the tax authority sends the response including the e-waybill number to the GSP. The GSP then returns the response to Sovos.
As a response to the initial POST request, because the transaction is synchronous, the supplier receives a JSON response with a status code and the application response encoded in Base-64 in the content field. The application response contains the e-waybill number, the e-waybill date (timestamp of creation) and the e-waybill valid-till timestamp.
Sample application response with only the part that includes the tax authority response:
<ext:UBLExtensions>
<ext:UBLExtension>
<ext:ExtensionContent>
<ad:AdditionalData>
<ad:Field name="EwbNo" type="FormalIdentifier">771008701595</ad:Field>
<ad:Field name="EwbDt" type="FormalIdentifier">2021-02-16 17:58:00</ad:Field>
<ad:Field name="EwbValidTill" type="FormalIdentifier">2021-02-17 23:59:00</ad:Field>
</ad:AdditionalData>
</ext:ExtensionContent>
</ext:UBLExtension>
</ext:UBLExtensions>
Step 8: Archiving
You can compliantly archive the application response and the proof of e-waybill generation using Sovos' Compliant Archive.
For more information on standalone archiving, see the eArchiving documentation page.
Step 9: Transportation
The supplier should send the e-Waybill outcome along with the transported goods to the buyer. This process is outside the scope of Sovos.
Duplicate e-Waybills
Only one e-Waybill can be issued per IRN. If you try to issue an e-Waybill based on a previously used IRN, Sovos returns a 409 status code and a Base64-encoded application response containing the exact same e-Waybill number, e-Waybill date, and e-Waybill valid-till timestamp from the first e-waybill generation. So, the application response indicates that the e-waybill has been rejected because of the duplication issue.
Here is a sample response code:
{
"timestamp": 637384345673110000,
"success": false,
"status": 409,
"message": "Duplicate Document",
"data": {
"notification": {
"createdDate": 637384345673110000,
"metadata": {},
"appPrefix": "TW",
"notificationId": "7fd14d30491deb178036548e76edde68c05048290dfd5a6e95971cfb25354b15",
"content": "PEF...ZT4="
}
}
}
Cancel e-Waybill
The following diagram provides a detailed overview:
You can only cancel an e-Waybill within 24 hours of generation.
Step 1: Supplier sends a POST request to Sovos
When the supplier wants to cancel an e-Waybill in India, they send a POST request to the /documents/IN/action endpoint. To make this request, set the following request body parameters:
Name | Type | Required | Description | ||
---|---|---|---|---|---|
actionCode | string | Yes | Enter "document.cancellation" | ||
documents | array of objects | Yes | An array of objects to include the metadata and the document ID | ||
metadata | object | No | An object that includes the required metadata | ||
reason | string | No | The reason for canceling the invoice. The max length is 100 characters. | ||
reasonCode | string | No | The reason code for the cancellation. For more information, see this NIC web page. | ||
companyId | string | The companyId registered during the configuration, which should be the GSTIN number.
| |||
branchId | string | The supplier's GSTIN number, registered in the branch during the configuration | |||
documentType | string | Enter "INECDJSON" | |||
documentId | string | Yes | The number of the e-Waybill you want to cancel |
Only one invoice can be canceled per transaction, so you cannot enter multiple documentId
values in one request.
- Request sample
-
curl --location --request POST 'https://api-test-tls.sovos.com/v1/documents/IN/action' \ --header 'Content-Type: application/json' \ --header 'Authorization: Bearer TOKEN' \ --header 'x-correlationId: SET-TO-UNIQUE-VALUE' \ --data-raw ' { "actionCode": "document.cancellation", "documents": [ { "metadata": { "reason": "{reason}", "reasonCode": "1", "companyId": "{companyId}", "branchId": "{branchId}", "documentType": "INECDJSON" }, "documentId": "{number of the e-waybill you want to cancel}" } ] }'
- Response sample
-
{ "timestamp": 1610532937756, "status": 200, "success": true, "message": "Action executed", "data": { "notification": { "createdDate": "2020-06-16T00:31:52Z", "metadata": {}, "appPrefix": "TW", "notificationId": "MW242873231610532937726", "content": "PEF...ZT4=" } } }
Step 2: Sovos transmits the JSON
Sovos transmits the JSON to the GSP, which in turn sends it to the tax authority.
Step 3: Tax authority processes the JSON
The tax authority performs the schema validation and the cancellation action.
Step 4: Tax authority returns the response
The tax authority sends the response along with the e-Waybill number to the GSP. Then, the GSP returns the response to Sovos.
As a response to the initial POST request, because the transaction is synchronous, the supplier receives a JSON response with a status code and the application response encoded in Base-64 in the content field. The application response contains the number of the cancelled e-waybill and a timestamp of the cancellation.
Sample application response with the part that includes the tax authority response:
<ext:UBLExtensions>
<ext:UBLExtension>
<ext:ExtensionContent>
<ad:AdditionalData>
<ad:Field name="EwbNo" type="FormalIdentifier">741008701695</ad:Field>
<ad:Field name="CancelDate" type="FormalIdentifier">18/02/2021 04:04:00 PM</ad:Field>
</ad:AdditionalData>
</ext:ExtensionContent>
</ext:UBLExtension>
</ext:UBLExtensions>
Step 5: Archiving
You can compliantly archive the application response and the proof of cancellation using Sovos' Compliant Archive.
For more information on standalone archiving, see the eArchiving documentation page.
GSTIN check
The following diagram provides a detailed overview:
Step 1: Taxable person sends a tax ID verification request
A taxable person sends a POST request to the /taxid-checks/IN endpoint. To make this request, set the following request body parameters:
Name | Name | Type | Required | Description |
---|---|---|---|---|
taxId | string | No | The GSTIN you want to verify | |
requester | object | No | An object that holds the requester's details | |
taxId | string | No | The requester's GSTIN, which is preregistered as identificationNumber in the branch, as part of the configuration process | |
legalName | string | No | The companyId registered during the configuration process |
- Request sample
-
curl --location --request POST 'https://api-test-tls.sovos.com/v1/taxid-checks/IN' \ --header 'Content-Type: application/json' \ --header 'Authorization: Bearer TOKEN' \ --header 'x-correlationId: SET-TO-UNIQUE-VALUE' \ --data-raw '{ "taxId": "TAX-ID", "requester": { "taxId": "REQUESTER-TAX-ID", "legalName": "REQUESTER-LEGALNAME" } } '
- Response sample
-
{ "timestamp": 1602847390224, "success": true, "status": 200, "message": "TaxId Check Complete", "data": { "taxId": "TAX-ID", "status": "Valid", "legalName": "LEGAL-NAME", "address": { "floor": "2ND FLOOR", "streetName": "STREET-NAME", "cityName": "CITY-NAME", "postalZone": 400025, "region": 27, "district": "DISTRICT", "addressLine": "ADDRESS-LINE", "country": "IN" }, "additionalData": { "traderValidity": "ACT", "traderTaxPayerType": "REG" } } }
Step 2: Sovos transmits the request
Sovos transmits the request to the GSP, which in turn sends it to the tax authority.
Step 3: Tax authority verifies the GSTIN
The tax authority verifies the GSTIN against the GSTIN database.
Step 4: Tax authority returns the response
The tax authority sends the result of the verification to the GSP, which forwards it to Sovos. The result contains a Status
node and some basic information related to the company to which the GSTIN belongs. The CompanyInfo.TraderValidity
node is important and can have the following values:
-
ACT = Active
-
CNL = Cancelled
-
INA = Inactive
-
PRO = Provision
The Status
node can have the values "Valid" or "Invalid". It should be noted that the value will only be "Valid" if the CompanyInfo.TraderValidity
node has the value "ACT". Any other value is considered "Invalid".
In addition, the CompanyInfo.TraderEWBStatus
node explains the ability of the taxpayer to issue an e-Waybill. It can have the following values:
- U (Unblocked)
- The taxpayer can issue an e-Waybill.
- B (Blocked)
- The taxpayer cannot issue an e-Waybill due to unfiled tax returns from the last two months.
Step 5: Sovos sends the result to the requester
Sovos sends the result to the requester. Because this is a synchronous process, the result is returned as a response to the POST request in step 1.
Step 6: Archiving
Sovos recommends archiving the evidence of using GSTIN checks with Sovos' Compliant Archive.
For more information on standalone archiving, see the eArchiving documentation page.