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:

https://einv-gsp-sandbox.internal.cleartax.co/

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.

In case you want to add the SSL certificate of our sandbox host to your trust manager, you can download it here.

Sandbox Public Key

-----BEGIN PUBLIC KEY-----
MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEArxd93uLDs8HTPqcSPpxZ
rf0Dc29r3iPp0a8filjAyeX4RAH6lWm9qFt26CcE8ESYtmo1sVtswvs7VH4Bjg/F
DlRpd+MnAlXuxChij8/vjyAwE71ucMrmZhxM8rOSfPML8fniZ8trr3I4R2o4xWh6
no/xTUtZ02/yUEXbphw3DEuefzHEQnEF+quGji9pvGnPO6Krmnri9H4WPY0ysPQQ
Qd82bUZCk9XdhSZcW/am8wBulYokITRMVHlbRXqu1pOFmQMO5oSpyZU3pXbsx+Ox
IOc4EDX0WMa9aH4+snt18WAXVGwF2B4fmBk7AtmkFzrTmbpmyVqA3KO2IjzMZPw0
hQIDAQAB
-----END PUBLIC KEY-----

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:

https://einv-gsp.cleartax.in

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.

In case you want to add the SSL certificate of our production host to your trust manager, you can download it here.

API documentation

Authentication

All requests require the user authentication token in the request header.

X-CT-Auth-Token: <YOUR-AUTH-TOKEN-HERE>

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:

{{HOST}}/vital/v1.03/auth

Generate E-Invoice:

{{HOST}}/core/v1.03/Invoice

Cancel E-Invoice:

{{HOST}}/core/v1.03/Invoice/Cancel

Get E-Invoice By IRN:

{{HOST}}/core/v1.03/Invoice/irn/{{IRN}}

Get GSTIN Details:

{{HOST}}/vital/v1.03/Master/gstin/{{GSTIN_NO}}

Generate E-Waybill By IRN:

{{HOST}}/eiewb/v1.03/ewaybill

Cancel E-Waybill:

{{HOST}}/eiewb/v1.03/ewaybill

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‚Äč