⚡ (billing) Automatic usage-based billing (#924)
BREAKING CHANGE: Stripe environment variables simplified. Check out the new configs to adapt your existing system. Closes #906 <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ### Summary by CodeRabbit **New Features:** - Introduced a usage-based billing system, providing more flexibility and options for users. - Integrated with Stripe for a smoother and more secure payment process. - Enhanced the user interface with improvements to the billing, workspace, and pricing pages for a more intuitive experience. **Improvements:** - Simplified the billing logic, removing additional chats and yearly billing for a more streamlined user experience. - Updated email notifications to keep users informed about their usage and limits. - Improved pricing and currency formatting for better clarity and understanding. **Testing:** - Updated tests and specifications to ensure the reliability of new features and improvements. **Note:** These changes aim to provide a more flexible and user-friendly billing system, with clearer pricing and improved notifications. Users should find the new system more intuitive and easier to navigate. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
This commit is contained in:
30
.github/workflows/check-and-report-chats-usage.yml
vendored
Normal file
30
.github/workflows/check-and-report-chats-usage.yml
vendored
Normal file
@ -0,0 +1,30 @@
|
||||
name: Check and report chats usage
|
||||
|
||||
on:
|
||||
schedule:
|
||||
- cron: '0 * * * *'
|
||||
|
||||
jobs:
|
||||
send:
|
||||
runs-on: ubuntu-latest
|
||||
defaults:
|
||||
run:
|
||||
working-directory: ./packages/scripts
|
||||
env:
|
||||
DATABASE_URL: '${{ secrets.DATABASE_URL }}'
|
||||
ENCRYPTION_SECRET: '${{ secrets.ENCRYPTION_SECRET }}'
|
||||
NEXTAUTH_URL: 'http://localhost:3000'
|
||||
NEXT_PUBLIC_VIEWER_URL: 'http://localhost:3001'
|
||||
TELEMETRY_WEBHOOK_URL: '${{ secrets.TELEMETRY_WEBHOOK_URL }}'
|
||||
TELEMETRY_WEBHOOK_BEARER_TOKEN: '${{ secrets.TELEMETRY_WEBHOOK_BEARER_TOKEN }}'
|
||||
SMTP_USERNAME: '${{ secrets.SMTP_USERNAME }}'
|
||||
SMTP_PASSWORD: '${{ secrets.SMTP_PASSWORD }}'
|
||||
SMTP_HOST: '${{ secrets.SMTP_HOST }}'
|
||||
SMTP_PORT: '${{ secrets.SMTP_PORT }}'
|
||||
NEXT_PUBLIC_SMTP_FROM: '${{ secrets.NEXT_PUBLIC_SMTP_FROM }}'
|
||||
STRIPE_SECRET_KEY: '${{ secrets.STRIPE_SECRET_KEY }}'
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: pnpm/action-setup@v2.2.2
|
||||
- run: pnpm i --frozen-lockfile
|
||||
- run: pnpm turbo run checkAndReportChatsUsage
|
Reference in New Issue
Block a user