GST Reconciliation

Compares invoice records with ledger records and returns reconciliation results, including matched records, mismatches and reported missing-record counts.

API Details

Method: POST

Endpoint: /gst-recon/reconcile

Base URL: https://uatapi.wowpe.in/api/api/api-module

Authentication

HeaderTypeDescription
X-Client-IdStringClient ID provided by WowPe.
X-Client-SecretStringClient secret provided by WowPe.
Content-TypeStringapplication/json.

Comparison Types

The endpoint is designed to support two reconciliation modes.

comparisonTypePurposeAvailability
Omitted or ledgerCompares invoice records against ledger records.Existing UAT behaviour documented.
statementCompares a purchase register against a GSTR-2A/GSTR-2B statement snapshot.Proposed; unified endpoint integration and UAT testing are pending.

Existing callers can omit comparisonType to retain the original ledger flow. Do not use statement mode until the integration is deployed and validated.

Request Parameters: Ledger Mode

Content-Type: application/json

ParameterTypeMandatoryDescription
invoicesArrayAs required by the existing contractInvoice records to reconcile.
ledgerArrayAs required by the existing contractLedger records to compare.
toleranceNumberOptionalAmount variance tolerance. The supplied model default is 0.01.
invoiceIdStringOptionalInvoice identifier or reference.
ledgerNameStringOptionalLedger name or reference.
comparisonTypeStringOptionalUse ledger to explicitly select invoice-versus-ledger reconciliation.

Invoice objects use fields such as id, sourceFile, sourcePages, beneficiaryName, uniqueRefNo, gstin, documentDate, documentType, extractionMethod, taxableValue, cgst, sgst, igst, gstAmount and reviewed.

Ledger objects use line, the corresponding supplier/reference/document fields and the five amount fields. Confirm the full DTO before constructing a production request.

Sample Request: Ledger Mode

{
  "comparisonType": "ledger",
  "invoices": [],
  "ledger": [],
  "tolerance": 0.01,
  "ledgerName": "example-ledger"
}

This shows the top-level structure only. Populate the arrays with records matching the approved DTO. Empty arrays are not a substitute for actual invoice or ledger data.

Sample Response: Ledger Mode

{
  "statusCode": 1,
  "message": "Success",
  "invoiceId": null,
  "ledgerName": "example-ledger",
  "totalInvoices": 1,
  "totalLedgerRows": 1,
  "matchedCount": 1,
  "mismatchCount": 0,
  "missingInLedgerCount": 0,
  "missingInInvoicesCount": 0,
  "tolerance": 0.01,
  "results": [
    {
      "id": "example-invoice-id",
      "beneficiary": "Example Supplier",
      "reference": "0007",
      "source": "invoice.pdf",
      "ledgerLine": 1,
      "invoiceGst": 180,
      "ledgerGst": 180,
      "variance": 0,
      "state": "Matched",
      "issues": []
    }
  ]
}

Note: Representative of the existing UAT response structure. The sample values are illustrative.

Request Parameters: Statement Mode

Availability: Proposed. Do not use until unified dispatch, authorization and UAT validation are complete.

ParameterTypeDescription
comparisonTypeStringMust be statement.
recipientGstinStringGSTIN associated with the purchase statement. The host must verify that the caller is authorized for this GSTIN.
statementTypeStringGSTR-2A or GSTR-2B.
statementPeriodStringStatement period in yyyy-MM format.
statementDownloadedAtStringStatement snapshot timestamp with timezone offset.
purchasePeriodStartStringInclusive start date for purchase documents.
purchasePeriodEndStringInclusive end date for purchase documents.
toleranceNumberVariance tolerance, default 0.01, supported range 0–100 currency units per numeric field.
purchasesArrayNormalized purchase-register records.
statementRowsArrayNormalized rows from the supplied portal statement snapshot.

The statement request supports up to 5,000 rows across both arrays. Submit one normalized statement snapshot per request. Raw nested portal exports, PDFs and multi-sheet files are not automatically parsed by this reconciliation mode.

Sample Request: Statement Mode

Proposed request only. This has not been executed through the unified HTTP endpoint.

{
  "comparisonType": "statement",
  "recipientGstin": "27FGHIJ5678K1Z2",
  "statementType": "GSTR-2B",
  "statementPeriod": "2026-04",
  "statementDownloadedAt": "2026-05-15T10:00:00Z",
  "purchasePeriodStart": "2026-04-01",
  "purchasePeriodEnd": "2026-04-30",
  "tolerance": 0.01,
  "purchases": [
    {
      "sourceId": "purchase-1",
      "sourceFile": "purchase-register.json",
      "sourceLocation": "rows[0]",
      "recipientGstin": "27FGHIJ5678K1Z2",
      "supplierGstin": "27ABCDE1234F1Z5",
      "documentNumber": "INV/1",
      "documentDate": "2026-04-01",
      "documentType": "Invoice",
      "taxableValue": 100,
      "cgst": 9,
      "sgst": 9,
      "igst": 0,
      "cess": 0
    }
  ],
  "statementRows": [
    {
      "sourceId": "statement-1",
      "sourceFile": "2b-normalized.json",
      "sourceLocation": "b2b[0]",
      "recipientGstin": "27FGHIJ5678K1Z2",
      "supplierGstin": "27ABCDE1234F1Z5",
      "documentNumber": "INV/1",
      "documentDate": "2026-04-01",
      "documentType": "Invoice",
      "statementPeriod": "2026-04",
      "isAmendment": false,
      "taxableValue": 100,
      "cgst": 9,
      "sgst": 9,
      "igst": 0,
      "cess": 0
    }
  ]
}

