visionA/docs/autoflow/02-prd/features/feature-billing.md
jim800121chen fb7da5d180 chore(autoflow): migrate .autoflow/ 共享層文件至 docs/autoflow/
依 autoflow-agent workspace v2 設計把 PRD / 設計 / 架構 / 交付類
共享文件從個人層 .autoflow/(ignored)搬到 docs/autoflow/(進 git),
讓團隊可共享產品與架構文件,個人層只留 progress / review / testing 等
per-branch 筆記。

- 02-prd/        21 個檔(PRD、features、market-analysis 等)
- 03-design/     18 個檔(design-spec、wireframes、flows 等)
- 04-architecture/ 31 個檔(TDD、design-doc、ADR×14、API 規格等)
- 07-delivery/   3 個檔(project-summary、phase-0.6-handover、stage-deployment-setup)

合計 73 檔。原檔已從 .autoflow/ 移除(migration 工具執行 git mv,
但因 .autoflow/ 在 .gitignore 中、git 將此操作視為新增、無 rename history)。
2026-05-04 16:55:55 +08:00

78 lines
1.8 KiB
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# FeatureBillingP2Phase 0 不做)
> 父文件:[PRD.md](../PRD.md) | 對應 User StoriesUS-27
>
> **⚠️ Phase 0 完全不做**。本文件只留介面定義與未來規劃。
---
## 範圍
Phase 0 / Phase 1 全部跳過。Phase 2 再規劃。
---
## 為什麼 Phase 0 不做
- Phase 0 是雛形,只給內部測試
- 商業模式尚未定案(訂閱 / usage-based / freemium 都有可能)
- 接金流Stripe 等)會拖慢雛形進度
---
## 可能的商業模式Phase 2 待討論)
### 模式 A訂閱制
| 方案 | 月費 | 裝置數上限 | 模型儲存 | 叢集 |
|------|------|----------|---------|------|
| Free | $0 | 1 | 100MB | ❌ |
| Pro | $19 | 5 | 10GB | ✅ |
| Team | $99 | 無限 | 100GB | ✅ |
| Enterprise | 客製 | — | — | + SSO, SLA |
### 模式 B按推論次數
- $X / 1M inferences
- 前 100K 免費
### 模式 CFreemium + 轉檔計費
- 本體免費使用
- 轉檔服務按次計費($Y / 轉檔)
---
## BillingProvider 介面Phase 2
```go
// internal/billing/provider.go
type BillingProvider interface {
CreateCustomer(ctx context.Context, user *User) (*Customer, error)
CreateSubscription(ctx context.Context, customerID, planID string) (*Subscription, error)
CancelSubscription(ctx context.Context, subscriptionID string) error
ReportUsage(ctx context.Context, customerID, meterID string, quantity int64) error
GetInvoices(ctx context.Context, customerID string) ([]Invoice, error)
}
```
Phase 2 實作候選:
- Stripe最成熟SaaS 標配)
- Paddle全球稅務處理較好
- Lemon Squeezy小團隊友善
---
## 其他未定案
- 企業合約 / PO 流程
- 退款政策
- 多幣別
- 發票系統(特別是台灣統一發票)
---
## 連結
- 回:[PRD <20><>](../PRD.md)