> 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-api/e-invoicing-api-reference/rcm-self-invoicing-purchase-documents-clear-schema.md).

# RCM Self-Invoicing (Purchase Documents)- Clear schema

Summary:  GSTN is bringing recipient-generated RCM self-invoices (Section 31(3)(f) of the CGST Act) under e-invoicing through two new supply types — RCMDOM (purchases from unregistered domestic suppliers under Section 9(4)) and RCMIMP (import of services from foreign suppliers under Section 5(3)/5(4) of the IGST Act). For these documents, you, the buyer, generate the IRN, and the supplier's GSTIN is the literal value of the URP

<mark style="color:$danger;">**Effective (NIC go-live): as notified by GSTN. ClearTax will share sandbox and production availability dates separately.**</mark>

**Who must act:** any integration that will generate or manage RCM self-invoices (RCMDOM / RCMIMP). Existing sales integrations need no change — when invoiceType is not sent, it defaults to SALES.

## 1. Getting started

#### 1.1  Request headers:

<table data-header-hidden="false" data-header-sticky><thead><tr><th width="305.5" align="center">Header</th><th width="299.1666259765625" align="center">Value</th></tr></thead><tbody><tr><td align="center"><code>gstin</code></td><td align="center">The GSTIN you are transacting for. For purchase self-invoices, this is your own (buyer) GSTIN.</td></tr><tr><td align="center"><code>x-cleartax-auth-token</code></td><td align="center">Your ClearTax authentication token.</td></tr><tr><td align="center"><code>Content-Type</code></td><td align="center">application/json</td></tr><tr><td align="center"><code>invoiceType (New)</code></td><td align="center">Optional. SALES or PURCHASE. Default: SALES. Send PURCHASE on every call listed in Section 2 when the document is an RCMDOM / RCMIMP self-invoice.</td></tr></tbody></table>

### 1.2  **How a purchase self-invoice differs from a sales invoice**

* Supply type (TranDtls.SupTyp): RCMDOM or RCMIMP.
* Reverse charge (TranDtls.RegRev): must be Y.
* Supplier GSTIN (SellerDtls.Gstin): the literal URP (Unregistered Person). Supplier legal name, address, location, state code, and PIN remain mandatory.
* Buyer GSTIN (BuyerDtls.Gstin): your GSTIN. It must be active, enabled for e-invoicing, and a Regular or Casual taxpayer. Send the same GSTIN in the gstin header.
* Document types: INV, CRN or DBN
* Document Uniqueness: document number has to be unique per FY per doc type.

### 1.3 Rules by supply type

|                                 Rule                                 |                                        RCMDOM                                       |                                                       RCMIMP                                                       |
| :------------------------------------------------------------------: | :---------------------------------------------------------------------------------: | :----------------------------------------------------------------------------------------------------------------: |
|                               Supplier                               | Unregistered domestic supplier. Origin country`(ItemList[].OrgCntry)` must be `IN`. | <p>Foreign supplier: Supplier State Code must be <code>96</code> (Other Country) as for imports/foreign suppliers. |
| <br>Foreign supplier PIN should be passed as <code>999999</code></p> |                                                                                     |                                                                                                                    |
|                           Goods / services                           |                          Both allowed `(IsServc = Y or N)`.                         |                              Services only (`IsServc = Y`). A valid SAC is mandatory.                              |
|                                  Tax                                 |  Same state as place of supply: CGST + SGST (IGST must be 0). Otherwise: IGST only. |                IGST only, and IGST must be reported. Place of supply must be your (recipient) state.               |
|                           E-commerce GSTIN                           |                                       Allowed.                                      |                                                          -                                                         |
|                              E-way bill                              |                                  Allowed for goods.                                 |                                                   Not applicable.                                                  |

### 1.4 Response & error handling

* Response formats are unchanged: Success: "Y" means the request was accepted; for Success: "N", check ErrorDetails.
* If invoiceType does not match the document (for example, SALES sent for a purchase IRN), the request is rejected with a ClearTax error (error\_source: "CLEARTAX").
* GSTN validation errors for RCM self-invoices are returned as-is, with error\_source: "GOVT"

### 2. Affected APIs&#x20;

### ClearTax schema :

|            API            |                         Endpoint                         |                                           What changes                                          |
| :-----------------------: | :------------------------------------------------------: | :---------------------------------------------------------------------------------------------: |
|        Generate IRN       |             PUT `/einv/v2/eInvoice/generate`             |                              New supply Type Values in Request body                             |
|         Cancel IRN        |  <p>PUT </p><p><code>/einv/v2/eInvoice/cancel</code></p> |                                     Add `invoiceType` header                                    |
|     Get E-Invoice PDF     | <p>GET</p><p><code>/einv/v2/eInvoice/download</code></p> |                                     Add `invoiceType` header                                    |
|    Get E-Invoice by IRN   |   <p>GET </p><p><code>/einv/v2/eInvoice/get</code></p>   |                                     Add `invoiceType` header                                    |
|    Get Invoice Details    | <p>GET </p><p><code>/einv/v1/einvoices/detail</code></p> | Add `invoiceType` header; new `buyerGstin` query param for purchase lookups by document details |
|  Send E-Invoice via Email |            POST `/einv/v0/communication/send`            |                  Add `invoiceType` header; not supported for purchase documents                 |
| Generate E-Waybill by IRN |             POST `/einv/v2/eInvoice/ewaybill`            |                                     Add `invoiceType` header                                    |
|                           |                                                          |                                                                                                 |

### Government Schema:

|            API            |                              Endpoint                             |       What changes       |
| :-----------------------: | :---------------------------------------------------------------: | :----------------------: |
|        Generate IRN       |                  POST `/einv/v1/govt/api/Invoice`                 | Add `invoiceType` header |
|         Cancel IRN        |                  POST `/einv/v1/govt/api/Cancel`                  | Add `invoiceType` header |
|     Get Invoice by IRN    |             GET /`einv/v1/govt/api/Invoice/irn/{irn}`             | Add `invoiceType` header |
| Generate E-Waybill by IRN | <p>POST</p><p><code>/einv/v1/govt/api/einvewb/ewaybill</code></p> | Add `invoiceType` header |
