# E-Invoicing GSP API Reference

## Environments

ClearTax E-Invoicing GSP has 2 environments:

1. Sandbox Environment
2. Production Environment

## 1. 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.

{% hint style="danger" %}
Sandbox accepts ONLY some specific GSTIN as seller, receiver, and consignee. Please do not use other GSTINs. [See the list of accepted GSTINs](/cleartax-docs/e-invoicing-gsp-api/getting-started-with-einv-gsp-api/sandbox-gstin-for-einv-gsp.md).
{% endhint %}

### **1.1** API URLs to be used/whitelisted

For API requests to the sandbox environment, use the below information.

<table><thead><tr><th width="150">API Type</th><th width="387.0585821056724">Hostname</th><th>IP</th></tr></thead><tbody><tr><td>EINV GSP</td><td><code>https://api-sandbox.clear.in</code></td><td>75.2.104.91 AND 99.83.130.139</td></tr></tbody></table>

**Port**: 443

### **1.2** SSL/TLS Certificate to be downloaded and installed

For detailed information on how to download the host, intermediate, and root certificate&#x73;**,** you can always refer to [How to get SSL Certificate](/cleartax-docs/general/how-to-get-the-ssl-certificate-of-a-host.md). Alternatively, you can also download the certificates directly from the below links.

<table><thead><tr><th width="189.74317817014446">API Type</th><th width="483.66974224980265" data-type="files">Certificate(s)</th></tr></thead><tbody><tr><td>EINV GSP</td><td><a href="/files/nqETusOJtVAokRclJu9a">/files/nqETusOJtVAokRclJu9a</a><a href="/files/H2xZpmLNy4TeNKNkLqRB">/files/H2xZpmLNy4TeNKNkLqRB</a><a href="/files/7mCjv1LMEfNci5l5sKWG">/files/7mCjv1LMEfNci5l5sKWG</a></td></tr></tbody></table>

**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-----
```

## 2. 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.

### **2.1** API URLs to be used/whitelisted

For API requests to the production environment, use the below information.

<table><thead><tr><th width="150">API Type</th><th width="387.0585821056724">Hostname</th><th>IP</th></tr></thead><tbody><tr><td>EINV GSP</td><td><code>https://api.clear.in</code></td><td>13.248.191.113 AND 76.223.59.133</td></tr></tbody></table>

**Port**: 443

### 2.2 SSL/TLS Certificate to be downloaded and installed

For detailed information on how to download the host, intermediate, and root certificate&#x73;**,** you can always refer to [How to get SSL Certificate](/cleartax-docs/general/how-to-get-the-ssl-certificate-of-a-host.md). Alternatively, you can also download the certificates directly from the below links.

<table><thead><tr><th width="189.74317817014446">API Type</th><th width="483.66974224980265" data-type="files">Certificate(s)</th></tr></thead><tbody><tr><td>EINV GSP</td><td><a href="/files/nqETusOJtVAokRclJu9a">/files/nqETusOJtVAokRclJu9a</a><a href="/files/H2xZpmLNy4TeNKNkLqRB">/files/H2xZpmLNy4TeNKNkLqRB</a><a href="/files/7mCjv1LMEfNci5l5sKWG">/files/7mCjv1LMEfNci5l5sKWG</a></td></tr></tbody></table>

**Production Public Key**

```
-----BEGIN PUBLIC KEY-----
MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAjo1FvyiKcQ9hDR2+vH0+
O2XazuLbo2bPfRiiUnpaPhE3ly+Pwh05gvEuzo2UhUIDg98cX4E0vbfWOF1po2wW
TBxb8jMY1nAJ8fz1xyHc1Wa7KZ0CeTvAGeifkMux7c22pMu6pBGJN8f3q7MnIW/u
SJloJF6+x4DZcgvnDUlgZD3Pcoi3GJF1THbWQi5pDQ8U9hZsSJfpsuGKnz41QRsK
s7Dz7qmcKT2WwN3ULWikgCzywfuuREWb4TVE2p3e9WuoDNPUziLZFeUfMP0NqYsi
GVYHs1tVI25G42AwIVJoIxOWys8Zym9AMaIBV6EMVOtQUBbNIZufix/TwqTlxNPQ
VwIDAQAB
-----END PUBLIC KEY-----
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.cleartax.in/cleartax-docs/e-invoicing-gsp-api/e-invoicing-gsp-api-reference.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
