Improve failed payment recovery flow (in-product payment update) - #25332
Closed
FelixMalfait wants to merge 1 commit into
Closed
Improve failed payment recovery flow (in-product payment update)#25332FelixMalfait wants to merge 1 commit into
FelixMalfait wants to merge 1 commit into
Conversation
|
🚀 Preview Environment Ready! Your preview environment is available at: https://computational-video-packed-requested.trycloudflare.com This environment will automatically shut down after 5 hours. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
past_dueandunpaidsubscription states after a successful payment method setup.Description
UpdatePaymentMethodModalcomponent and open it from failed-payment banners and billing-page update actions so users can add a card in-product using Stripe’sPaymentElementinstead of immediately redirecting to the billing portal. (packages/twenty-front/src/modules/settings/billing/components/UpdatePaymentMethodModal.tsx,.../InformationBannerFailPaymentInfo.tsx,.../SettingsBillingContent.tsx)shouldStartSubscriptionAfterPaymentMethodflag toAddPaymentMethodFormand wire it so an update flow does not accidentally trigger the “start subscription after payment method” redirect path. (packages/twenty-front/src/modules/settings/billing/components/AddPaymentMethodForm.tsx)onManageBillingcallback across billing components. (updatedSettingsBillingContent,SettingsBillingSubscriptionInfo,SettingsBillingCreditsSection, andSettingsBillingSubscriptionInfoCardHeaderActions)InformationBannerFailPaymentInfo.tsx)handleUnpaidInvoicesto retry collection for bothSubscriptionStatus.PastDueandSubscriptionStatus.Unpaidafter a successful setup intent. (packages/twenty-server/src/engine/core-modules/billing/services/billing-subscription.service.ts)Testing
npx tsgo -p tsconfig.json --noEmitinsidepackages/twenty-frontandpackages/twenty-server, which completed without blocking errors.npx nx lint:diff-with-main twenty-front,npx nx format:write --files=...andgit diff --check, all of which completed with no blocking failures reported.Codex Task