Skip to content

feat(billing): use credit product title as overdraft invoice line item name#1753

Draft
rohilsurana wants to merge 1 commit into
mainfrom
feat/overdraft-invoice-item-title
Draft

feat(billing): use credit product title as overdraft invoice line item name#1753
rohilsurana wants to merge 1 commit into
mainfrom
feat/overdraft-invoice-item-title

Conversation

@rohilsurana

@rohilsurana rohilsurana commented Jul 13, 2026

Copy link
Copy Markdown
Member

What this changes

The monthly credit overdraft invoice shows a hardcoded line item text: "Credit Overdraft".

This PR changes it to use the title of the configured credit overdraft product. If the title is empty, it falls back to "Credit Overdraft" as before.

Why

The finance team wants a proper service description on the invoice line. The token purchase invoice already prints the product title (Stripe uses the product name as the line text). With this change, the overdraft invoice reads from the same field. Operators can then set the wording once, in the product config.

How it works

  • Init already loads the overdraft product for its price. It now also stores the product title.
  • GenerateForCredits uses that title as the invoice item name.
  • The item name becomes the Stripe line description in CreateInProvider.

Notes

  • No change if the product has no title: the line still says "Credit Overdraft".
  • Invoice reconciliation is not affected. It matches items by type, not by name.

Deploy order

A downstream consumer matches invoice line names against the literal string "Credit Overdraft", so it must be updated first:

  1. Merge and deploy pixxelhq/business-data-syncer#28. It makes the Planhat sales sync match overdraft items by type instead of name.
  2. Then merge and deploy this PR.
  3. Then update the token product title in configs.

@vercel

vercel Bot commented Jul 13, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
frontier Ready Ready Preview, Comment Jul 13, 2026 3:15pm

@coderabbitai

coderabbitai Bot commented Jul 13, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 830106f8-5ff6-49c7-82fd-b2c624dbdba0

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coveralls

Copy link
Copy Markdown

Coverage Report for CI Build 29261425709

Coverage increased (+0.005%) to 44.881%

Details

  • Coverage increased (+0.005%) from the base build.
  • Patch coverage: 4 uncovered changes across 1 file (5 of 9 lines covered, 55.56%).
  • No coverage regressions found.

Uncovered Changes

File Changed Covered %
billing/invoice/service.go 9 5 55.56%

Coverage Regressions

No coverage regressions found.


Coverage Stats

Coverage Status
Relevant Lines: 37651
Covered Lines: 16898
Line Coverage: 44.88%
Coverage Strength: 12.54 hits per line

💛 - Coveralls

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.

2 participants