chatwoot/app/javascript/dashboard
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
assets chore: Improve layout styles (#12025) 2025-07-30 13:49:27 -07:00
components fix: Reduce unnecessary label suggestion API calls (#12978) 2025-12-01 13:36:34 +05:30
components-next feat: Add support for shared post and story attachment types in Instagram messages (#12997) 2025-12-04 05:20:47 +05:30
composables feat: Add AI credit topup flow for Stripe (#12988) 2025-12-02 17:53:44 -08:00
constants chore: Enable flexible whatsapp onboarding (Manual + Embedded Signup) options (#12344) 2025-09-15 19:59:56 +05:30
helper chore(docs): Fix typos in some files (#12817) 2025-11-07 07:57:37 -08:00
i18n perf: update the logic to purchase credits (#12998) 2025-12-08 10:52:17 +05:30
mixins feat: allow configuring attachment upload limit (#12835) 2025-11-17 14:03:08 -08:00
modules chore: Adds URL-based search and tab selection (#12663) 2025-10-27 11:17:04 +05:30
routes perf: update the logic to purchase credits (#12998) 2025-12-08 10:52:17 +05:30
store feat: Add AI credit topup flow for Stripe (#12988) 2025-12-02 17:53:44 -08:00
stores feat: Add Pinia support and relocate store factory (#12854) 2025-11-28 16:31:59 +05:30
App.vue fix: Handle login when there are no accounts (#12816) 2025-11-07 10:14:59 +05:30
featureFlags.js feat: Companies page (#12842) 2025-11-18 15:29:15 +05:30