E-Invoicing GSP API Reference

Environments

ClearTax E-Invoicing GSP has 2 environments:
    1.
    Sandbox Environment
    2.
    Production Environment

Sandbox Environment

For testing, it is recommended to always use the sandbox environment. To create an account, contact our sales representative.
For API requests to the sandbox environment, use the below information.
Sandbox accepts ONLY some specific GSTIN as seller, receiver and consignee. Please do not use other GSTIN. See the list of accepted GSTINs.
Host:
1
https://einv-gsp-sandbox.internal.cleartax.co/
Copied!
Port: 443
IP: ClearTax does not use static IP for APIs. You can whitelist the endpoints based on the host.
SSL Certificate:
Our root Certifying Authority is "Amazon Root CA 1". You can get the CER or PEM file directly from Amazon's website here: https://www.amazontrust.com/repository/ or download it here.
AmazonRootCA1.cer
837B
Binary
Amazon Root CA 1
In case you want to add the SSL certificate of our sandbox host to your trust manager, you can download it here.
cleartax.co.cer
1KB
Binary
ClearTax Sandbox SSL
Sandbox Public Key
1
-----BEGIN PUBLIC KEY-----
2
MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEArxd93uLDs8HTPqcSPpxZ
3
rf0Dc29r3iPp0a8filjAyeX4RAH6lWm9qFt26CcE8ESYtmo1sVtswvs7VH4Bjg/F
4
DlRpd+MnAlXuxChij8/vjyAwE71ucMrmZhxM8rOSfPML8fniZ8trr3I4R2o4xWh6
5
no/xTUtZ02/yUEXbphw3DEuefzHEQnEF+quGji9pvGnPO6Krmnri9H4WPY0ysPQQ
6
Qd82bUZCk9XdhSZcW/am8wBulYokITRMVHlbRXqu1pOFmQMO5oSpyZU3pXbsx+Ox
7
IOc4EDX0WMa9aH4+snt18WAXVGwF2B4fmBk7AtmkFzrTmbpmyVqA3KO2IjzMZPw0
8
hQIDAQAB
9
-----END PUBLIC KEY-----
Copied!

Production Environment

Once you have completed testing, you can move to production. To create an account, contact our sales representative.
For API requests to the production environment, use the below information.
Host:
1
https://einv-gsp.cleartax.in
Copied!
Port: 443
IP: ClearTax does not use static IP for APIs. You can whitelist the endpoints based on the host.
SSL Certificate:
Our root Certifying Authority is "Amazon Root CA 1". You can get the CER or PEM file directly from Amazon's website here: https://www.amazontrust.com/repository/ or download it here.
AmazonRootCA1.cer
837B
Binary
Amazon Root CA 1
In case you want to add the SSL certificate of our production host to your trust manager, you can download it here.
wildcard.cleartax.in.cer
1KB
Binary
EINV GSP Production Host SSL

API documentation

Authentication

All requests require the user authentication token in the request header.
1
X-CT-Auth-Token: <YOUR-AUTH-TOKEN-HERE>
Copied!
To generate an authentication token, please contact ClearTax GST Sales.
You DO NOT have to add client-id and client-secret to the request headers.

API Endpoints

Get Token:

1
{{HOST}}/vital/v1.04/auth
Copied!

Generate E-Invoice:

1
{{HOST}}/core/v1.03/Invoice
Copied!

Cancel E-Invoice:

1
{{HOST}}/core/v1.03/Invoice/Cancel
Copied!

Get E-Invoice By IRN:

1
{{HOST}}/core/v1.03/Invoice/irn/{{IRN}}
Copied!

Get IRN details by Doc. Details

1
{{HOST}}/core/v1.03/Invoice/irnbydocdetails?doctype={{DOC_TYPE}}&docnum={{DOC_NO}}&docdate={{DOC_DATE}}
Copied!

Get GSTIN Details:

1
{{HOST}}/vital/v1.03/Master/gstin/{{GSTIN_NO}}
Copied!

Sync GSTIN Details from CP

1
{{HOST}}/vital/v1.04/Master/syncgstin/{{GSTIN_NO}}
Copied!

Generate E-Waybill By IRN:

1
{{HOST}}/eiewb/v1.03/ewaybill
Copied!

Cancel E-Waybill:

1
{{HOST}}/ewb/v1.03/ewayapi
Copied!

Get EWB Details By IRN

1
{{HOST}}/eiewb/v1.03/ewaybill/irn/{{IRN}}
Copied!
For API request/response payloads, please refer https://einv-apisandbox.nic.in/index.html published by NIC.

Error Codes

In case you have received an error code from NIC, you can check the description of the code here: https://einv-apisandbox.nic.in/api-error-codes-list.html
Last modified 1mo ago