> For the complete documentation index, see [llms.txt](https://docs.cleartax.in/cleartax-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.cleartax.in/cleartax-docs/e-invoicing-ksa-api/e-invoicing-ksa-api-reference.md).

# E-Invoicing KSA API Reference

## 1. API URLs to be used/whitelisted

For API requests, use the below information.

### 1.1 Sandbox Environment (QA, Testing)

<table><thead><tr><th width="162">API Type</th><th width="290">Hostname</th><th width="145">IP</th><th>Port</th></tr></thead><tbody><tr><td>API</td><td>https://api-sandbox.cleartax.com</td><td>193.122.66.8<br>84.8.110.211</td><td>443</td></tr></tbody></table>

Please whitelist both the IPs on sandbox if it is required in your network environment or ERP.

**Base URL**:

```
https://api-sandbox.cleartax.com/middle-east/ksa/einvoicing
```

{% hint style="success" %}
Please note that the above URL is for API requests only. The corresponding frontend web application URL where you can log in and verify the data is <https://app-sandbox.cleartax.com/middle-east/ksa/einvoicing/>
{% endhint %}

### 1.2 Production Environment (Prod)

<table><thead><tr><th width="162">API Type</th><th width="290">Hostname</th><th width="145">IP</th><th>Port</th></tr></thead><tbody><tr><td>API</td><td>https://api.cleartax.com</td><td>150.230.55.2</td><td>443</td></tr></tbody></table>

**Base URL**:

```
https://api.cleartax.com/middle-east/ksa/einvoicing
```

{% hint style="success" %}
Please note that the above URL is for API requests only. The corresponding frontend web application URL where you can log in and verify the data is <https://app.cleartax.com/middle-east/ksa/einvoicing/>
{% endhint %}

## 2. SSL/TLS Certificate to be downloaded and installed

{% hint style="info" %}
**Note**: This is a multidomain SAN (Subject Alternative Name) certificate, utilized across all products within the Clear ecosystem and is common for both sandbox and production environments.
{% endhint %}

<table><thead><tr><th width="201">For Hostname</th><th width="202.66668701171875">Applicable Up to</th><th data-type="files">Certificate</th></tr></thead><tbody><tr><td>*.cleartax.com</td><td>24th February 2027</td><td><a href="/files/9fgUagjEdAPFG0EHtVHp">/files/9fgUagjEdAPFG0EHtVHp</a></td></tr><tr><td>Intermediate</td><td>3rd May 2031</td><td><a href="/files/ER8CqUPxL01j2K2JsA1g">/files/ER8CqUPxL01j2K2JsA1g</a></td></tr><tr><td>Root</td><td>1st Jan 203</td><td><a href="/files/9QSdkliUwQk82SOnrW4h">/files/9QSdkliUwQk82SOnrW4h</a></td></tr></tbody></table>

**TLS Versions Supported:** TLS 1.2

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.
