Files
vmall/openspec/changes/add-wallet-settlement/specs/frontend-shop-admin/spec.md
T

1.5 KiB

ADDED Requirements

Requirement: Merchant settlement statements

Shop-admin SHALL list and open the signed-in shop's settlement statements — period, amount snapshot, and status — through the shared API contract, and allow manual generation for a closed period of the own shop. Shop-scoped pages SHALL never expose another shop's statements or their order/refund breakdown.

Scenario: statements list and detail

  • WHEN a merchant opens the settlement page
  • THEN only their own shop's statements are listed and each opens into its snapshot breakdown of orders, refunds, commission, and payable amount

Scenario: generation is idempotent in the UI

  • WHEN the merchant generates a statement for a period that already has one
  • THEN the existing statement appears without duplication

Requirement: Shop-account withdrawal

The shop owner SHALL view the shop account summary (available and frozen balance of the shop owner's account) and apply to withdraw from it through the shared API contract, seeing the request as pending until the platform reviews it.

Scenario: shop-account withdrawal freezes funds

  • WHEN the shop owner submits a withdrawal request from the shop-account page
  • THEN the summary reflects the frozen amount and the request lists as pending

Scenario: reviewed request reflects outcome

  • WHEN the platform rejects the shop owner's pending withdrawal
  • THEN the shop-account summary shows the amount returned to available balance and the request shows as rejected