Payment History
| Date | Transaction Type | Item | Duration | Total | Status | Reference No. | |
|---|---|---|---|---|---|---|---|
| 2026-06-15 | Course Purchase | Advanced TVET Course | 3 months | 270,000 LAK | Success | 202606150001 | |
| 2026-04-01 | Subscription Renewal | Platform Subscription | 3 months | 135,000 LAK | Success | 202604010022 | |
| 2026-03-10 | Course Purchase | Leadership for TVET | — | 20,000 LAK | Failed | 202603100008 | — |
Screen Flow (UC-BIL.04):
📝 Spec notes — UC-BIL.04 / SCR-BIL.03 (fields, actions, requirements)
- Screen: SCR-BIL.03 — Payment History
- Use case: UC-BIL.04 — View Payment History
The Payment History page lets learners view all their own past payment records — course purchases and subscription renewals — sorted from newest to oldest. Records can be filtered by transaction type and date range, and are shown 10 per page. Each record shows the date, type, item name, duration (for subscription renewals only), amount paid, payment status, reference number, and a button to download the receipt PDF. The download button appears only for successful transactions that have a receipt; the download link expires within a few minutes of being generated.
filter_type"Transaction Type" — enum [all, course_purchase, subscription_renew] · default: all · always visiblefilter_period_from"From" — date · default: today_minus_6_months · always visiblefilter_period_to"To" — date · default: today · validation: >= filter_period_from · always visiblerow_date"Date" — date · Transaction.created_at · always · read-onlyrow_type"Transaction Type" — enum [course_purchase, subscription_renew] · computed · always · read-onlyrow_item_name"Item" — text · Product.name · always · read-onlyrow_qty"Duration" — text · Transaction.qty · visible when row_product_type != lifetime · read-onlyrow_total_paid"Total" — number · Transaction.total_paid · always · read-onlyrow_status"Status" — enum [pending, success, failed, cancelled, expired] · Transaction.status · always · read-onlyrow_ref_code"Reference No." — text · Transaction.ref_code · always · read-onlypage_no"Page" — number · default: 1 · visible when total_pages > 1 · validation: min 1
apply_filter"Search" — always enabled · triggers UC-BIL.04-A-2A-1clear_filter"Clear" — enabled when filter_type != all OR period != default · triggers UC-BIL.04-M-2download_receipt"Download Receipt" — enabled when row_status == success AND row_has_receipt == true · triggers UC-BIL.04-M-3prev_page"Previous" — enabled when page_no > 1 · triggers UC-BIL.04-M-2next_page"Next" — enabled when page_no < total_pages · triggers UC-BIL.04-M-2go_to_catalog"Go to Catalog" — enabled when transactions.count == 0 · triggers UC-BIL.04-A-2B-1
- Must remain fast and responsive when many learners are using the page at the same time [NFR-01]
- Designed to work well on slow internet connections — shows 10 records per page so the page loads quickly; the receipt download link is only fetched when the user requests it [NFR-02]
- Each user can only view their own payment history — other users' records are never accessible, regardless of what is entered in the URL. Receipt download links expire within a few minutes of being generated and cannot be reused or shared. If a link appears to have been tampered with, access is denied and the attempt is logged. [NFR-03, NFR-10]
- Works on desktop, laptop, tablet, and smartphone — table layout on desktop, collapses to a card list on small screens (columns shown in priority order: date, item, total, status, action) [NFR-08]
- Supports keyboard-only navigation and screen readers: table column headings are descriptive; the download button for each row clearly identifies the transaction (reference number and amount), not just the icon; status indicators include a text label, not color alone [NFR-09]
- Empty state is split into two cases: (a) the user has no transactions — "No payment records found" with a "Go to Catalog" button (UC-BIL.04 AF 2B); (b) the filter returned no results — "No records match the filter" with a "Clear" button [NFR-04]
- Each time a user downloads a receipt, the download is recorded (transaction reference, user, and timestamp) for audit purposes [BR-BIL.03]
- Transactions with a failed, cancelled, or expired status display the status badge but no download button — no receipt was issued for these transactions. The reference number is still shown so support staff can look up the record.
↳ Embedded document: SCR-BIL.19 — Receipt PDF
- Document: SCR-BIL.19 — Receipt PDF (type: document)
- Used in: UC-BIL.04 — downloaded from this page (SCR-BIL.03)
- Primary actor: ACT-01 (Learner)
PDF receipt document issued to the learner after a successful payment. Downloaded from the Payment History page (SCR-BIL.03). Contains the receipt number and issue date, billing details as entered during checkout (name, address, contact), the product purchased with pricing breakdown (unit price, qty, discount if applicable, total), and payment confirmation details (channel, date, reference number). Follows international standard receipt layout. Serves as the official payment confirmation document for the learner's records.
- Document header — platform name (top-left) + "RECEIPT" title (top-right)
- Receipt identity — receipt number, issue date (top-right block)
- Bill to — name, address, contact (billing details as entered during checkout)
- Order details — description / Qty (months) / unit price / amount table; discount row if applicable; total row
- Payment summary — payment channel, payment date, reference number
platform_name— literal "Platform Name" · Document headerdocument_title— literal "RECEIPT" · Document headerreceipt_no"Receipt No." — Invoice.id · Receipt identityissue_date"Date" — Invoice.generated_date · Receipt identitybilling_name"Name" — Invoice.billing_snapshot.name · Bill tobilling_address"Address" — Invoice.billing_snapshot.address · Bill tobilling_contact"Contact" — Invoice.billing_snapshot.contact · Bill toproduct_name"Description" — Product.name · Order detailsunit_price"Unit Price (LAK)" — Invoice.unit_price · Order detailsqty"Qty (months)" — Invoice.qty · Order details · visible when subscription_type == perioddiscount_pct"Discount" — Invoice.discount_pct · Order details · visible when discount_pct > 0total_paid"Total (LAK)" — Invoice.total_paid · Order detailspayment_channel"Payment Channel" — Invoice.gateway · Payment summarypayment_date"Payment Date" — Invoice.callback_received_date · Payment summarypayment_reference"Reference No." — Invoice.gateway_txn_id · Payment summary
None — PDF is read-only. Download is triggered by the "Download Receipt" action on SCR-BIL.03.
- The receipt is generated once payment is confirmed, and saved as a PDF file. The same file is served each time the learner downloads it — it is not re-created on each download.
- The receipt is laid out for A4 paper and can be printed.
- All monetary amounts are displayed in LAK (Lao Kip) with no decimal places.