Ana Sofia Marin Alexandre 7d30b7577d add fetch billing products from tables instead of env variables (#9601)
Solves https://github.com/twentyhq/private-issues/issues/237

**TLDR:**

- Fetches billing products and prices from the tables BilllingProducts
and BillingPrices instead of fetching the product from the environment
variables and the prices from the stripe API.
- Adds new feature flag for this feature
- Fixes calls used to fetch stripe products and prices for the command
Billing Sync Plans Data.


**In order to test:**

1. Have the environment variable IS_BILLING_ENABLED set to true and add
the other required environment variables for Billing to work
2. Do a database reset (to ensure that the new feature flag is properly
added and that the billing tables are created)
3. Run the command: `npx nx run twenty-server:command
billing:sync-plans-data` (if you don't do that the products and prices
will not be present in the database)
4. Run the server , the frontend, the worker, and the stripe listen
command (`stripe listen --forward-to
http://localhost:3000/billing/webhooks`)
5. Buy a subscription for the Acme workspace and play with the project

**Doing**

I think there is some room of progress for the function
formatProductPrices, I used a similar version that was done before, I'll
look into that.
2025-01-21 20:19:29 +01:00
2024-11-06 14:24:07 +01:00
2025-01-17 12:50:28 +01:00
2025-01-17 12:50:28 +01:00
2024-01-10 17:05:23 +01:00
2024-12-02 09:58:03 +01:00
2023-12-10 18:10:54 +01:00
2025-01-16 23:34:54 +01:00
2025-01-20 23:10:39 +01:00


Twenty logo

The #1 Open-Source CRM

🌐 Website · 📚 Documentation · Roadmap · Discord · Figma


Companies view


Demo

Go to demo.twenty.com and login with the following credentials:

email: tim@apple.dev
password: Applecar2025

See also:
🚀 Self-hosting
🖥️ Local Setup

Does the world need another CRM?

We built Twenty for three reasons:

CRMs are too expensive, and users are trapped. Companies use locked-in customer data to hike prices. It shouldn't be that way.

A fresh start is required to build a better experience. We can learn from past mistakes and craft a cohesive experience inspired by new UX patterns from tools like Notion, Airtable or Linear.

We believe in Open-source and community. Hundreds of developers are already building Twenty together. Once we have plugin capabilities, a whole ecosystem will grow around it.


What You Can Do With Twenty

We're currently developing Twenty's beta version.

Please feel free to flag any specific needs you have by creating an issue.

Below are a few features we have implemented to date:

Add, filter, sort, edit, and track customers:

Companies view

Create one or several opportunities for each company:

Companies view

Track deals effortlessly with the email integration:

Companies view

Tailor your data model to meet business needs:

Companies view

See rich notes displayed in a timeline:

Companies view

Create tasks on records

Companies view

Companies view

Connect your CRM to all your tools through our APIs and Webhooks.

Companies view


Stack

Join the Community

Description
No description provided
Readme AGPL-3.0 324 MiB
Languages
TypeScript 98.7%
MDX 1%