@extends('dashboard.app')
@section('title', 'Billing')
@section('page_title', 'Billing')
@section('page_subtitle', 'Subscription status and plan details.')
@section('dashboard_content')
@php
$user = $user ?? auth()->user();
$subscription = $subscription ?? null;
$hasSub = $subscription !== null;
$orders = $orders ?? collect();
$payments = $payments ?? collect();
@endphp
Plan
{{ $hasSub ? ucfirst($subscription->plan ?? 'Personal') : 'Free' }}
{{ $hasSub ? ucfirst($subscription->status ?? 'active') : 'No subscription' }}
Renewal
{{ $subscription?->next_renewal_at?->toDateString() ?? '—' }}
Next charge date
Status
{{ $subscription?->expires_at?->toDateString() ?? 'Active' }}
Access ends
Billing summary
Subscription details
Current cycle
@if ($hasSub)
Provider: {{ $subscription->provider ?? 'direct' }} · Started {{ $subscription->started_at?->toDateString() }}
@else
You are on the free plan. Upgrade to unlock private keywords and sync.
@endif
Downgrading to Free revokes any active API keys immediately.
Payment method
Card
Coming soon
Invoices
0
Billing history
@if ($payments->count() > 0)
Recent payments
| Provider |
Plan |
Amount |
Status |
Created |
@foreach ($payments as $payment)
@php
$status = $payment->status ?? 'pending';
$pill = $status === 'paid'
? ['bg' => 'bg-emerald-100 dark:bg-emerald-500/20', 'text' => 'text-emerald-800 dark:text-emerald-200']
: ($status === 'failed'
? ['bg' => 'bg-rose-100 dark:bg-rose-500/20', 'text' => 'text-rose-800 dark:text-rose-200']
: ['bg' => 'bg-amber-100 dark:bg-amber-500/20', 'text' => 'text-amber-800 dark:text-amber-200']);
@endphp
| {{ $payment->provider ?? '—' }} |
{{ $payment->plan_code ?? '—' }} |
{{ $payment->currency ?? 'USD' }} {{ number_format((float) ($payment->amount ?? 0), 2) }} |
{{ $status }}
|
{{ $payment->created_at?->toDateString() ?? '—' }} |
@endforeach
@if ($payments->contains(fn ($payment) => in_array($payment->status, ['pending', 'failed'], true)))
Pending or failed payments need a new checkout. Start a fresh transaction from the pricing page.
Start new checkout
@endif
@endif
@if (!$hasSub || (string) $user?->tier !== 'personal')
Upgrade to Personal for private keywords and synced personalization.
Upgrade to Personal
@endif
@endsection