Payment — Khái niệm cốt lõi
| Khái niệm | Nghĩa |
|---|---|
| PaymentOption | Cách thanh toán được chọn/lưu trên billing hoặc checkout: PayLater, PayNow, Direct Debit, Deposit... |
| Payment method availability | Quy tắc method nào được dùng theo BU, site, category, provider và master toggle. |
| PayLater | Cho phép tạo booking/invoice nhưng để việc thu tiền xử lý sau. |
| PayNow | Thu tiền ngay qua card/checkout provider. |
| Windcave | Provider checkout/card; dùng redirect/result/webhook để cập nhật trạng thái. |
| Direct Debit | Thu tiền tự động qua customer token/batch. |
| Kiwi Direct Debit | Luồng Direct Debit/provider đặc thù, cần BU scoping và customer create/sync. |
| Deposit | Khoản trả trước một phần cho booking; không đồng nghĩa invoice đã paid full. |
| DirectPaymentBatch | Batch/provider transaction group cho nhiều direct payment hoặc deposit payment. |
| AccountPaymentCustomer | Token/customer payment profile theo account + BU + provider. |
Payment option vs provider
PaymentOption là lựa chọn nghiệp vụ/customer thấy. Provider là hệ thống ngoài xử lý giao dịch. Ví dụ PayNow có thể dùng Windcave; Direct Debit có thể dùng Kiwi. Cấu hình availability quyết định option có được show/cho submit hay không.
Deposit không phải full payment
Deposit có thể confirm booking sau khi thu một phần tiền, nhưng billing generation vẫn có thể tạo invoice full amount. Phần settlement còn lại thuộc workflow payment/finance sau đó.
Ownership ngắn gọn
| Owner | Sở hữu |
|---|---|
| Payment | Provider transaction, payment customer token, batch lifecycle, checkout result. |
| Finance | Invoice/billing lifecycle và chứng từ tài chính. |
| BookingOrder | Booking lock/deposit snapshot liên quan confirm booking. |
| BusinessUnit | Method/provider settings và availability scope. |