Skip to content

Test Cases: Tax & Invoice

ModuleCORE-10URDTax & Invoice URD

1. Coverage Summary

AreaURD reqsTest casesCovered
Tax Identity (TAX)34
Tax Groups (GRP)44
Invoice Configuration (CFG)77
Invoice Lifecycle (INV)910
Invoice Request & Buyer Claim (REQ)55
Issuance Modes (MOD)44

All Must requirements are covered. Provider-dependent expectations (issuance, tax-authority submission, webhooks) are verified against the current provider set — VNPAY / VNIS via iiapi plus T-VAN.

2. Test Cases

TC-<AREA>-NNN lines up with URD-<AREA>-NNN. Priority = P1 (critical) / P2 (major) / P3 (minor).

2.1 Tax Identity (TAX)

TC IDURD refScenarioStepsExpectedP
TC-TAX-001URD-TAX-001Register seller tax identity1. Owner opens tax settings. 2. Enters MST, business name, address.The tax identity is saved and used as the seller on issued invoicesP1
TC-TAX-002URD-TAX-002VN address lookup1. Owner enters an address. 2. Picks province then ward.Province / ward / unit options load and the selection is storedP2
TC-TAX-003URD-TAX-003Reject malformed tax code1. Owner enters a tax code with letters or the wrong length.The tax code is rejected with a clear format errorP2
TC-TAX-004URD-TAX-003Accept valid tax code with leading zeros1. Owner enters a valid tax code beginning with zeros.The code is accepted and the leading zeros are preservedP3

2.2 Tax Groups (GRP)

TC IDURD refScenarioStepsExpectedP
TC-GRP-001URD-GRP-001Define a tax group1. Owner creates a tax group with its rule items.The tax group is saved and available to applyP1
TC-GRP-002URD-GRP-002Provision tax onto products1. A tax group matches a product. 2. The product is created/updated.The correct tax is applied onto the matching productP1
TC-GRP-003URD-GRP-003Reconcile on product removal1. A product with applied tax is removed.Its applied tax is reconciled away; no orphaned tax remainsP2
TC-GRP-004URD-GRP-004Block incompatible tax method1. Owner applies a tax group whose method conflicts with the merchant's.The group is rejected with a method-incompatibility messageP2

2.3 Invoice Configuration (CFG)

TC IDURD refScenarioStepsExpectedP
TC-CFG-001URD-CFG-001Create invoice profile1. Owner creates a merchant invoice profile linked to the tax identity.The profile is saved and active for the merchantP1
TC-CFG-002URD-CFG-002Connect provider with encrypted credentials1. Owner enters provider credentials and saves.Credentials are stored encrypted; the provider connection is usableP1
TC-CFG-003URD-CFG-003Configure invoice type policy1. Owner sets serial, category, tax method, and issuance mode per invoice type.The configuration is saved and applied to future issuanceP1
TC-CFG-004URD-CFG-004Route a sale channel1. Owner maps a sale channel to a provider config.The channel issues through the mapped configP1
TC-CFG-005URD-CFG-005Reject a second active mapping1. A channel already has an active mapping. 2. Owner adds another active one.The duplicate active mapping is rejected (one active per channel)P2
TC-CFG-006URD-CFG-006Share a profile across branches1. Owner sets sharing to all-branches / whitelist.Enrolled branch merchants can use the shared profileP2
TC-CFG-007URD-CFG-007Guided onboarding1. Owner runs the onboarding wizard end to end.The provider is configured and ready to issue at the endP3

2.4 Invoice Lifecycle (INV)

TC IDURD refScenarioStepsExpectedP
TC-INV-001URD-INV-001Queue on payment success1. A payment for an order succeeds.An invoice is queued for issuanceP1
TC-INV-002URD-INV-002Successful issuance1. A queued invoice is processed by the provider.An invoice number and tax-authority code are recorded; status is successP1
TC-INV-003URD-INV-003Status transitions1. Track an invoice from queued to issued.Status moves pending → processing → success without skipping statesP1
TC-INV-004URD-INV-004Retry on provider failure1. The provider returns an error during issuance.A retry is scheduled per the configured policyP1
TC-INV-005URD-INV-004Fail after max retries1. Every retry fails up to the configured maximum.Status becomes failed and the failure is in the audit trailP2
TC-INV-006URD-INV-005Submit to tax authority1. Submission is enabled. 2. An invoice is issued.The invoice is submitted to CQT via T-VAN and its response status is trackedP1
TC-INV-007URD-INV-005Tax-authority rejection recorded1. CQT rejects a submitted invoice.The rejection reason is recorded against the invoiceP2
TC-INV-008URD-INV-006Immutable audit trail1. An invoice goes through several state changes.Each event is recorded; existing entries cannot be alteredP1
TC-INV-009URD-INV-007, URD-INV-008Adjust / cancel issued invoice1. Owner adjusts then cancels an issued invoice with a reason.An adjustment links to the original; the cancellation records its reasonP2
TC-INV-010URD-INV-009Reject unsigned webhook1. An inbound provider webhook arrives with an invalid signature.The webhook is rejected; no status change is appliedP2

