Setting up your account

By default, the sandbox system will only accept the following GSTIN as the seller GSTIN. Please reach out to your Account Manager in Cleartax if you want to test with your own production GSTIN.

State

GSTIN

Karnataka

29AAFCD5862R000

Gujarat

24AAFCD5862R005

ANDAMAN AND NICOBAR ISLANDS

35AAFCD5862R010

ANDHRA PRADESH

37AAFCD5862R011

ASSAM

18AAFCD5862R020

BIHAR

10AAFCD5862R019

DELHI

07AAFCD5862R007

GUJARAT

24AAFCD5862R005

HARYANA

06AAFCD5862R017

JAMMU AND KASHMIR

01AAFCD5862R015

MAHARASHTRA

27AAFCD5862R013

PUNJAB

03AAFCD5862R016

TAMIL NADU

33AAFCD5862R009

TELANGANA

36AAFCD5862R014

UTTAR PRADESH

09AAFCD5862R006

This API is currently NOT available in the staging environment.

ClearTax E-Invoicing is a value-added platform between your ERP and the Government portal. To start making any transaction via ClearTax, first you will have to update your ClearTax account with your NIC credentials. This is generally a one-time activity per user account unless you decide to change the NIC credentials.

In this guide, you will learn how to update NIC credentials in your ClearTax E-Invoicing account.

Adding/Updating NIC Credentials

You can add or update NIC credentials in ClearTax by sending a POST request to E-Invoicing API with the following request headers.

x-cleartax-auth-token: {{USER_AUTH_TOKEN}}
x-cleartax-product: EInvoice
Content-Type: application/json
gstin: {{GSTIN}}

Note: If you already have NIC credentials on your account, using this API will override existing credentials for the specified owner_id.

Request URL

POST: {{HOST}}/einv/v2/nic_credentials/store_nic_credentials

Sample URL

POST: https://api.clear.in/einv/v2/nic_credentials/store_nic_credentials

Request Header

Parameter
Data Type
Field Validations
Description

X-Cleartax-Auth-Token

String

NA

Mandatory. The auth token generated from ClearTax user id and password. Know how?

Content-Type

String

NA

Mandatory. This will always be "application/json".

gstin

String

NA

Mandatory. GSTIN number of the user

Request Path Params

There are no path parameters for this API.

Request Query Params

Parameter
Data Type
Field Validations
Description

shouldPersist

Boolean

NA

Optional. If true, credentials will be saved to the database. Otherwise the credentials will only be authenticated. Default - true

Request Body

Parameter
Data Type
Field Validations
Description

gstin

String

15 Characters

User's GSTIN

username

String

NA

User's NIC Username

password

String

NA

User's NIC Password

Sample Request

{
    "gstin": "29AAFCD5862R000",
    "username": "API_TEST",
    "password": "pwd@2022#"
}

Sample Response

{
    "success": true,
    "errorDetails": null
}

Last updated