The example uses synthetic identifiers and amounts. Use authorized recipient and supplier data only after the integration and access checks have been implemented.

Statement Record Fields

Both purchases and statementRows use normalized document records. Important fields include:

ParameterTypeDescription
sourceIdStringUnique identifier within the input array.
sourceFileStringOriginal source file name.
sourceLocationStringOriginal row, sheet or JSON location.
recipientGstinStringRecipient GSTIN associated with the document.
supplierGstinStringSupplier GSTIN used for matching.
documentNumberStringInvoice or document reference.
documentDateStringDocument date.
documentTypeStringInvoice, CreditNote or DebitNote.
statementPeriodStringStatement period for statement rows; must match the request period.
isAmendmentBooleanIndicates whether the statement row is an amendment.
originalDocumentNumberStringOriginal document reference, where applicable.
originalDocumentDateStringOriginal document date, where applicable.
taxableValueNumber / NullTaxable amount.
cgstNumber / NullCentral GST amount.
sgstNumber / NullState GST amount.
igstNumber / NullIntegrated GST amount.
cessNumber / NullCess amount.
portalItcStatusStringOriginal portal ITC status retained as evidence, not an eligibility decision.

Supply explicit zero only when the source confirms zero. Keep unknown amounts distinct from zero. Credit-note amounts must use the agreed normalized accounting sign.

Response Parameters: Ledger Mode

ParameterTypeDescription
statusCodeNumberBusiness-level status. In observed UAT responses, 1 indicated success and 0 indicated rejection.
messageStringResponse message.
invoiceIdString / NullInvoice identifier, which may be null.
ledgerNameStringLedger name or reference.
totalInvoicesNumberReported invoice count.
totalLedgerRowsNumberReported ledger row count.
matchedCountNumberReported matched count.
mismatchCountNumberReported mismatch count.
missingInLedgerCountNumberReported count of records missing from the ledger.
missingInInvoicesCountNumberReported count of records missing from invoice data.
toleranceNumberVariance tolerance used.
resultsArrayIndividual reconciliation results.
stateStringReconciliation state reported for a result.
issuesArrayIssues associated with a result.

Inspect each result and its issues. Historical UAT counters did not always agree with detailed missing-row issues.

Response Parameters: Statement Mode

The following describes the proposed core-service result. The unified HTTP response envelope and casing remain unverified.

The statement result contains:

ParameterDescription
isValidIndicates whether the statement request passed core validation.
messageValidation or processing message.
recipientGstinRecipient GSTIN used for the comparison.
statementTypeStatement type used.
statementPeriodStatement period used.
toleranceVariance tolerance used.
totalPurchasesNumber of purchase records.
totalStatementRowsNumber of statement rows.
matchedCountNumber of numeric matches.
mismatchCountNumber of mismatches.
reviewCountNumber of result groups requiring review.
missingInStatementCountNumber of purchase records absent from the supplied statement snapshot.
missingInPurchasesCountNumber of statement records absent from the supplied purchase register.
validationErrorsRequest validation errors.
resultsIndividual comparison results.

Each statement result may contain status, matchBasis, requiresReview, reviewFlags, purchases, statementRows and amounts.

Supported result statuses are:

  • Matched
  • Mismatch
  • MissingInStatement
  • MissingInPurchases
  • ReviewRequired

Each amount evidence object contains field, purchaseAmount, statementAmount, difference and withinTolerance. The difference is calculated as purchase amount minus statement amount.

All statement results retain requiresReview: true, including numeric matches. A matched result does not establish legal input tax credit eligibility.

Error Handling

For the existing ledger mode, inspect the HTTP status, business-level statusCode and individual result issues.

For the proposed statement mode, the intended validation behaviour includes:

HTTP StatusIntended behaviour
200 OKStatement comparison completed and returned evidence results.
400 Bad RequestInvalid comparison type, conflicting fields or invalid statement request.
401 UnauthorizedStatement merchant or recipient authorization rejected.

These statement-mode HTTP behaviours are proposed and have not been validated through the unified endpoint. The final response envelope must be confirmed after integration.

Important Notes

  • Keep existing ledger-mode requests and responses backward-compatible.
  • Do not send ledger and statement field sets together.
  • Invalid or blank comparisonType values must not silently trigger a different comparison mode.
  • Statement mode requires recipient GSTIN ownership authorization in the host application.
  • Match candidates use supplier GSTIN, reference, document type and Indian financial year. Document dates must agree for a numeric match.
  • Duplicates, amendments, missing values and identity/date conflicts require review.
  • Missing records refer only to absence from the supplied statement snapshot or purchase register.
  • Do not infer tax eligibility, supplier ownership or data persistence from a match.
  • The statement matching engine was tested separately; unified endpoint integration and UAT testing are still pending.

What's Next

For ledger mode, review and approve the invoice and ledger records before reconciliation. For statement mode, wait for the unified integration to be deployed and validated, then review every result, amount variance and review flag before using the output.