Specification — Create Invoice (MANUAL)Đặc tả — Create Invoice (MANUAL)· F3 · Round A. API_PAYMENT:· F3 · Vòng A. API_PAYMENT:L35 API Create (reference).
1. Introduction1. Giới thiệu
1.1 Purpose1.1 Mục đích
Confirm the invoice creation modal on the Merchant Portal before designing the detailed FE/BE.Xác nhận modal tạo hóa đơn trên Merchant Portal trước khi thiết kế chi tiết FE/BE.
RoundVòng
ContentNội dung
OwnerThực hiện
A — business confirmation via UI (this document)A — xác nhận nghiệp vụ qua giao diện (tài liệu này)
UI journey: screens, buttons, fieldsHành trình trên giao diện: màn hình, nút, trường
Rules and user-visible error messagesQuy tắc, thông báo lỗi người dùng thấy
1.4 Glossary & abbreviations1.4 Thuật ngữ & viết tắt
Terms follow the CPG glossary: keep industry English terms; short meaning text (ND-03).Thuật ngữ theo Từ điển thuật ngữ CPG: giữ thuật ngữ ngành (tiếng Anh), giải thích ngắn bằng tiếng Việt (ND-03).
VietnameseTiếng Việt
English / UITiếng Anh / trên giao diện
MeaningNghĩa
StatusTrạng thái
hóa đơn
Invoice
Merchant crypto payment request document (code INV-…), linked to order/customer/line items.Chứng từ yêu cầu thanh toán crypto của merchant (mã INV-…), gắn order/khách/dòng hàng.
referencetham khảo
trạng thái hóa đơn
PENDING / PAID / OVERDUE / CANCELLED
Pending: awaiting payment. Paid: fully paid. Overdue: past due unpaid. Cancelled: cancelled. System-driven only.Pending: chờ thanh toán. Paid: đã thanh toán đủ. Overdue: quá hạn chưa thanh toán. Cancelled: đã hủy. Chỉ hệ thống đổi trạng thái.
referencetham khảo
tài sản
Asset
Token received / held: USDT, USDC (stablecoin).Đồng tiền nhận / giữ: USDT, USDC (stablecoin).
referencetham khảo
mã đơn
Order ID
Merchant order reference bound to the invoice.Tham chiếu đơn hàng phía merchant gắn với hóa đơn.
referencetham khảo
hạn thanh toán
Due Date / Expiry Time
Invoice payment deadline; past due may become Overdue.Thời điểm hết hạn thanh toán hóa đơn; quá hạn có thể chuyển Overdue.
referencetham khảo
nguồn tạo
source_type
Invoice origin: MANUAL (portal), QR_CODE, CHECKOUT_LINK, API_PAYMENT (SDK/API).Nguồn sinh hóa đơn: MANUAL (cổng), QR_CODE, CHECKOUT_LINK, API_PAYMENT (SDK/API).
referencetham khảo
(keep English)
Hot Wallet (HW)
CPG-managed transit wallet per merchant and network. Do not use the Vietnamese calque for 'hot wallet'.Ví trung chuyển do CPG quản lý, theo từng merchant và network. Không dịch 'ví nóng'.
referencetham khảo
(keep English)
Virtual Account (VA)
Per-customer deposit address bound to a Hot Wallet.Địa chỉ nhận tiền riêng của từng khách hàng, gắn với một Hot Wallet.
referencetham khảo
(keep English)
network
Blockchain the wallet runs on: TRON, BSC, Ethereum, Polygon (Mainnet / Testnet).Blockchain mà ví hoạt động: TRON, BSC, Ethereum, Polygon (Mainnet / Testnet).
referencetham khảo
xuất dữ liệu
Export
Download invoice list (CSV / Excel / PDF) under current filters.Tải danh sách hóa đơn (CSV / Excel / PDF) theo bộ lọc hiện tại.
Required — fail = not accepted (RFC 2119: SHALL)Bắt buộc — không đạt thì không nghiệm thu (RFC 2119: SHALL)
MUST NOT
Forbidden (SHALL NOT)Cấm (SHALL NOT)
SHOULD
Recommended — alternatives need a reason (SHOULD)Khuyến nghị — làm khác phải nêu lý do (SHOULD)
MAY
Optional (MAY)Tuỳ chọn (MAY)
Status labelNhãn trạng thái
MeaningNghĩa
Confirmed (source)Đã xác nhận (source)
Already in URD / RTM / FSD v2.2 or confirmed by FlyPay (cite source, date).Đã có trong URD / RTM / FSD v2.2 hoặc FlyPay đã xác nhận (ghi nguồn, ngày).
DHC proposalDHC đề xuất
DHC proposal with rationale; needs FlyPay agreement.DHC đề xuất kèm lý do; cần FlyPay đồng ý.
Awaiting decision QnChờ quyết định Qn
FlyPay must answer Qn in §12; each has a DHC recommendation.Cần FlyPay trả lời câu hỏi Qn ở Mục 12; mỗi câu có khuyến nghị DHC.
DHC added (v0.2)DHC bổ sung (bản 0.2)
DHC added in the version in parentheses (usually missing shot / description).DHC bổ sung ở phiên bản ghi trong ngoặc (thường là ảnh / mô tả còn thiếu).
referencetham khảo
Explanatory info, not a requirement.Thông tin giải thích, không phải yêu cầu.
Combined cellÔ ghép
Example: Confirmed (RL-05-01); length: Awaiting Q6. 'Confirmed' applies only to the cited part.Ví dụ: Đã xác nhận (RL-05-01); độ dài: Chờ quyết định Q6.
SymbolKý hiệu
MeaningNghĩa
S1, S2, S2-N…
Screen ids; suffix = variantMã màn hình; hậu tố là biến thể
B1…Bn
User-flow step ids (§5)Mã bước trong luồng người dùng (Mục 5)
123…
Callout numbers on shots; explained in the table below the image.Số chú thích trên ảnh; giải thích ở bảng ngay dưới ảnh.
BR, RL, TC, E-*, AC, Q, L
Requirement, rule, test case, error, acceptance, question, referenceYêu cầu, quy tắc, kịch bản kiểm thử, thông báo lỗi, tiêu chí nghiệm thu, câu hỏi, tài liệu tham chiếu
(new id)(mã mới)
DHC-proposed id; FlyPay assigns official RTM ids (ND-08)Mã DHC đề xuất; FlyPay cấp mã chính thức khi cập nhật RTM (ND-08)
dd/mm/yyyy
Date formatĐịnh dạng ngày
2. Overview2. Tổng quan
Create from List; Admin/Operator rights (Section 4).Create từ List; quyền Admin/Operator (Mục 4).
Full validation; Create disabled until valid (Section 6).Validation đầy đủ; Create disabled đến khi hợp lệ (Mục 6).
API/SDK: separate reference page.API/SDK: trang tham chiếu riêng.
3 FlyPay questions.3 câu hỏi FlyPay.
DHC added (v0.2)DHC bổ sung (bản 0.2) — no screenshot for this screen yet.chưa có ảnh cho màn hình này.
Figure 1Hình 1— Overview: Create Invoice modal from the button on the List (source_type implicitly MANUAL).— Toàn cảnh: Modal Create Invoice từ nút trên List (source_type ngầm MANUAL).
3. Business rules3. Nghiệp vụ
3.1 The role of the Invoice in payment transactions3.1 Vai trò của Invoice trong nghiệp vụ thanh toán
Invoice isInvoice làdocuments requesting crypto paymentchứng từ yêu cầu thu tiền cryptoof merchant: anchor the amount to be collected (của merchant: neo số tiền phải thu (asset+ total), customer, order (+ tổng), khách hàng, đơn hàng (order_id), payment deadline (), hạn thanh toán (due_date) and the list of product lines. It) và danh mục dòng hàng. Nónokhôngreplace manual payment confirmation — funds are recorded through observing the chain/transaction and the system updates the status (seethay bước xác nhận thanh toán thủ công — tiền về được ghi nhận qua quan sát chuỗi / giao dịch và hệ thống cập nhật trạng thái (xemL33 Invoice Status).
RoleVai trò
Business meaningÝ nghĩa nghiệp vụ
StateTrạng thái
Accounts receivable ledgerNeo khoản phải thu
Confirm the amount, asset, term, and contents of the order before the customer pays — then create immutable contentChốt số tiền, asset, hạn và nội dung đơn trước khi khách trả — sau tạo nội dung bất biến (INV-CREATE-16).
Can be generated from the portal (MANUAL), attach QR Code / Checkout Link, or Payment API — the same type of receipt.Có thể sinh từ cổng (MANUAL), gắn QR Code / Checkout Link, hoặc API Payment — cùng một loại chứng từ thu.
Confirmed (FSD §1 source_type)Đã xác nhận (FSD §1 source_type)
Reconcile with transactionĐối soát với giao dịch
When payment is successful, the invoice is attached to / reflects the transaction; status → PAID (system). If overdue and not paid → OVERDUE.Khi thanh toán thành công, invoice gắn / phản ánh transaction; status → PAID (hệ thống). Quá hạn không trả → OVERDUE.
Mapping order, product, customer; after payment, it can be linked to VA / HW / network / asset / transaction (FSD scope).Ánh xạ order, product, customer; sau thanh toán có thể gắn VA / HW / network / asset / transaction (FSD scope).
Confirmed (FSD §1 in scope)Đã xác nhận (FSD §1 in scope)
Do not do anything on this UIKhông làm gì trên UI này
Do not manually confirm payment; do not manually change status; no fiat settlement / refund on Create.Không xác nhận thanh toán tay; không sửa status tay; không settlement fiat / refund trên Create.
Confirmed (FSD §1 out of scope)Đã xác nhận (FSD §1 out of scope)
Create on the portalCreate trên cổng= step= bướcreleasephát hànhreceipt voucher (PENDING). Stepchứng từ thu (PENDING). Bướccollect enough moneythu đủ tiềnBelongs to the payment flow / Sync–Transaction; the UI Create only ensures that the data is sufficient for later reconciliation.thuộc luồng thanh toán / Sync–Transaction; UI Create chỉ đảm bảo dữ liệu đủ để đối soát sau này.
3.2 Create an invoice on the portal3.2 Tạo hóa đơn trên cổng
Admin/Operator manually creates the invoice. After creation: statusAdmin/Operator tạo hóa đơn thủ công. Sau khi tạo: statusPENDING, content, nội dungunchangingbất biến (INV-CREATE-15/16). source_typeundergroundngầmMANUAL. Create from QR/Checkout (. Tạo từ QR/Checkout (INV-CREATE-17) and API) và APIL35 API Create (reference)beyond the scope of this round of UI details.ngoài phạm vi chi tiết UI vòng này.
3.3 Requirements3.3 Yêu cầu
BR IDMã BR
Original wording (URD / RTM / FSD)Nguyên văn (URD / RTM / FSD)
Invoice before having an on-chain transactionInvoice trước khi có tx on-chain
Merchant needs documents / finalized amount for the customer to pay and for the system to match later.Merchant cần chứng từ / số tiền chốt để khách trả và để hệ thống match sau này.
Section 3.1Mục 3.1
Confirmed (FSD §1)Đã xác nhận (FSD §1)
Calculate Total per line / Invoice Total on UITính Total dòng / Invoice Total trên UI
Merchant sees the number before submittingMerchant thấy số trước khi submit
Confirmed (invoice:manage)Đã xác nhận (invoice:manage)
5. User flows5. Luồng người dùng
Figure 4 — Create Invoice (MANUAL) — Column = actor lane; blue ellipse = Start; red ellipse = End; diamond = condition (Hình 4 — Create Invoice (MANUAL) — Cột = làn actor; elip xanh = Bắt đầu; elip đỏ = Kết thúc; hình thoi = điều kiện (Achieve/HaveĐạt/Có↓ next step,↓ bước sau,Not pass/NoKhông đạt/Không→ go back to the step indicated by the red arrow); dotted line = option / step outside the function. Text in the block is not cut off.→ quay về bước ghi trên mũi tên đỏ); nét đứt = phương án / bước ngoài tính năng. Chữ trong block không bị cắt.
StepBước
WhoAi
ActionLàm gì
System responseHệ thống phản hồi
ScreenMàn hình
B1–B2
User
Open modalMở modal
Title Create Invoice
S1
B3–B4
User/Portal
Enter & validateNhập & validate
Disable Create if failDisable Create nếu fail
S1
B5–B7
User/SystemUser/Hệ thống
Submit
PENDING + immutable
S2
6. Step-by-step UI6. Giao diện từng bước
Each step: screenshot first, then a table explaining each orange callout number (HA-02, HA-03). Keep UI copy in English as on DEV. DEV shots are wireframes; missing variants are marked DHC added (v0.2)DHC added (version 0.2) in the Figure column.Mỗi bước: ảnh màn hình trước, bảng ngay dưới giải thích từng số tròn cam (HA-02, HA-03). Chữ trên giao diện để tiếng Anh như DEV hiện tại. Ảnh DEV là wireframe; biến thể chưa có ảnh ghi DHC added (v0.2)DHC bổ sung (bản 0.2) ở cột Hình.
6.1 Modal Create (S1)
Next:Đi tiếp: Create OK → S2; Cancel → list
DHC added (v0.2)DHC bổ sung (bản 0.2) — no screenshot for this screen yet.chưa có ảnh cho màn hình này.
Figure 6.1Hình 6.1 — S1: Order ID · Customer ID · Email · Expiry · Asset · product rows · Notes · Cancel/Create
Each rule uses keywords from §1.6 and a verification method: Test = test against AC in §11.1; Inspection = verify directly on the UI.Mỗi quy tắc dùng từ khoá theo Mục 1.6 và có cách kiểm chứng: Test = kiểm thử theo AC ở Mục 11.1; Inspection = kiểm tra trực tiếp trên giao diện.
12. Questions for FlyPay12. Câu hỏi cần FlyPay quyết định
Each question includes a DHC recommendation (ND-07). FlyPay only needs to accept the recommendation or choose another option.Mỗi câu kèm khuyến nghị DHC (ND-07). FlyPay chỉ cần chọn: đồng ý khuyến nghị, hoặc chọn phương án khác.
IDMã
QuestionCâu hỏi
SectionMục
DHC proposalĐề xuất DHC
Q1
Do Plus from QR/Checkout share the same modal?Plus từ QR/Checkout có cùng modal không?
Section 3Mục 3
Together with modal; return Invoice ID to parent (Cùng modal; trả Invoice ID cho parent (INV-CREATE-17) — UI parent in the QR/Checkout module.) — UI parent ở module QR/Checkout.
Q2
Allow tax/discount on UI Phase 1?Cho phép tax/discount trên UI Phase 1?
S1
Hidden; API has an optional field — Round B/SDK.Ẩn; API có field optional — vòng B/SDK.
Q3
Confirm when closing dirty form?Confirm khi đóng dirty form?
S1
There is (FSD Close Icon).Có (FSD Close Icon).
13. SoW baseline & FSD handoff13. Baseline SoW & phần chuyển sang FSD
13.1 Items for SoW baseline13.1 Phần đưa vào baseline SoW
The feature enters baseline when Q1–Q3 are decided and FlyPay signs §14.Tính năng vào baseline khi Q1–Q3 đã có quyết định và FlyPay ký Mục 14.
13.2 Items moved to FSD (Round B)13.2 Phần chuyển sang FSD (vòng B)
Round A MUST NOT contain APIs, data tables, or system error codes (ND-02). The following belong in Round B FSD:Vòng A KHÔNG ĐƯỢC chứa API, bảng dữ liệu, mã lỗi hệ thống (ND-02). Các nội dung sau thuộc FSD vòng B:
Map DTO CreateInvoice
Idempotency if retryIdempotency nếu retry
14. Feedback & approval14. Phản hồi & phê duyệt
14.1 How to respond14.1 Cách phản hồi
FlyPay records each Q1–Q3 decision in the 'FlyPay decision' column of §12.FlyPay ghi quyết định từng câu Q1–Q3 vào cột 'FlyPay quyết định' ở Mục 12.
Other feedback: Word comments anchored to the exact paragraph / figure.Góp ý khác: ghi comment trong file Word, mỗi comment gắn đúng đoạn / ảnh.
Reply on the same email thread used to send the document.Gửi lại theo thread email đã gửi tài liệu.
DHC updates the next revision, updates Version history, and marks changed items.DHC cập nhật bản kế tiếp, ghi Lịch sử phiên bản và đánh dấu mục đã sửa.
14.2 Approval14.2 Phê duyệt
RoleVai trò
NameHọ tên
DateNgày
DecisionKết luận
DHC — BA authorDHC — BA soạn
—
FlyPay — BusinessFlyPay — Nghiệp vụ
Approve / Approve with conditions / RejectDuyệt / Duyệt có điều kiện / Không duyệt
FlyPay — PM
Approve / Approve with conditions / RejectDuyệt / Duyệt có điều kiện / Không duyệt
Related code & document linksMã liên quan & liên kết tài liệu
Missing code log / out of scopeNhật ký mã thiếu / ngoài scope
The codes areCác mã đượcyellow highlighthighlight vàngbecause there is no (or external) target document. Changelog version 0.3.vì chưa có (hoặc ngoài) tài liệu đích. Changelog bản 0.3.
CodeMã
CategoryLoại
MarkGhi chú
UC-INV-CREATE
uc_anchor_missing
Add anchor / stub on RTM or TC; highlight in yellow until FlyPay issues the official code.Bổ sung anchor / stub trên RTM hoặc TC; highlight vàng đến khi FlyPay cấp mã chính thức.
UC-INV-LIST
uc_anchor_missing
Add anchor / stub on RTM or TC; highlight in yellow until FlyPay issues the official code.Bổ sung anchor / stub trên RTM hoặc TC; highlight vàng đến khi FlyPay cấp mã chính thức.
Generated for CPG documentation suite · CPG-SPEC-INV-CREATE · v0.2