feat(subscribe): direct subscription, no trial on /subscribe

Trial now exists exclusively at signup (no-card generic trial). The
/subscribe page is reached only after the trial has been consumed (or to
upgrade plans), so it should never offer another trial — that would be a
double-trial loophole.

- BillingController::subscribe drops trialDays prop
- BillingController::checkout drops ->trialDays() call (direct charge)
- Subscribe.vue drops trialDays prop and :days placeholders
- i18n (en/pt-BR/es): new subscribe-focused copy, remove start_trial/trial_info
This commit is contained in:
Paulo Castellano 2026-05-14 20:05:39 -03:00
parent 0b60fba277
commit c29198caef
8 changed files with 12 additions and 18 deletions

View file

@ -30,7 +30,6 @@ public function subscribe(Request $request): Response|RedirectResponse
return Inertia::render('billing/Subscribe', [
'plans' => Plan::active()->orderBy('sort')->get(),
'trialDays' => config('cashier.trial_days'),
]);
}
@ -63,8 +62,7 @@ public function checkout(Request $request, Plan $plan): SymfonyResponse|Redirect
]);
$subscription = $account->newSubscription(Account::SUBSCRIPTION_NAME, $priceId)
->allowPromotionCodes()
->trialDays(config('cashier.trial_days'));
->allowPromotionCodes();
$checkoutSession = $subscription->checkout([
'success_url' => route('app.billing.processing').'?session_id={CHECKOUT_SESSION_ID}',

View file

@ -26,8 +26,7 @@
'page_title' => 'Choose your plan',
'eyebrow' => 'Pricing',
'title' => 'Choose the right plan for you',
'description' => 'Start with a 7-day free trial. No charge until your trial ends.',
'trial_info' => '7-day free trial, then billed automatically',
'description' => 'Pick the plan that fits you. Billed monthly or annually.',
'monthly' => 'Monthly',
'yearly' => 'Yearly',
'per_month' => 'monthly',
@ -38,7 +37,7 @@
'everything_in' => 'Everything in :plan, plus:',
'save_months' => '2 months free',
'popular' => 'Most popular',
'start_trial' => 'Start 7-day free trial',
'subscribe_cta' => 'Subscribe',
'prices' => [
'starter' => ['monthly' => '$19', 'yearly_per_month' => '$16', 'yearly' => '$190'],
'plus' => ['monthly' => '$29', 'yearly_per_month' => '$24', 'yearly' => '$290'],

View file

@ -26,8 +26,7 @@
'page_title' => 'Elige tu plan',
'eyebrow' => 'Precios',
'title' => 'Elige el plan ideal para ti',
'description' => 'Comienza con 7 días gratis. Sin cargo hasta que termine tu prueba.',
'trial_info' => 'Prueba gratuita de 7 días, luego se cobra automáticamente',
'description' => 'Elige el plan que te queda. Facturación mensual o anual.',
'monthly' => 'Mensual',
'yearly' => 'Anual',
'per_month' => 'mensual',
@ -38,7 +37,7 @@
'everything_in' => 'Todo lo de :plan, más:',
'save_months' => '2 meses gratis',
'popular' => 'Más popular',
'start_trial' => 'Comenzar prueba de 7 días',
'subscribe_cta' => 'Suscribirse',
'prices' => [
'starter' => ['monthly' => '$19', 'yearly_per_month' => '$16', 'yearly' => '$190'],
'plus' => ['monthly' => '$29', 'yearly_per_month' => '$24', 'yearly' => '$290'],

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -26,8 +26,7 @@
'page_title' => 'Escolha seu plano',
'eyebrow' => 'Preços',
'title' => 'Escolha o plano ideal pra você',
'description' => 'Comece com 7 dias grátis. Sem cobrança até o fim do seu teste.',
'trial_info' => '7 dias grátis, depois cobrança automática',
'description' => 'Escolha o plano que combina com você. Cobrança mensal ou anual.',
'monthly' => 'Mensal',
'yearly' => 'Anual',
'per_month' => 'mensal',
@ -38,7 +37,7 @@
'everything_in' => 'Tudo do :plan, mais:',
'save_months' => '2 meses grátis',
'popular' => 'Mais popular',
'start_trial' => 'Iniciar teste de 7 dias',
'subscribe_cta' => 'Assinar',
'prices' => [
'starter' => ['monthly' => 'R$ 95', 'yearly_per_month' => 'R$ 79', 'yearly' => 'R$ 950'],
'plus' => ['monthly' => 'R$ 145', 'yearly_per_month' => 'R$ 121', 'yearly' => 'R$ 1450'],

View file

@ -29,7 +29,6 @@ interface Highlight {
defineProps<{
plans: Plan[];
trialDays: number;
}>();
const isYearly = ref(true);
@ -120,7 +119,7 @@ const planTones: Record<PlanSlug, string> = {
{{ $t('billing.subscribe.title') }}
</h1>
<p class="mx-auto max-w-2xl text-balance text-base text-muted-foreground sm:text-lg">
{{ trans('billing.subscribe.description', { days: String(trialDays) }) }}
{{ $t('billing.subscribe.description') }}
</p>
</div>
</div>
@ -228,7 +227,7 @@ const planTones: Record<PlanSlug, string> = {
]"
@click="selectPlan(plan)"
>
{{ trans('billing.subscribe.start_trial', { days: String(trialDays) }) }}
{{ $t('billing.subscribe.subscribe_cta') }}
<IconArrowRight class="size-4" />
</button>