# E-Invoicing API Reference

For information on environments, host name, IP, port, TLS certificates, refer to:

{% content-ref url="../clear-finance-cloud/cfc-api-reference" %}
[cfc-api-reference](https://docs.cleartax.in/cleartax-docs/clear-finance-cloud/cfc-api-reference)
{% endcontent-ref %}

## Different sets of E-Invoicing API&#x20;

ClearTax E-Invoicing provides 2 kinds of APIs:

1. Government Compatible APIs
2. ClearTax E-Invoicing APIs

These are synchronous APIs that cater to basic e-invoicing functionalities and the schema is compatible with the schema provided by the government.

* Generate IRN
* Cancel IRN
* Get Invoice by IRN

These APIs are available for consumption in the staging environment.

{% content-ref url="e-invoicing-api-reference/cleartax-e-invoicing-apis-xml-schema" %}
[cleartax-e-invoicing-apis-xml-schema](https://docs.cleartax.in/cleartax-docs/e-invoicing-api/e-invoicing-api-reference/cleartax-e-invoicing-apis-xml-schema)
{% endcontent-ref %}

{% content-ref url="e-invoicing-api-reference/govt-compatible-apis" %}
[govt-compatible-apis](https://docs.cleartax.in/cleartax-docs/e-invoicing-api/e-invoicing-api-reference/govt-compatible-apis)
{% endcontent-ref %}

### Difference between ClearTax API and Government Compatible API

\| **Actions**&#x20;                                                  \| Government Compatible API&#x20;\| <p>

</p><p>ClearTax API</p> |
| ------------------------------------------------------------------ | ------------------------------ | ---------------------------- |
| **Generating IRN**                                                 | Y                              | Y                            |
| **Ability to send Custom fields**                                  | N                              | Y                            |
| **Retry IRN Generation (for invoices failed due to IRP failures)** | N                              | Y                            |
| **Invoice Validation**                                             | Y                              | Y                            |
| **Generating IRN (Bulk)**                                          | N                              | Y                            |
| **Canceling IRN**                                                  | Y                              | Y                            |
| **Getting IRN details**                                            | Y                              | Y                            |
| **Printing E-invoice**                                             | Y                              | Y                            |
