chatwoot/enterprise/app/controllers/enterprise
Tanmay Deep Sharma eb759255d8
perf: update the logic to purchase credits (#12998)
## Description

- Replaces Stripe Checkout session flow with direct card charging for AI
credit top-ups
- Adds a two-step confirmation modal (select package → confirm purchase)
for better UX
- Creates Stripe invoice directly and charges the customer's default
payment method immediately

## Type of change

- [ ] New feature (non-breaking change which adds functionality)

## How Has This Been Tested?

- Using the specs
- UI manual test cases

<img width="945" height="580" alt="image"
src="https://github.com/user-attachments/assets/52bdad46-cd0e-4927-b13f-54c6b6353bcc"
/>

<img width="945" height="580" alt="image"
src="https://github.com/user-attachments/assets/231bc7e9-41ac-440d-a93d-cba45a4d3e3e"
/>


## Checklist:

- [ ] My code follows the style guidelines of this project
- [ ] I have performed a self-review of my code
- [ ] I have commented on my code, particularly in hard-to-understand
areas
- [ ] I have made corresponding changes to the documentation
- [ ] My changes generate no new warnings
- [ ] I have added tests that prove my fix is effective or that my
feature works
- [ ] New and existing unit tests pass locally with my changes
- [ ] Any dependent changes have been merged and published in downstream
modules

---------

Co-authored-by: Shivam Mishra <scm.mymail@gmail.com>
2025-12-08 10:52:17 +05:30
..
api perf: update the logic to purchase credits (#12998) 2025-12-08 10:52:17 +05:30
concerns chore: improve plan-based feature handling with plan hierarchy (#11335) 2025-04-28 14:13:56 -07:00
devise_overrides feat: Add relay state for SAML SSO (#12597) 2025-10-07 20:32:29 +05:30
public/api/v1/portals fix: Avoid vector search if query is not present in the params (#9265) 2024-04-19 14:50:49 -07:00
super_admin feat: Add support for Langfuse LLM Tracing via OTEL (#12905) 2025-11-21 16:31:45 -08:00
webhooks fix: Added authentication to FireCrawl API, remove unused RobinAI references (#10737) 2025-01-22 18:14:25 -08:00
widgets_controller.rb feat(poc): Disable widget based on country (#6658) 2023-03-14 09:09:57 -07:00