GST Reconciliation

Compare purchase register records against GSTR-2A/GSTR-2B statement data or reconcile invoices against ledger records. Get matching results, amount variances, missing records, and review flags through a single API endpoint.

API Details

Method: POST

Endpoint: /gst-recon/reconcile

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

Full URL: https://uatapi.wowpe.in/api/api-module/gst-recon/reconcile

Authentication

Include the following headers in every request.

HeaderTypeMandatoryDescription
X-Client-IdStringYesClient ID provided by WowPe. Must be exactly 36 characters.
X-Client-SecretStringYesClient secret provided by WowPe. Must be exactly 36 characters.
Content-TypeStringYesMust be application/json.

Comparison Types

comparisonTypePurpose
Omitted or ledgerCompares reviewed invoice records against ledger register rows.
statementCompares a purchase register against a GSTR-2A/GSTR-2B statement snapshot.

The default mode is ledger. Any other value is rejected.

400 Bad Request
comparisonType must be ledger or statement; omitted defaults to ledger.

Field-set Rules

  • Statement fields cannot be included in Ledger Mode.
  • Ledger fields cannot be included in Statement Mode.
  • Unknown fields in Statement Mode are rejected.
  • Duplicate JSON property names, including case variants and nested row fields, are rejected.
  • comparisonType must be a JSON string.

Statement Mode

Statement Mode compares a normalized purchase register against a GSTR-2A or GSTR-2B statement snapshot.

Request Parameters

ParameterTypeMandatoryDefaultDescription
comparisonTypeStringYes—Must be statement.
recipientGstinStringYes—GSTIN associated with the statement and purchases. Must be GSTIN-shaped. The caller must verify authorization and ownership.
statementTypeStringYes—GSTR-2A or GSTR-2B.
statementPeriodStringYes—Period in yyyy-MM format, e.g. 2026-04.
statementDownloadedAtString (ISO 8601)Yes—Snapshot timestamp with timezone information, e.g. 2026-05-15T10:00:00Z.
purchasePeriodStartString (date)Yes—Inclusive start date of the purchase period.
purchasePeriodEndString (date)Yes—Inclusive end date. Must not be before the start date.
purchasesArrayYes—Normalized purchase-register rows. An explicit empty array is allowed.
statementRowsArrayYes—Normalized statement rows. An explicit empty array is allowed.
toleranceNumberNo0.01Allowed range: 0–100 currency units, applied per numeric field.

Input limits:

  • Maximum 5,000 rows combined across purchases and statementRows.
  • Neither array may contain null rows.
  • When batching, keep complete document groups together.

Statement Record Fields

The purchases[] and statementRows[] arrays use the same normalized document structure, with statementPeriod applicable to statement rows.

ParameterTypeMandatoryDescription
sourceIdStringRecommendedUnique row identifier. Missing or duplicate values raise review flags.
sourceFileStringNoOriginal file name retained as evidence.
sourceLocationStringNoOriginal row, sheet, or JSON location.
recipientGstinStringNoDocument recipient GSTIN. If present, it must match the request GSTIN.
supplierGstinStringMatching keySupplier GSTIN. Must be GSTIN-shaped.
documentNumberStringMatching keyInvoice or document reference.
documentDateString (date)Matching keyDocument date. Required for a numeric match.
documentTypeStringMatching keyInvoice, CreditNote, or DebitNote.
statementPeriodStringStatement rows onlyMust match the requested statement period.
isAmendmentBooleanNoIndicates whether the row is an amendment.
originalDocumentNumberStringNoOriginal document reference for an amendment.
originalDocumentDateString (date)NoOriginal document date for an amendment.
taxableValueNumber or nullNoTaxable amount. null indicates an unknown value.
cgstNumber or nullNoCentral GST amount.
sgstNumber or nullNoState GST amount.
igstNumber or nullNoIntegrated GST amount.
cessNumber or nullNoCess amount.
portalItcStatusStringNoPortal ITC status retained as evidence, not an eligibility decision.

Matching Logic

The matching key is:

