Skip to content

Test Cases: Payment & Transaction

ModuleCORE-08URDPayment & Transaction URD

1. Coverage Summary

AreaURD reqsTest casesCovered
Payment Lifecycle (PAY)66⚠️ (PAY-006 Planned)
Provider Credentials (PRV)33
Accounts & Wallets (WAL)55
Vouchers & Ledger (VCH)1011
Categories (CAT)33

URD-PAY-006 (provider refund) is a Won't / Planned requirement — intentionally uncovered until the feature is built. All Must requirements are covered.

2. Test Cases

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

2.1 Payment Lifecycle (PAY)

TC IDURD refScenarioStepsExpectedP
TC-PAY-001URD-PAY-001Provider reports success1. A pending payment exists. 2. Provider sends a success result.Payment status becomes paid; the amount matches the orderP1
TC-PAY-002URD-PAY-002Subscriber notified on success1. A subscriber is registered. 2. A payment succeeds.Subscriber receives a payment-success notificationP1
TC-PAY-003URD-PAY-003Live status to cashier1. Cashier is on the payment screen. 2. Provider reports paid / failed / expired.Cashier sees the status change in real timeP1
TC-PAY-004URD-PAY-004Duplicate result ignored1. A success result was already applied. 2. The same result is redelivered.No duplicate effect; status unchanged; no second voucherP1
TC-PAY-005URD-PAY-005Webhook retry on failure1. A subscriber endpoint is temporarily down. 2. A payment event fires.Delivery is retried with backoff; failure is logged; processing not blockedP2
TC-PAY-006URD-PAY-006Provider refund (Planned)1. A completed external payment. 2. Owner requests a refund.Not yet implemented — placeholder for the planned refund featureP3

2.2 Provider Credentials (PRV)

TC IDURD refScenarioStepsExpectedP
TC-PRV-001URD-PRV-001Connect a provider1. Owner opens provider settings. 2. Enters VNPAY QR MMS credentials.Provider is connected for the merchantP1
TC-PRV-002URD-PRV-002Credentials masked1. A provider is connected. 2. Owner views the configuration.Credentials are masked; full secret is never shownP1
TC-PRV-003URD-PRV-003Per-merchant scope1. Two merchants each connect a provider. 2. Merchant A views config.Merchant A sees only its own credentialsP2

2.3 Accounts & Wallets (WAL)

TC IDURD refScenarioStepsExpectedP
TC-WAL-001URD-WAL-001Create a wallet1. Owner adds a CASH (or BANK / QR / mobile-POS) account.Account is created with its type and currencyP1
TC-WAL-002URD-WAL-002Control accounts exist1. A merchant is onboarded.Internal control accounts (inventory, COGS) exist automaticallyP1
TC-WAL-003URD-WAL-003Opening + running balance1. Create an account with an opening balance. 2. Post a voucher against it.Current balance starts at the opening value and updates after postingP1
TC-WAL-004URD-WAL-004Default account routing1. A default account is set. 2. A sale payment succeeds.The auto income posts to the default accountP1
TC-WAL-005URD-WAL-005Merchant-scoped visibility1. A non-owner with access to merchant A only. 2. They list accounts.Only merchant A's accounts are returnedP2

2.4 Vouchers & Ledger (VCH)

TC IDURD refScenarioStepsExpectedP
TC-VCH-001URD-VCH-001Voucher is balanced1. Any voucher is posted.Total DEBIT equals total CREDITP1
TC-VCH-002URD-VCH-002Voucher types1. Create vouchers of each type.RECEIPT / PAYMENT / TRANSFER / ADJUSTMENT are all acceptedP2
TC-VCH-003URD-VCH-003Auto RECEIPT on payment1. A sale payment succeeds.A balanced RECEIPT voucher posts to the default accountP1
TC-VCH-004URD-VCH-004Auto PAYMENT on PO receipt1. A purchase order is received.A balanced PAYMENT voucher postsP1
TC-VCH-005URD-VCH-005Auto voucher on stock movement1. Stock is issued for a sale or adjusted.The matching ledger voucher postsP1
TC-VCH-006URD-VCH-006Idempotent posting1. A source event is processed. 2. The same event is redelivered.Only one voucher exists for that source eventP1
TC-VCH-007URD-VCH-007Voucher numbering1. Post several vouchers of the same type for a merchant.Numbers increment per merchant and typeP2
TC-VCH-008URD-VCH-008Manual voucher1. Owner creates a draft. 2. Owner issues it.A balanced voucher appears in the ledger with a sequence numberP2
TC-VCH-009URD-VCH-009Void by reversal1. An issued voucher. 2. Owner voids it.A balanced reversal posts; the original is preservedP2
TC-VCH-010URD-VCH-010Transfer between accounts1. Owner transfers between two accounts.A zero-sum TRANSFER voucher records both legsP3
TC-VCH-011URD-VCH-001, URD-VCH-006Precision + concurrency boundary1. A payment whose amount rounds at high precision. 2. Two results arrive at once.Balances reconcile exactly; only one voucher is posted; no race corrupts the ledgerP1

2.5 Categories (CAT)

TC IDURD refScenarioStepsExpectedP
TC-CAT-001URD-CAT-001Seeded categories1. View categories for a new merchant.14 system categories are presentP1
TC-CAT-002URD-CAT-001Seeded categories protected1. Attempt to remove a seeded category.Removal is rejectedP1
TC-CAT-003URD-CAT-002, URD-CAT-003Typed + custom categories1. Owner adds a custom INCOME and EXPENSE category, one nested under a parent.Custom categories are created with the correct type and hierarchyP2

3. Traceability

Every Must requirement maps to ≥1 test case. URD-PAY-006 is a Won't/Planned item, intentionally uncovered.

URD requirementTest case(s)Status
URD-PAY-001TC-PAY-001✅ Covered
URD-PAY-002TC-PAY-002✅ Covered
URD-PAY-003TC-PAY-003✅ Covered
URD-PAY-004TC-PAY-004, TC-VCH-011✅ Covered
URD-PAY-005TC-PAY-005✅ Covered
URD-PAY-006TC-PAY-006⚠️ Planned (Won't — not yet built)
URD-PRV-001TC-PRV-001✅ Covered
URD-PRV-002TC-PRV-002✅ Covered
URD-PRV-003TC-PRV-003✅ Covered
URD-WAL-001TC-WAL-001✅ Covered
URD-WAL-002TC-WAL-002✅ Covered
URD-WAL-003TC-WAL-003✅ Covered
URD-WAL-004TC-WAL-004✅ Covered
URD-WAL-005TC-WAL-005✅ Covered
URD-VCH-001TC-VCH-001, TC-VCH-011✅ Covered
URD-VCH-002TC-VCH-002✅ Covered
URD-VCH-003TC-VCH-003✅ Covered
URD-VCH-004TC-VCH-004✅ Covered
URD-VCH-005TC-VCH-005✅ Covered
URD-VCH-006TC-VCH-006, TC-VCH-011✅ Covered
URD-VCH-007TC-VCH-007✅ Covered
URD-VCH-008TC-VCH-008✅ Covered
URD-VCH-009TC-VCH-009✅ Covered
URD-VCH-010TC-VCH-010✅ Covered
URD-CAT-001TC-CAT-001, TC-CAT-002✅ Covered
URD-CAT-002TC-CAT-003✅ Covered
URD-CAT-003TC-CAT-003✅ Covered

Summary: 27 URD requirements → 28 test cases · 26 covered · 1 intentionally uncovered (Planned).

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