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.
| Header | Type | Mandatory | Description |
|---|---|---|---|
X-Client-Id | String | Yes | Client ID provided by WowPe. Must be exactly 36 characters. |
X-Client-Secret | String | Yes | Client secret provided by WowPe. Must be exactly 36 characters. |
Content-Type | String | Yes | Must be application/json. |
Comparison Types
comparisonType | Purpose |
|---|---|
Omitted or ledger | Compares reviewed invoice records against ledger register rows. |
statement | Compares 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.
comparisonTypemust be a JSON string.
Statement Mode
Statement Mode compares a normalized purchase register against a GSTR-2A or GSTR-2B statement snapshot.
Request Parameters
| Parameter | Type | Mandatory | Default | Description |
|---|---|---|---|---|
comparisonType | String | Yes | — | Must be statement. |
recipientGstin | String | Yes | — | GSTIN associated with the statement and purchases. Must be GSTIN-shaped. The caller must verify authorization and ownership. |
statementType | String | Yes | — | GSTR-2A or GSTR-2B. |
statementPeriod | String | Yes | — | Period in yyyy-MM format, e.g. 2026-04. |
statementDownloadedAt | String (ISO 8601) | Yes | — | Snapshot timestamp with timezone information, e.g. 2026-05-15T10:00:00Z. |
purchasePeriodStart | String (date) | Yes | — | Inclusive start date of the purchase period. |
purchasePeriodEnd | String (date) | Yes | — | Inclusive end date. Must not be before the start date. |
purchases | Array | Yes | — | Normalized purchase-register rows. An explicit empty array is allowed. |
statementRows | Array | Yes | — | Normalized statement rows. An explicit empty array is allowed. |
tolerance | Number | No | 0.01 | Allowed range: 0–100 currency units, applied per numeric field. |
Input limits:
- Maximum 5,000 rows combined across
purchasesandstatementRows. - Neither array may contain
nullrows. - 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.
| Parameter | Type | Mandatory | Description |
|---|---|---|---|
sourceId | String | Recommended | Unique row identifier. Missing or duplicate values raise review flags. |
sourceFile | String | No | Original file name retained as evidence. |
sourceLocation | String | No | Original row, sheet, or JSON location. |
recipientGstin | String | No | Document recipient GSTIN. If present, it must match the request GSTIN. |
supplierGstin | String | Matching key | Supplier GSTIN. Must be GSTIN-shaped. |
documentNumber | String | Matching key | Invoice or document reference. |
documentDate | String (date) | Matching key | Document date. Required for a numeric match. |
documentType | String | Matching key | Invoice, CreditNote, or DebitNote. |
statementPeriod | String | Statement rows only | Must match the requested statement period. |
isAmendment | Boolean | No | Indicates whether the row is an amendment. |
originalDocumentNumber | String | No | Original document reference for an amendment. |
originalDocumentDate | String (date) | No | Original document date for an amendment. |
taxableValue | Number or null | No | Taxable amount. null indicates an unknown value. |
cgst | Number or null | No | Central GST amount. |
sgst | Number or null | No | State GST amount. |
igst | Number or null | No | Integrated GST amount. |
cess | Number or null | No | Cess amount. |
portalItcStatus | String | No | Portal 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
0only when the source confirms a zero amount. Usenullwhen 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
| Parameter | Type | Description |
|---|---|---|
statusCode | Number | Envelope status. 1 on HTTP 200 and 0 when the result is rejected with HTTP 400. |
message | String | Envelope message. |
data | Object | Comparison result. |
data.isValid | Boolean | false when validation fails and no comparison is performed. |
data.recipientGstin | String | Recipient GSTIN used, upper-cased. |
data.statementType | String | Statement type used, upper-cased. |
data.statementPeriod | String | Statement period used. |
data.statementDownloadedAt | String | Snapshot timestamp used. |
data.tolerance | Number | Tolerance applied. |
data.totalPurchases | Number | Number of purchase rows supplied. |
data.totalStatementRows | Number | Number of statement rows supplied. |
data.matchedCount | Number | Result groups with status = "Matched". |
data.mismatchCount | Number | Result groups with status = "Mismatch". |
data.reviewCount | Number | Number of result groups requiring review. Every result group currently requires review. |
data.missingInStatementCount | Number | Result groups absent from the supplied statement. |
data.missingInPurchasesCount | Number | Result groups absent from the supplied purchase register. |
data.validationErrors | Array | Validation messages. Inspect these before interpreting counters. |
data.results[].status | String | Matched, Mismatch, MissingInStatement, MissingInPurchases, or ReviewRequired. |
data.results[].matchBasis | String | Identity fields used to group rows. |
data.results[].requiresReview | Boolean | Always true, including for numeric matches. |
data.results[].reviewFlags | Array | Review flags raised for the result group. |
data.results[].purchases | Array | Purchase rows in the result group. |
data.results[].statementRows | Array | Statement rows in the result group. |
data.results[].amounts[].field | String | Amount field: TaxableValue, Cgst, Sgst, Igst, or Cess. |
data.results[].amounts[].purchaseAmount | Number or null | Purchase-side amount. |
data.results[].amounts[].statementAmount | Number or null | Statement-side amount. |
data.results[].amounts[].difference | Number or null | Purchase amount minus statement amount; null if either side is unknown. |
data.results[].amounts[].withinTolerance | Boolean or null | Whether the difference is within tolerance; null if it cannot be computed. |
Review Flags
| Flag | Description |
|---|---|
DuplicateOrAmbiguousIdentity | Multiple purchase or statement rows share the same matching key. |
DuplicateSourceId | A sourceId is repeated within an input array. |
MissingSourceId | sourceId is blank. |
IncompleteOrInvalidIdentity | Supplier GSTIN is invalid, document number is blank, or document date is missing. |
RecipientGstinConflict | Row recipient GSTIN differs from the request recipient GSTIN. |
UnsupportedDocumentType | Document type is not Invoice, CreditNote, or DebitNote. |
AmendmentRequiresReview | Row is an amendment or contains original-document references. |
MissingAmount | One or more of the five amounts is null. |
UnexpectedAmountSign | Amount sign does not follow the declared document type convention. |
PurchaseOutsideRequestedPeriod | Purchase document date falls outside the requested purchase period. |
StatementPeriodMissingOrConflict | Statement row period differs from the requested period. |
DocumentPeriodDiffersFromStatement | Document month differs from the statement period. |
ReferencedByAmendment | Another row references the document as its original. |
DocumentDateConflict | Paired purchase and statement dates differ. |
AmountDifferenceOverflow | Amount subtraction overflowed. |
Status Resolution
The API resolves result status in the following order:
ReviewRequired— at least one review flag is present.MissingInPurchases— no purchase row matches the key.MissingInStatement— no statement row matches the key.Mismatch— at least one amount is outside tolerance.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
| Parameter | Type | Mandatory | Default | Description |
|---|---|---|---|---|
invoices | Array | Yes | — | Reviewed invoice records. |
ledger | Array | Yes | — | Ledger register rows. |
tolerance | Number | No | 0.01 | Amount variance tolerance. |
invoiceId | String | No | null | Invoice identifier. |
ledgerName | String | No | synthetic-register.csv | Ledger name or reference. Maximum 255 characters. |
comparisonType | String | No | ledger | Set to ledger to select this mode explicitly. |
Invoice Record Fields — invoices[]
invoices[]| Parameter | Type | Mandatory | Description |
|---|---|---|---|
beneficiaryName | String | Yes | Supplier or beneficiary name. Maximum 255 characters. |
uniqueRefNo | String | Yes | Invoice or reference number. Maximum 255 characters. |
id | String | No | Row identifier. |
sourceFile | String | No | Source document name. |
sourcePages | String | No | Source page information. |
gstin | String | No | GST identification number. |
documentDate | String | No | Document date. |
documentType | String | No | Document type. |
extractionMethod | String | No | Method used to obtain the values. |
taxableValue | Number | No | Taxable amount. |
cgst | Number | No | Central GST amount. |
sgst | Number | No | State GST amount. |
igst | Number | No | Integrated GST amount. |
gstAmount | Number | No | Total GST amount. |
reviewed | Boolean | No | Operator review state. |
Ledger Record Fields — ledger[]
ledger[]| Parameter | Type | Mandatory | Description |
|---|---|---|---|
beneficiaryName | String | Yes | Supplier or beneficiary name. Maximum 255 characters. |
uniqueRefNo | String | Yes | Invoice or reference number. Maximum 255 characters. |
line | Number | No | Source line number. |
gstin | String | No | GST identification number. |
documentDate | String | No | Document date. |
documentType | String | No | Document type. |
taxableValue | Number | No | Taxable amount. |
cgst | Number | No | Central GST amount. |
sgst | Number | No | State GST amount. |
igst | Number | No | Integrated GST amount. |
gstAmount | Number | No | Total 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
| Parameter | Type | Description |
|---|---|---|
statusCode | Number | Business status. Observed value 1 indicates success. |
message | String | Response message. |
invoiceId | String or null | Echoed invoice identifier. |
ledgerName | String | Echoed ledger name. |
totalInvoices | Number | Number of invoice records processed. |
totalLedgerRows | Number | Number of ledger rows processed. |
matchedCount | Number | Number of matched records. |
mismatchCount | Number | Number of mismatches. |
missingInLedgerCount | Number | Invoices without a ledger counterpart. |
missingInInvoicesCount | Number | Ledger rows without an invoice counterpart. |
tolerance | Number | Tolerance applied. |
results[].id | String | Invoice identifier. |
results[].beneficiary | String | Supplier or beneficiary name. |
results[].reference | String | Invoice reference. |
results[].source | String | Source file. |
results[].ledgerLine | Number or null | Matched ledger line. |
results[].invoiceGst | Number or null | Invoice GST amount. |
results[].ledgerGst | Number or null | Ledger GST amount. |
results[].variance | Number or null | Difference between the two amounts. |
results[].state | String | Reconciliation state, e.g. Matched. |
results[].issues | Array | Issues associated with the result. |
Error Handling
| HTTP Status | Condition |
|---|---|
200 OK | Statement comparison returns results, or Ledger Mode reconciliation succeeds. |
400 Bad Request | Invalid or blank comparisonType, mixed field sets, unknown statement fields, duplicate JSON properties, missing request body, model validation failure, or authentication failure. |
400 Bad Request | Statement validation fails. Inspect data.validationErrors when isValid is false and the envelope statusCode is 0. |
499 | Client cancelled the request. |
500 | Unhandled server error. |
Statement Validation Messages
| Message | Cause |
|---|---|
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
200response alone does not establish correctness. Checkdata.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.
MissingInStatementandMissingInPurchasesindicate 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.