SupplierGstin + DocumentNumber + DocumentType + Indian financial year

  • Document numbers are compared after trimming whitespace and normalizing case.
  • The financial year is derived from the document date and follows the April–March cycle.
  • A numeric match additionally requires the purchase and statement document dates to be equal.
  • Use 0 only when the source confirms a zero amount. Use null when the amount is unknown.
  • Credit-note amounts must follow the agreed normalized sign convention.

Sample Request — Statement Mode

{
  "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": "ledger-matching.csv",
      "sourceLocation": "row 2",
      "recipientGstin": "27FGHIJ5678K1Z2",
      "supplierGstin": "27ABCDE1234F1Z5",
      "documentNumber": "SYN/0007",
      "documentDate": "2026-04-01",
      "documentType": "Invoice",
      "statementPeriod": "2026-04",
      "taxableValue": 100,
      "cgst": 9,
      "sgst": 9,
      "igst": 0,
      "cess": 0
    }
  ],
  "statementRows": [
    {
      "sourceId": "register1-2",
      "sourceFile": "statement-matching.xlsx",
      "sourceLocation": "first worksheet/table row 2",
      "recipientGstin": "27FGHIJ5678K1Z2",
      "supplierGstin": "27ABCDE1234F1Z5",
      "documentNumber": "SYN/0007",
      "documentDate": "2026-04-01",
      "documentType": "Invoice",
      "statementPeriod": "2026-04",
      "isAmendment": false,
      "taxableValue": 100,
      "cgst": 9,
      "sgst": 9,
      "igst": 0,
      "cess": 0
    }
  ]
}

cURL Example — Statement Mode

curl --request POST 'https://uatapi.wowpe.in/api/api-module/gst-recon/reconcile' \
  --header 'X-Client-Id: YOUR_CLIENT_ID' \
  --header 'X-Client-Secret: YOUR_CLIENT_SECRET' \
  --header 'Content-Type: application/json' \
  --data-binary '@statement-reconcile.json'

Replace YOUR_CLIENT_ID and YOUR_CLIENT_SECRET with the credentials provided by WowPe.

Sample Response — Statement Mode

The following example illustrates a successful matching pair. The response is wrapped in a statusCode, message, and data envelope.

{
  "statusCode": 1,
  "message": "GST portal evidence comparison completed. Matched does not establish legal ITC eligibility; missing means absent from the supplied snapshot only.",
  "data": {
    "isValid": true,
    "message": "GST portal evidence comparison completed. Matched does not establish legal ITC eligibility; missing means absent from the supplied snapshot only.",
    "recipientGstin": "27FGHIJ5678K1Z2",
    "statementType": "GSTR-2A",
    "statementPeriod": "2026-04",
    "statementDownloadedAt": "2026-05-15T10:00:00+00:00",
    "tolerance": 0.01,
    "totalPurchases": 1,
    "totalStatementRows": 1,
    "matchedCount": 1,
    "mismatchCount": 0,
    "reviewCount": 1,
    "missingInStatementCount": 0,
    "missingInPurchasesCount": 0,
    "validationErrors": [],
    "results": [
      {
        "status": "Matched",
        "matchBasis": "SupplierGstin + DocumentNumber (trim/case only) + DocumentType + Indian financial year",
        "requiresReview": true,
        "reviewFlags": [],
        "purchases": [
          {
            "sourceId": "purchase-1",
            "supplierGstin": "27ABCDE1234F1Z5",
            "documentNumber": "SYN/0007",
            "documentDate": "2026-04-01T00:00:00",
            "documentType": "Invoice",
            "taxableValue": 100.0,
            "cgst": 9.0,
            "sgst": 9.0,
            "igst": 0.0,
            "cess": 0.0
          }
        ],
        "statementRows": [
          {
            "sourceId": "register1-2",
            "supplierGstin": "27ABCDE1234F1Z5",
            "documentNumber": "SYN/0007",
            "documentDate": "2026-04-01T00:00:00",
            "documentType": "Invoice",
            "taxableValue": 100.0,
            "cgst": 9.0,
            "sgst": 9.0,
            "igst": 0.0,
            "cess": 0.0
          }
        ],
        "amounts": [
          {
            "field": "TaxableValue",
            "purchaseAmount": 100.0,
            "statementAmount": 100.0,
            "difference": 0.0,
            "withinTolerance": true
          },
          {
            "field": "Cgst",
            "purchaseAmount": 9.0,
            "statementAmount": 9.0,
            "difference": 0.0,
            "withinTolerance": true
          },
          {
            "field": "Sgst",
            "purchaseAmount": 9.0,
            "statementAmount": 9.0,
            "difference": 0.0,
            "withinTolerance": true
          },
          {
            "field": "Igst",
            "purchaseAmount": 0.0,
            "statementAmount": 0.0,
            "difference": 0.0,
            "withinTolerance": true
          },
          {
            "field": "Cess",
            "purchaseAmount": 0.0,
            "statementAmount": 0.0,
            "difference": 0.0,
            "withinTolerance": true
          }
        ]
      }
    ]
  }
}

A mismatch occurs when an amount differs beyond the configured tolerance. For example, a purchase CGST of 10 against a statement CGST of 9 produces a difference of -1.

Difference calculation: Purchase amount minus statement amount.

Response casing: The core result object may use PascalCase, while the outer response envelope may use lower camel case. Clients should handle both rather than assuming a single casing convention.

Response Parameters — Statement Mode

ParameterTypeDescription
statusCodeNumberEnvelope status. 1 on HTTP 200 and 0 when the result is rejected with HTTP 400.
messageStringEnvelope message.
dataObjectComparison result.
data.isValidBooleanfalse when validation fails and no comparison is performed.
data.recipientGstinStringRecipient GSTIN used, upper-cased.
data.statementTypeStringStatement type used, upper-cased.
data.statementPeriodStringStatement period used.
data.statementDownloadedAtStringSnapshot timestamp used.
data.toleranceNumberTolerance applied.
data.totalPurchasesNumberNumber of purchase rows supplied.
data.totalStatementRowsNumberNumber of statement rows supplied.
data.matchedCountNumberResult groups with status = "Matched".
data.mismatchCountNumberResult groups with status = "Mismatch".
data.reviewCountNumberNumber of result groups requiring review. Every result group currently requires review.
data.missingInStatementCountNumberResult groups absent from the supplied statement.
data.missingInPurchasesCountNumberResult groups absent from the supplied purchase register.
data.validationErrorsArrayValidation messages. Inspect these before interpreting counters.
data.results[].statusStringMatched, Mismatch, MissingInStatement, MissingInPurchases, or ReviewRequired.
data.results[].matchBasisStringIdentity fields used to group rows.
data.results[].requiresReviewBooleanAlways true, including for numeric matches.
data.results[].reviewFlagsArrayReview flags raised for the result group.
data.results[].purchasesArrayPurchase rows in the result group.
data.results[].statementRowsArrayStatement rows in the result group.
data.results[].amounts[].fieldStringAmount field: TaxableValue, Cgst, Sgst, Igst, or Cess.
data.results[].amounts[].purchaseAmountNumber or nullPurchase-side amount.
data.results[].amounts[].statementAmountNumber or nullStatement-side amount.
data.results[].amounts[].differenceNumber or nullPurchase amount minus statement amount; null if either side is unknown.
data.results[].amounts[].withinToleranceBoolean or nullWhether the difference is within tolerance; null if it cannot be computed.

Review Flags

FlagDescription
DuplicateOrAmbiguousIdentityMultiple purchase or statement rows share the same matching key.
DuplicateSourceIdA sourceId is repeated within an input array.
MissingSourceIdsourceId is blank.
IncompleteOrInvalidIdentitySupplier GSTIN is invalid, document number is blank, or document date is missing.
RecipientGstinConflictRow recipient GSTIN differs from the request recipient GSTIN.
UnsupportedDocumentTypeDocument type is not Invoice, CreditNote, or DebitNote.
AmendmentRequiresReviewRow is an amendment or contains original-document references.
MissingAmountOne or more of the five amounts is null.
UnexpectedAmountSignAmount sign does not follow the declared document type convention.
PurchaseOutsideRequestedPeriodPurchase document date falls outside the requested purchase period.
StatementPeriodMissingOrConflictStatement row period differs from the requested period.
DocumentPeriodDiffersFromStatementDocument month differs from the statement period.
ReferencedByAmendmentAnother row references the document as its original.
DocumentDateConflictPaired purchase and statement dates differ.
AmountDifferenceOverflowAmount subtraction overflowed.

