chatwoot/spec
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
..
actions fix: Disable enqueueing Avatar jobs if the URL is invalid (#12035) 2025-07-24 12:56:39 +04:00
assets feat: Move email attachments from links to file attachments (#11304) 2025-04-15 23:43:12 -07:00
builders feat: speed up circleci and github actions (#12849) 2025-11-19 15:32:48 +05:30
channels fix: Move contact events to account stream rather than individual user stream (#11082) 2025-03-13 17:46:48 -07:00
config fix: Update Arcade embed aspect ratio (#12923) 2025-11-24 20:22:27 +05:30
configs chore: Enable the new Rubocop rules (#7122) 2023-05-19 14:37:10 +05:30
controllers fix: shopify and leadsquared specs in ci (#12926) 2025-11-21 17:01:03 +05:30
dispatchers Non blocking event dispatch (#652) 2020-03-29 19:18:30 +05:30
drops feat: Add the support for custom attributes in message variables (#8511) 2023-12-08 14:13:35 -08:00
enterprise perf: update the logic to purchase credits (#12998) 2025-12-08 10:52:17 +05:30
factories feat: Add support for shared post and story attachment types in Instagram messages (#12997) 2025-12-04 05:20:47 +05:30
finders feat: add SKIP_INCOMING_BCC_PROCESSING as internal config (#12484) 2025-09-22 17:52:56 +05:30
fixtures feat: Add BE changes for captain pdf support for faq generation (#12113) 2025-08-27 20:31:22 +05:30
helpers chore: Refactor UTM params to stay compliant with standards (#12312) 2025-08-29 11:46:52 -07:00
integration Fix url in emails, add frontendURL helper (#19) 2019-08-25 19:59:28 +05:30
jobs fix: stream attachment handling in workers (#12870) 2025-12-05 13:02:53 -08:00
lib fix: stream attachment handling in workers (#12870) 2025-12-05 13:02:53 -08:00
listeners feat: APIs to assign agents_bots as assignee in conversations (#12836) 2025-11-18 18:20:58 -08:00
mailboxes refactor: strategy pattern for mailbox conversation finding (#12766) 2025-11-10 20:47:18 +05:30
mailers feat: speed up circleci and github actions (#12849) 2025-11-19 15:32:48 +05:30
models fix: add presence validation for account name (#12636) 2025-11-25 20:11:15 +05:30
policies chore: Enforce custom role permissions on conversation access (#12583) 2025-10-22 20:23:37 -07:00
presenters feat: APIs to assign agents_bots as assignee in conversations (#12836) 2025-11-18 18:20:58 -08:00
requests/api/v1 feat: APIs to assign agents_bots as assignee in conversations (#12836) 2025-11-18 18:20:58 -08:00
services fix: shopify and leadsquared specs in ci (#12926) 2025-11-21 17:01:03 +05:30
support feat: Secure external credentials with database encryption (#12648) 2025-10-13 18:05:12 +05:30
coverage_helper.rb ci(circleci): switch coverage reporting to Qlty orb (#12337) 2025-08-31 00:39:34 +05:30
rails_helper.rb fix: resolve mutex conflicts in Instagram webhook specs (#12154) 2025-08-11 23:31:25 +05:30
spec_helper.rb ci(circleci): switch coverage reporting to Qlty orb (#12337) 2025-08-31 00:39:34 +05:30
test_helper.rb ci(circleci): switch coverage reporting to Qlty orb (#12337) 2025-08-31 00:39:34 +05:30