GSTNexa

GSTR-2B: input tax credit

integration guide

The static monthly statement of the credit you may claim. Every rupee of ITC in your GSTR-3B has to be defensible against this document, which makes the reconciliation behind it the most valuable thing a GST application does.

All GST return guides

Overview

GSTR-2B is generated by the portal on the 14th for the previous month, from what your suppliers filed. Static is the whole point: it does not move afterwards, so a reconciliation run twice gives the same answer, and the figure you claimed in a return can be reproduced a year later when somebody asks.

Read-only, always

There is nothing to save and nothing to file. 2B is something you pull, store and reconcile against — the only write in this whole area is IMS.

Generated, then frozen

Before the 14th you can ask for it early with gen2b. After it exists, it is fixed for that period, whatever suppliers do later.

It decides your 3B

Table 4 of GSTR-3B — eligible credit — is the output of this reconciliation. Build that table from the match result, never by hand.

2B against 2A

GSTR-2AGSTR-2B
Nature Live — it moves as suppliers file Static — frozen once generated
Generated Continuously On the 14th, for the previous month
Use it for Chasing a supplier mid-month Claiming credit in GSTR-3B
Do not use it for Computing ITC — it will not reproduce Real-time follow-up — it is already closed

API inventory

MethodPathPurpose
PUT /gstr2b/gen2b Ask the portal to generate the 2B for a period, before its own run
GET /gstr2b/get2b Status of that generation
GET /gstr2b/all The whole statement, once generated
GET /gstr2a/b2b Live supplier invoices, as they are filed
GET /gstr2a/cdn Live credit and debit notes
GET /gstr2a/isd Credit distributed by an Input Service Distributor
GET /gstr2a/impg Imports of goods, from ICEGATE
GET /gstr2a/impgsez Imports from an SEZ unit
GET /gstr2a/tds TDS credit against you
GET /gstr2a/tcs TCS collected by e-commerce operators
GET /gstr2a/amdhist Amendment history of a document

Before any call

No return API works without a live taxpayer session. Every flow on this site starts the same way, and the session is shared across returns — authenticate once per taxpayer, not once per return.

  1. 1 The taxpayer enables API access On the GST portal: My Profile → Manage API Access, choosing a session duration.
  2. 2 Request the OTP GET /authentication/otprequest?email= with headers gst_username, state_cd, ip_address, client_id, client_secret.
  3. 3 Exchange it for a token GET /authentication/authtoken?email=&otp= with the same headers plus txn. The sandbox OTP is 575757.
  4. 4 Keep it alive GET /authentication/refreshtoken before expiry. If the refresh fails, request a new OTP. Never retry a filing call on an expired session.
  5. 5 Pre-check Use GET /gstr/rettrack to confirm the period you are reconciling is closed before you start.

The one that catches everyone: GET calls carry the period in the query string as retperiod, while PUT and POST carry it as a header named ret_period.

Pulling a 2B

From IMS decisions to GSTR-3B table 4 7 steps
  1. 1 Open a session authentication/authtoken
  2. 2 Settle IMS first PUT /ims/save Anything left pending is simply not in this 2B.
  3. 3 Ask for generation PUT /gstr2b/gen2b Only needed before the portal’s own run on the 14th.
  4. 4 Poll generation GET /gstr2b/get2b Back off; it is not instant.
  5. 5 Pull the statement GET /gstr2b/all Store it whole — it will not change again.
  6. 6 Match against purchases By GSTIN, invoice number, date and value.
  7. 7 Feed GSTR-3B table 4 Eligible credit, reversals and what is left.

Steps 3 and 4 are only needed before the portal's own generation on the 14th. After that, go straight to the statement.

IMS: deciding first

The Invoice Management System sits in front of 2B. Each supplier invoice is accepted, rejected or held as pending, and the decision changes what reaches your statement. Anything still pending when the 2B is generated is simply not in it — silence is a decision, and it costs the taxpayer credit for that month.

MethodPathPurpose
GET /ims/invoices Everything waiting for a decision
GET /ims/invoicescount Counts by status, for a dashboard
GET /ims/supplierInvoices The same, narrowed to one supplier
PUT /ims/save Record accept, reject or pending against invoices
PUT /ims/reset Undo decisions and start the period again
GET /ims/status Whether your decisions have been processed
GET /ims/rejectedInvoices Liability added back from rejections
GET /ims/getfile The bulk file, for a large period

Reject an invoice and the credit does not merely disappear — the liability is added back to the supplier. Make rejection a deliberate action in your UI, with a reason, and show the taxpayer what is still pending as the 14th approaches.

Reconciliation

Match the statement against your own purchase register. Four outcomes, and each needs somewhere to go in the UI.

Matched

Same supplier, document and value. Claim it.

Mismatched

Found on both sides, but a value, date or document number differs. Show the two rows side by side and let the user decide which is right.

In 2B only

The supplier filed something you have not booked. Usually a missing purchase entry, sometimes an invoice raised against the wrong GSTIN.

In books only

You have the invoice, the supplier has not filed it. No credit this month. This is the list worth sending to suppliers.

Keep ineligible credit separate rather than dropping it: blocked credit under section 17(5) and anything for a different period still belongs in the record, just not in the claim.

Developer checklist

The ticks are yours alone — nothing is saved or sent anywhere.

Stuck on one of these calls against a sandbox GSTIN? The agent knows these flows.

Ask the GST AI Agent All return guides

We use cookies to give you the best possible experience while you browse through our website. By pursuing the use of our website you implicitly agree to the usage of cookies on this site. Learn more

Your Cookie Preference

We use different types of cookies to optimize your experience on our website. Click on the categories that you want to allow. Visit our website to learn more about our Cookie Policy.

Essential

These cookies are necessary for the basic functionality of the website. Without these cookies, certain functions, like sign-in and your saved preferences, will not work.

Performance

These cookies are used to enhance your browsing experience and assist us with support tools, such as live chat.

Analytics

These cookies help us understand how our website is used, so we can improve it over time.