Skip to content

fix(console): deduct partial refund amount from Zen balance#35428

Draft
opencode-agent[bot] wants to merge 1 commit into
devfrom
partial-refund-ledger
Draft

fix(console): deduct partial refund amount from Zen balance#35428
opencode-agent[bot] wants to merge 1 commit into
devfrom
partial-refund-ledger

Conversation

@opencode-agent

@opencode-agent opencode-agent Bot commented Jul 5, 2026

Copy link
Copy Markdown
Contributor

Summary

  • deduct the cumulative Stripe-refunded amount from Zen credits instead of always deducting the full top-up
  • atomically claim the payment refund transition so webhook retries cannot deduct credits twice
  • clamp the resulting Zen balance at zero

Dependency

  • Ledger prerequisite for the approval-gated OpenCode Agent tool in anomalyco/experiments#264.

Checks

  • bun run typecheck (packages/console/app)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant