Skip to content

fix: Stripe invoice discounts and billing precision model routing#683

Merged
bokelley merged 1 commit into
mainfrom
bokelley/addie-billing-feedback
Jan 9, 2026
Merged

fix: Stripe invoice discounts and billing precision model routing#683
bokelley merged 1 commit into
mainfrom
bokelley/addie-billing-feedback

Conversation

@bokelley

@bokelley bokelley commented Jan 9, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Fix Stripe discount bug: Invoices now correctly apply discounts using the discounts array instead of the deprecated coupon parameter (which was silently ignored by Stripe SDK v20)
  • Add precision model routing: Billing/financial queries now use Claude Opus instead of Sonnet for higher accuracy on high-stakes operations
  • Invoice discount support: Admins can now apply discounts when sending invoices (previously only worked for payment links)
  • Improved product selection: Admin tools now use lookup_key instead of tier names for more reliable product matching

Test plan

  • TypeScript compiles without errors
  • All 187 unit tests pass
  • Manual test: Send invoice with discount via Addie and verify Stripe applies discount correctly

🤖 Generated with Claude Code

- Fix Stripe API: Use `discounts` array instead of deprecated `coupon` parameter
  for subscription discounts (the previous syntax was silently ignored)
- Add precision model routing: billing/financial queries now use Opus for accuracy
- Invoice discounts: admins can now apply discounts when sending invoices
- Admin tools: switch from tier names to lookup_key for product selection
- Add coupon_id support to send_invoice billing tool

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@bokelley bokelley merged commit 26a4e65 into main Jan 9, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant