iachat/enterprise/app
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
..
builders feat: outbound voice call essentials (#12782) 2025-11-24 17:47:00 -08:00
controllers perf: update the logic to purchase credits (#12998) 2025-12-08 10:52:17 +05:30
dispatchers/enterprise feat(ee): Add Captain features (#10665) 2025-01-14 16:15:47 -08:00
drops feat: Add push/email notification support for SLA (#9140) 2024-03-29 20:27:21 +11:00
fields chore: improve plan-based feature handling with plan hierarchy (#11335) 2025-04-28 14:13:56 -07:00
finders/enterprise feat: Conversation API to return applied_sla and sla_events (#9174) 2024-04-01 23:30:07 +05:30
helpers feat: Migrate ruby llm captain (#12981) 2025-12-04 18:26:10 +05:30
jobs feat: Instrument captain (#12949) 2025-11-28 15:12:55 +05:30
listeners feat: Add support for realtime-events in copilot-threads and copilot-messages (#11557) 2025-05-22 22:25:05 -07:00
mailers/enterprise/agent_notifications chore: fix sla email notifications (#9192) 2024-04-04 21:16:49 +05:30
models feat: outbound voice call essentials (#12782) 2025-11-24 17:47:00 -08:00
policies feat: Backend - Companies API endpoint with pagination and search (#12840) 2025-11-18 14:28:56 +05:30
presenters/enterprise/conversations feat: UI to show the SLA threshold in chat screen (#9146) 2024-04-04 15:46:46 +05:30
services perf: update the logic to purchase credits (#12998) 2025-12-08 10:52:17 +05:30
views feat: Backend - Companies API endpoint with pagination and search (#12840) 2025-11-18 14:28:56 +05:30