Files
supabase/packages/api-types
Kanishk Dudeja 9d2807e19b feat(billing): include prepaid credits in credit balance (#45177)
### Summary

This PR updates the logic to include `prepaid_credits_balance` while
showing the existing customer balance.

This changes the credit balance shown in:

- Billing Settings > Credit Balance
- Credit code redemption modal

The displayed amount now reflects the total credit balance across
prepaid credits and the customer balance.

### Testing

- Open an org billing page with prepaid credits and verify Credit
Balance includes both sources.
- Open the credit redemption modal and verify Current Balance matches
the combined credit amount.
- Verify an org with only customer balance still shows the same credit
amount as before.
- Verify an org with only prepaid credits balance and no customer
balance now shows credits correctly.
- Verify an org with no credits shows 0.00 and does not show /credits.
- Verify an org where net balance is debt still shows a negative amount
without the /credits suffix.

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

* **Improvements**
* Credit balance display now includes purchased and prorated credits for
a complete account view.
* Credit redemption and current-balance screens now show combined credit
totals (prepaid + existing) for clearer availability.
* UI descriptive text clarified to explain how credits are applied and
how charges occur once credits are exhausted.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2026-04-24 15:24:24 +05:30
..