View Payment History › Payment History
🎬 Simulate: Recoverable · AF-3A Reset

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):

↻ filter / Download Receipt → Payment History (self) ↓ Download Receipt (file missing) → AF-3A alert → exit → Home
📝 Spec notes — UC-BIL.04 / SCR-BIL.03 (fields, actions, requirements)
Identity
  • Screen: SCR-BIL.03 — Payment History
  • Use case: UC-BIL.04 — View Payment History
Brief description

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.

Fields
  • filter_type "Transaction Type" — enum [all, course_purchase, subscription_renew] · default: all · always visible
  • filter_period_from "From" — date · default: today_minus_6_months · always visible
  • filter_period_to "To" — date · default: today · validation: >= filter_period_from · always visible
  • row_date "Date" — date · Transaction.created_at · always · read-only
  • row_type "Transaction Type" — enum [course_purchase, subscription_renew] · computed · always · read-only
  • row_item_name "Item" — text · Product.name · always · read-only
  • row_qty "Duration" — text · Transaction.qty · visible when row_product_type != lifetime · read-only
  • row_total_paid "Total" — number · Transaction.total_paid · always · read-only
  • row_status "Status" — enum [pending, success, failed, cancelled, expired] · Transaction.status · always · read-only
  • row_ref_code "Reference No." — text · Transaction.ref_code · always · read-only
  • page_no "Page" — number · default: 1 · visible when total_pages > 1 · validation: min 1
Actions
  • apply_filter "Search" — always enabled · triggers UC-BIL.04-A-2A-1
  • clear_filter "Clear" — enabled when filter_type != all OR period != default · triggers UC-BIL.04-M-2
  • download_receipt "Download Receipt" — enabled when row_status == success AND row_has_receipt == true · triggers UC-BIL.04-M-3
  • prev_page "Previous" — enabled when page_no > 1 · triggers UC-BIL.04-M-2
  • next_page "Next" — enabled when page_no < total_pages · triggers UC-BIL.04-M-2
  • go_to_catalog "Go to Catalog" — enabled when transactions.count == 0 · triggers UC-BIL.04-A-2B-1
Additional requirements
  1. Must remain fast and responsive when many learners are using the page at the same time [NFR-01]
  2. 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]
  3. 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]
  4. 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]
  5. 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]
  6. 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]
  7. Each time a user downloads a receipt, the download is recorded (transaction reference, user, and timestamp) for audit purposes [BR-BIL.03]
  8. 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
Identity
  • 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)
Brief description

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.

Regions
  1. Document header — platform name (top-left) + "RECEIPT" title (top-right)
  2. Receipt identity — receipt number, issue date (top-right block)
  3. Bill to — name, address, contact (billing details as entered during checkout)
  4. Order details — description / Qty (months) / unit price / amount table; discount row if applicable; total row
  5. Payment summary — payment channel, payment date, reference number
Fields (all read-only, sourced from Invoice entity)
  • platform_name — literal "Platform Name" · Document header
  • document_title — literal "RECEIPT" · Document header
  • receipt_no "Receipt No." — Invoice.id · Receipt identity
  • issue_date "Date" — Invoice.generated_date · Receipt identity
  • billing_name "Name" — Invoice.billing_snapshot.name · Bill to
  • billing_address "Address" — Invoice.billing_snapshot.address · Bill to
  • billing_contact "Contact" — Invoice.billing_snapshot.contact · Bill to
  • product_name "Description" — Product.name · Order details
  • unit_price "Unit Price (LAK)" — Invoice.unit_price · Order details
  • qty "Qty (months)" — Invoice.qty · Order details · visible when subscription_type == period
  • discount_pct "Discount" — Invoice.discount_pct · Order details · visible when discount_pct > 0
  • total_paid "Total (LAK)" — Invoice.total_paid · Order details
  • payment_channel "Payment Channel" — Invoice.gateway · Payment summary
  • payment_date "Payment Date" — Invoice.callback_received_date · Payment summary
  • payment_reference "Reference No." — Invoice.gateway_txn_id · Payment summary
Actions

None — PDF is read-only. Download is triggered by the "Download Receipt" action on SCR-BIL.03.

Additional requirements
  1. 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.
  2. The receipt is laid out for A4 paper and can be printed.
  3. All monetary amounts are displayed in LAK (Lao Kip) with no decimal places.