Status Resolution

The API resolves result status in the following order:

  1. ReviewRequired — at least one review flag is present.
  2. MissingInPurchases — no purchase row matches the key.
  3. MissingInStatement — no statement row matches the key.
  4. Mismatch — at least one amount is outside tolerance.
  5. Matched — otherwise.

Every result has requiresReview: true, including a clean numeric match. Consequently, reviewCount equals the number of result groups.

Ledger Mode

Ledger Mode compares reviewed invoice records against ledger register rows. It is the default mode when comparisonType is omitted.

Request Parameters

ParameterTypeMandatoryDefaultDescription
invoicesArrayYes—Reviewed invoice records.
ledgerArrayYes—Ledger register rows.
toleranceNumberNo0.01Amount variance tolerance.
invoiceIdStringNonullInvoice identifier.
ledgerNameStringNosynthetic-register.csvLedger name or reference. Maximum 255 characters.
comparisonTypeStringNoledgerSet to ledger to select this mode explicitly.

Invoice Record Fields — invoices[]

ParameterTypeMandatoryDescription
beneficiaryNameStringYesSupplier or beneficiary name. Maximum 255 characters.
uniqueRefNoStringYesInvoice or reference number. Maximum 255 characters.
idStringNoRow identifier.
sourceFileStringNoSource document name.
sourcePagesStringNoSource page information.
gstinStringNoGST identification number.
documentDateStringNoDocument date.
documentTypeStringNoDocument type.
extractionMethodStringNoMethod used to obtain the values.
taxableValueNumberNoTaxable amount.
cgstNumberNoCentral GST amount.
sgstNumberNoState GST amount.
igstNumberNoIntegrated GST amount.
gstAmountNumberNoTotal GST amount.
reviewedBooleanNoOperator review state.

Ledger Record Fields — ledger[]

ParameterTypeMandatoryDescription
beneficiaryNameStringYesSupplier or beneficiary name. Maximum 255 characters.
uniqueRefNoStringYesInvoice or reference number. Maximum 255 characters.
lineNumberNoSource line number.
gstinStringNoGST identification number.
documentDateStringNoDocument date.
documentTypeStringNoDocument type.
taxableValueNumberNoTaxable amount.
cgstNumberNoCentral GST amount.
sgstNumberNoState GST amount.
igstNumberNoIntegrated GST amount.
gstAmountNumberNoTotal GST amount.

Sample Request — Ledger Mode

{
  "comparisonType": "ledger",
  "invoiceId": null,
  "ledgerName": "ledger-matching.csv",
  "tolerance": 0.01,
  "invoices": [
    {
      "id": "file1-1",
      "sourceFile": "SYNTHETIC-Invoice-0007.pdf",
      "sourcePages": "1",
      "beneficiaryName": "SYNTHETIC MACHINE SUPPLIES PVT LTD",
      "uniqueRefNo": "SYN/0007",
      "gstin": "27ABCDE1234F1Z5",
      "documentDate": "2026-04-01",
      "documentType": "Tax Invoice",
      "taxableValue": 100,
      "cgst": 9,
      "sgst": 9,
      "igst": 0,
      "gstAmount": 18,
      "reviewed": true,
      "extractionMethod": "Embedded PDF text"
    }
  ],
  "ledger": [
    {
      "beneficiaryName": "SYNTHETIC MACHINE SUPPLIES PVT LTD",
      "uniqueRefNo": "SYN/0007",
      "gstin": "27ABCDE1234F1Z5",
      "documentDate": "2026-04-01",
      "documentType": "Tax Invoice",
      "taxableValue": 100,
      "cgst": 9,
      "sgst": 9,
      "igst": 0,
      "gstAmount": 18,
      "line": 2
    }
  ]
}

Sample Response — Ledger Mode

