Core — Transaction Use Cases
Derived from FSD Use Cases (v0 — expand when Doc05 Excel exists)
A. Document controlA. Kiểm soát tài liệu
| Doc ID | CPG-UC-CPG-Core_UC_Transaction |
|---|---|
| VersionPhiên bản | 1.0 |
| StatusTrạng thái | Draft |
| Owner | CPG BA / Architecture |
| AudienceĐối tượng | BA, QA, Product, Frontend, Backend |
| ClassificationPhân loại | Internal |
| Effective dateNgày hiệu lực | 01/12/2026 |
| Related docs | Core Transaction TC · CPG-Core_FSD_Transaction |
B. Version historyB. Lịch sử phiên bản
| Version | Date | Author | ChangesThay đổi |
|---|---|---|---|
| 1.0 | 01/12/2026 | Khoa Trinh | Version 1.0 |
C. Table of contentsC. Mục lục
D. ContentD. Nội dung
Catalog
| UC ID | Name | Linked TC count | Categories |
|---|---|---|---|
| UC-SES-01 | Service enabled; VA+HW active | 1 | Function |
| UC-MCH-01 | Session awaiting; exact credited observation | 1 | Function |
| UC-PAY-01 | Matched; KYT PASS | 1 | Function |
| UC-KYT-01 | Allocated; KYT FAIL | 1 | Function |
| UC-QRY-01 | Payments exist | 1 | Function |
| UC-REF-01 | Available; whitelist wallet | 1 | Function |
| UC-STL-01 | Available locked funds | 1 | Function |
| UC-IDM-01 | Intent broadcast; process kill | 1 | Function |
| UC-WHK-01 | payment.success | 1 | Function |
| UC-FRZ-01 | BLOCK_OUTBOUND freeze | 1 | Function |
| UC-NEG-01 | QR Payment disabled | 1 | Function |
| UC-SES-02 | Prior successful create | 1 | Function |
| UC-MCH-02 | txn-service | 1 | Function |
| UC-REF-02 | Source tagged exchange; to_source=true | 1 | Function |
| UC-WHK-02 | Prior delivery | 1 | Function |
| UC-NEG-02 | Refund amount > remaining | 1 | Function |
| UC-REF-03 | Eligible payment | 1 | Function |
| UC-NEG-03 | Session expired; late credit | 1 | Function |
| UC-NEG-04 | VA paused | 1 | Function |
Use cases
UC-SES-01 — Service enabled; VA+HW active
- Actor: settings / API
- Goal: Service enabled; VA+HW active
- Source: Derived from FSD
CPG-Core_FSD_Transaction
Linked test cases
CTXN-001— Service enabled; VA+HW active (Function)
Representative main flow
POST session with Idempotency-Key
Expected outcome
One payment_id; status awaiting_deposit
Failure
SERVICE_DISABLED; validation
UC-MCH-01 — Session awaiting; exact credited observation
- Actor: txn-service
- Goal: Session awaiting; exact credited observation
- Source: Derived from FSD
CPG-Core_FSD_Transaction
Linked test cases
CTXN-001— Session awaiting; exact credited observation (Function)
Representative main flow
Consume event; match
Expected outcome
matched; one match row
Failure
Duplicate occurrence → no-op
UC-PAY-01 — Matched; KYT PASS
- Actor: txn-service
- Goal: Matched; KYT PASS
- Source: Derived from FSD
CPG-Core_FSD_Transaction
Linked test cases
CTXN-001— Matched; KYT PASS (Function)
Representative main flow
allocate then confirm
Expected outcome
Merchant available += net; fees accrued
Failure
FR2 over-allocate; freeze
UC-KYT-01 — Allocated; KYT FAIL
- Actor: txn-service
- Goal: Allocated; KYT FAIL
- Source: Derived from FSD
CPG-Core_FSD_Transaction
Linked test cases
CTXN-001— Allocated; KYT FAIL (Function)
Representative main flow
Attempt confirm
Expected outcome
Rejected; kyt_hold; payment.failed
Failure
PASS missing → same reject
UC-QRY-01 — Payments exist
- Actor: Merchant JWT
- Goal: Payments exist
- Source: Derived from FSD
CPG-Core_FSD_Transaction
Linked test cases
CTXN-001— Payments exist (Function)
Representative main flow
List with Portal filters
Expected outcome
Only own merchant rows
Failure
Other merchant → empty/403
UC-REF-01 — Available; whitelist wallet
- Actor: Merchant + checker
- Goal: Available; whitelist wallet
- Source: Derived from FSD
CPG-Core_FSD_Transaction
Linked test cases
CTXN-001— Available; whitelist wallet (Function)
Representative main flow
Approve; lock; broadcast; execute
Expected outcome
Refund success; refundable reduced
Failure
Wrong wallet → reject before broadcast
UC-STL-01 — Available locked funds
- Actor: Settlement client
- Goal: Available locked funds
- Source: Derived from FSD
CPG-Core_FSD_Transaction
Linked test cases
CTXN-001— Available locked funds (Function)
Representative main flow
lock → init → settle → complete
Expected outcome
Settled + fees
Failure
Ops client → authz deny
UC-IDM-01 — Intent broadcast; process kill
- Actor: txn-service
- Goal: Intent broadcast; process kill
- Source: Derived from FSD
CPG-Core_FSD_Transaction
Linked test cases
CTXN-001— Intent broadcast; process kill (Function)
Representative main flow
Restart; replay same intent_id
Expected outcome
One chain tx; one ledger execute
Failure
Second sign attempt forbidden
UC-WHK-01 — payment.success
- Actor: txn-service
- Goal: payment.success
- Source: Derived from FSD
CPG-Core_FSD_Transaction
Linked test cases
CTXN-001— payment.success (Function)
Representative main flow
Deliver HMAC POST
Expected outcome
Attempt SENT; webhook_status SENT
Failure
5xx → retry per config
UC-FRZ-01 — BLOCK_OUTBOUND freeze
- Actor: txn-service
- Goal: BLOCK_OUTBOUND freeze
- Source: Derived from FSD
CPG-Core_FSD_Transaction
Linked test cases
CTXN-001— BLOCK_OUTBOUND freeze (Function)
Representative main flow
Refund/settlement broadcast
Expected outcome
OUTBOUND_FROZEN; intent not broadcast
Failure
Direct Formance forbidden
UC-NEG-01 — QR Payment disabled
- Actor: API
- Goal: QR Payment disabled
- Source: Derived from FSD
CPG-Core_FSD_Transaction
Linked test cases
CTXN-001— QR Payment disabled (Function)
Representative main flow
POST session
Expected outcome
SERVICE_DISABLED
Failure
—
UC-SES-02 — Prior successful create
- Actor: API
- Goal: Prior successful create
- Source: Derived from FSD
CPG-Core_FSD_Transaction
Linked test cases
CTXN-002— Prior successful create (Function)
Representative main flow
Replay same key
Expected outcome
Same payment_id; no second row
Failure
Different body → CONFLICT
UC-MCH-02 — txn-service
- Actor: Platform / service actor
- Goal: txn-service
- Source: Derived from FSD
CPG-Core_FSD_Transaction
Linked test cases
CTXN-002— txn-service (Function)
Description
Fixed amount; credit
UC-REF-02 — Source tagged exchange; to_source=true
- Actor: Merchant + checker
- Goal: Source tagged exchange; to_source=true
- Source: Derived from FSD
CPG-Core_FSD_Transaction
Linked test cases
CTXN-002— Source tagged exchange; to_source=true (Function)
Representative main flow
Submit refund
Expected outcome
EXCHANGE_REFUND_BLOCKED; no broadcast
Failure
—
UC-WHK-02 — Prior delivery
- Actor: Merchant developer
- Goal: Prior delivery
- Source: Derived from FSD
CPG-Core_FSD_Transaction
Linked test cases
CTXN-002— Prior delivery (Function)
Representative main flow
Resend selected ids
Expected outcome
New attempt; history kept
Failure
No permission → 403
UC-NEG-02 — Refund amount > remaining
- Actor: Merchant
- Goal: Refund amount > remaining
- Source: Derived from FSD
CPG-Core_FSD_Transaction
Linked test cases
CTXN-002— Refund amount > remaining (Function)
Representative main flow
POST refund
Expected outcome
VALIDATION_ERROR / NOT_REFUNDABLE
Failure
—
UC-REF-03 — Eligible payment
- Actor: Single operator
- Goal: Eligible payment
- Source: Derived from FSD
CPG-Core_FSD_Transaction
Linked test cases
CTXN-003— Eligible payment (Function)
Representative main flow
Submit without second approval
Expected outcome
No broadcast; not processing confirmed
Failure
—
UC-NEG-03 — Session expired; late credit
- Actor: txn-service
- Goal: Session expired; late credit
- Source: Derived from FSD
CPG-Core_FSD_Transaction
Linked test cases
CTXN-003— Session expired; late credit (Function)
Representative main flow
Match
Expected outcome
expired hold; no available
Failure
—
UC-NEG-04 — VA paused
- Actor: EVM operator
- Goal: VA paused
- Source: Derived from FSD
CPG-Core_FSD_Transaction
Linked test cases
CTXN-004— VA paused (Function)
Representative main flow
flush/refund
Expected outcome
Not submitted; intent waits or fails closed
Failure
—