2.5 Invoice Request & Buyer Claim (REQ)

TC IDURD refScenarioStepsExpectedP
TC-REQ-001URD-REQ-001Capture buyer info1. Buyer info (name, tax code, address, email) is entered for an invoice.The buyer details are saved against the invoice requestP1
TC-REQ-002URD-REQ-002Cashier direct flow1. Cashier collects buyer info at the counter and issues.The invoice is issued with the collected buyer detailsP1
TC-REQ-003URD-REQ-003Claim before deadline1. Buyer scans the receipt QR before the deadline and submits info.The invoice is issued with the buyer's submitted detailsP2
TC-REQ-004URD-REQ-004Claim expires1. Buyer opens the claim link after the deadline.The claim is expired and no invoice is issuedP2
TC-REQ-005URD-REQ-005Delivery channel1. An invoice / claim link is delivered.It is delivered by the configured channel (receipt QR, email, or SMS)P3

2.6 Issuance Modes (MOD)

TC IDURD refScenarioStepsExpectedP
TC-MOD-001URD-MOD-001Real-time issuance1. A payment succeeds with real-time mode configured.The invoice is issued immediatelyP1
TC-MOD-002URD-MOD-002Manual issuance1. Cashier triggers issuance for an order on demand.The invoice is issued when the cashier initiates itP2
TC-MOD-003URD-MOD-003Scheduled batch issuance1. The scheduled job runs with pending invoices.The batch is issued by the scheduled jobP2
TC-MOD-004URD-MOD-004Buyer self-service issuance1. Buyer completes a QR claim.The invoice is issued through the buyer self-service pathP2

3. Traceability

Every Must requirement maps to ≥1 test case. No gaps.

URD requirementTest case(s)Status
URD-TAX-001TC-TAX-001✅ Covered
URD-TAX-002TC-TAX-002✅ Covered
URD-TAX-003TC-TAX-003, TC-TAX-004✅ Covered
URD-GRP-001TC-GRP-001✅ Covered
URD-GRP-002TC-GRP-002✅ Covered
URD-GRP-003TC-GRP-003✅ Covered
URD-GRP-004TC-GRP-004✅ Covered
URD-CFG-001TC-CFG-001✅ Covered
URD-CFG-002TC-CFG-002✅ Covered
URD-CFG-003TC-CFG-003✅ Covered
URD-CFG-004TC-CFG-004✅ Covered
URD-CFG-005TC-CFG-005✅ Covered
URD-CFG-006TC-CFG-006✅ Covered
URD-CFG-007TC-CFG-007✅ Covered
URD-INV-001TC-INV-001✅ Covered
URD-INV-002TC-INV-002✅ Covered
URD-INV-003TC-INV-003✅ Covered
URD-INV-004TC-INV-004, TC-INV-005✅ Covered
URD-INV-005TC-INV-006, TC-INV-007✅ Covered
URD-INV-006TC-INV-008✅ Covered
URD-INV-007TC-INV-009✅ Covered
URD-INV-008TC-INV-009✅ Covered
URD-INV-009TC-INV-010✅ Covered
URD-REQ-001TC-REQ-001✅ Covered
URD-REQ-002TC-REQ-002✅ Covered
URD-REQ-003TC-REQ-003✅ Covered
URD-REQ-004TC-REQ-004✅ Covered
URD-REQ-005TC-REQ-005✅ Covered
URD-MOD-001TC-MOD-001✅ Covered
URD-MOD-002TC-MOD-002✅ Covered
URD-MOD-003TC-MOD-003✅ Covered
URD-MOD-004TC-MOD-004✅ Covered

Proprietary and Confidential. Unauthorized copying, distribution, or use of this software is strictly prohibited.