Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(ProgressiveBilling): create an invoice for a threshold #2413

Merged
merged 1 commit into from
Aug 19, 2024

Conversation

vincent-pochet
Copy link
Collaborator

Context

AI companies want their users to pay before the end of a period if usage skyrockets. The problem being that self-serve companies can overuse their API without paying, triggering lots of costs on their side.

Description

This PR adds the services to create an invoice with a fee when a specific usage_threshold is reach by a subscription.

It creates:

  • A progressive_billing invoice
  • An invoice_subscription with the right period boundaries
  • A progressive_billing fee

It also handles:

  • PDF generation
  • Tax computation
  • Email delivery
  • Tracking on Segment
  • Payment
  • Sync with integrations

@vincent-pochet vincent-pochet force-pushed the feat-progressive-billing-invoice branch from aa0772c to a33b829 Compare August 13, 2024 14:27
@vincent-pochet vincent-pochet self-assigned this Aug 13, 2024
@vincent-pochet vincent-pochet force-pushed the feat-progressive-billing-invoice branch 2 times, most recently from 805a416 to b10a2d1 Compare August 16, 2024 10:04
@vincent-pochet vincent-pochet force-pushed the feat-progressive-billing-invoice branch 2 times, most recently from 7750599 to c016551 Compare August 16, 2024 15:29
@vincent-pochet vincent-pochet force-pushed the feat-progressive-billing-invoice branch 2 times, most recently from 35be736 to 592dc6d Compare August 19, 2024 08:15
@vincent-pochet vincent-pochet force-pushed the feat-progressive-billing-invoice branch from 592dc6d to d658690 Compare August 19, 2024 08:28
@vincent-pochet vincent-pochet merged commit e30357d into main Aug 19, 2024
6 checks passed
@vincent-pochet vincent-pochet deleted the feat-progressive-billing-invoice branch August 19, 2024 08:38
@vincent-pochet vincent-pochet restored the feat-progressive-billing-invoice branch August 19, 2024 08:38
@vincent-pochet vincent-pochet deleted the feat-progressive-billing-invoice branch October 4, 2024 07:05
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