feat(billing): charge service fees on credit top-ups - #5264
feat(billing): charge service fees on credit top-ups#5264jeanduplessis wants to merge 2 commits into
Conversation
Code Review SummaryStatus: No Issues Found | Recommendation: Merge Executive SummaryIncremental review of exemption-log wording in the service-fee spec, validation notes, and ADR found no issues; the terminology now matches the unified exemption-log schema. Files Reviewed (3 files)
Previous Review Summaries (2 snapshots, latest commit ea2270f)Current summary above is authoritative. Previous snapshots are kept for context only. Previous review (commit ea2270f)Status: No Issues Found | Recommendation: Merge Executive SummaryIncremental review of the unified-exemption-log test cleanup found no issues; the removed history-table delete matches the current schema. Files Reviewed (1 file)
Previous review (commit 7696e84)Status: No Issues Found | Recommendation: Merge Files Reviewed (5 files)
Reviewed the service-fee wiring for personal/org Checkout top-ups and Kilo-owned auto-top-up invoices against the Reviewed by grok-4.6 · Input: 31.5K · Output: 4.6K · Cached: 171K Review guidance: REVIEW.md from base branch |
6f363aa to
bd77e1d
Compare
7696e84 to
ea2270f
Compare
bd77e1d to
c83e1e2
Compare
ea2270f to
199deb1
Compare
Attach the 5% fee to personal and organization Checkout top-ups and auto top-up invoices. Refund and dispute webhooks now observe fee assessments. Kilo Pass charging is still unwired.
199deb1 to
878935f
Compare
c83e1e2 to
484f4d4
Compare
|
Hey, quick question: are bug bounty credits exempt from the 5% fee? |
|
Bug bounty credits do not incur the 5% service fee. They are internal/free credit grants, not a fee-bearing Stripe purchase, so there is no service-fee assessment to exempt. The fee applies only when a customer buys eligible paid principal through the listed Stripe top-up or Kilo Pass flows. |
|
Superseded by #5383, which consolidates the complete service-fee implementation into one PR against main. |
Summary
Activates the 5% service fee for personal and organization credit top-ups, including subsequent automatic top-up invoices.
Why this change is needed
Top-ups span hosted Checkout and Kilo-owned draft invoices. Both paths must produce the same fee decision without double-attaching a fee, while credits remain equal to purchased principal and fee failures must not block the top-up.
How this is addressed
Stack: #5236 → #5262 → #5263 → #5264 (this PR) → #5265 → #5266.
Human Verification
No new product or browser verification was performed while publishing this PR. The completed local validation run covered personal and organization Checkout top-ups, auto-top-up setup, and subsequent off-session invoices; its release-environment gates remain separate.
Reviewer Notes
Human Reviewer Flags
auto_advance=false, so the principal and fee are added synchronously beforeinvoices.pay().invoice.createdhandler explicitly skips those invoices to prevent duplicate fee lines.Code Reviewer Agent
Code Reviewer Notes