{
  "statusCode": 1,
  "message": "Success",
  "invoiceId": null,
  "ledgerName": "ledger-matching.csv",
  "totalInvoices": 1,
  "totalLedgerRows": 1,
  "matchedCount": 1,
  "mismatchCount": 0,
  "missingInLedgerCount": 0,
  "missingInInvoicesCount": 0,
  "tolerance": 0.01,
  "results": [
    {
      "id": "file1-1",
      "beneficiary": "SYNTHETIC MACHINE SUPPLIES PVT LTD",
      "reference": "SYN/0007",
      "source": "SYNTHETIC-Invoice-0007.pdf",
      "ledgerLine": 2,
      "invoiceGst": 18,
      "ledgerGst": 18,
      "variance": 0,
      "state": "Matched",
      "issues": []
    }
  ]
}

This is representative of the existing Ledger Mode response structure. Inspect results[].issues alongside the counters.

Response Parameters — Ledger Mode

ParameterTypeDescription
statusCodeNumberBusiness status. Observed value 1 indicates success.
messageStringResponse message.
invoiceIdString or nullEchoed invoice identifier.
ledgerNameStringEchoed ledger name.
totalInvoicesNumberNumber of invoice records processed.
totalLedgerRowsNumberNumber of ledger rows processed.
matchedCountNumberNumber of matched records.
mismatchCountNumberNumber of mismatches.
missingInLedgerCountNumberInvoices without a ledger counterpart.
missingInInvoicesCountNumberLedger rows without an invoice counterpart.
toleranceNumberTolerance applied.
results[].idStringInvoice identifier.
results[].beneficiaryStringSupplier or beneficiary name.
results[].referenceStringInvoice reference.
results[].sourceStringSource file.
results[].ledgerLineNumber or nullMatched ledger line.
results[].invoiceGstNumber or nullInvoice GST amount.
results[].ledgerGstNumber or nullLedger GST amount.
results[].varianceNumber or nullDifference between the two amounts.
results[].stateStringReconciliation state, e.g. Matched.
results[].issuesArrayIssues associated with the result.

Error Handling

HTTP StatusCondition
200 OKStatement comparison returns results, or Ledger Mode reconciliation succeeds.
400 Bad RequestInvalid or blank comparisonType, mixed field sets, unknown statement fields, duplicate JSON properties, missing request body, model validation failure, or authentication failure.
400 Bad RequestStatement validation fails. Inspect data.validationErrors when isValid is false and the envelope statusCode is 0.
499Client cancelled the request.
500Unhandled server error.

Statement Validation Messages

MessageCause
The statement service requires comparisonType=statement.comparisonType is missing or not statement.
RecipientGstin must be a GSTIN-shaped identifier; ownership must be verified by the caller.recipientGstin is missing or malformed.
StatementType must be GSTR-2B or GSTR-2A.Invalid statementType.
StatementPeriod must be yyyy-MM.Invalid statement period.
StatementDownloadedAt is required to identify the statement snapshot.Snapshot timestamp is missing.
Supply an inclusive PurchasePeriodStart/PurchasePeriodEnd date range.Dates are missing or the end date precedes the start date.
Tolerance must be between 0 and 100 currency units.Tolerance is outside the permitted range.
Purchases and StatementRows must be supplied; an explicit empty array is allowed.One or both arrays are omitted.
A request supports at most 5000 input rows in total; partition complete document groups into batches.Combined row limit exceeded.
Input arrays cannot contain null rows.An input array contains a null element.

Important Notes

  • An HTTP 200 response alone does not establish correctness. Check data.isValid, data.validationErrors, the counters, each result status, and all review flags.
  • Every Statement Mode result requires review, including numeric matches.
  • A match does not establish legal ITC eligibility, supplier ownership, or data persistence.
  • MissingInStatement and MissingInPurchases indicate absence from the supplied snapshot or register only.
  • Duplicate identities, amendments, missing amounts, and identity or date conflicts require review.
  • Original and revised records are not silently selected or netted together.
  • Do not mix Ledger Mode and Statement Mode fields in the same request.
  • Statement Mode does not verify ownership of the recipient GSTIN. The caller must verify authorization and ownership.
  • Tolerance is expressed in currency units, not as a percentage, and is applied separately to each numeric field.

What's Next

Review every result group, amount variance, and review flag. Resolve flagged rows against the original source documents before using the output for tax filing or accounting.