@extends('layouts.app') @section('title', 'Billing') @section('content') @if (session('success'))
{{ session('success') }}
@endif @if (session('error'))
{{ session('error') }}
@endif

Subscription

Company: {{ $company->name }}
Company number: {{ $company->formattedCompanyNumber() }}
Status: {{ $company->status }}
Plan: {{ $company->subscriptionPlan?->name ?? $company->plan }} @if ($company->isPerpetual())
Access: Unlimited (granted by Super Admin) @elseif ($company->subscription_ends_at)
Access until: {{ $company->subscription_ends_at->format('M j, Y H:i') }} @elseif ($company->isActive() && $company->plan === 'paid')
Access until: No end date (offline activation) @endif

@if ($company->isPerpetual())

Your company has Perpetual access — no renewal needed.

@else

Monthly rate {{ $priceFormatted ?? ('$'.number_format($price, 2).' '.$currency) }}. Longer terms include Super Admin discounts.

@endif @if ($canManage && ! $company->isPerpetual())
@csrf @include('partials.subscription-plan-picker', [ 'tiers' => $tiers ?? [], 'plans' => $plans, 'selectedMonths' => $selectedMonths, 'selectedPlan' => $selectedPlan, 'style' => 'app', ]) @include('partials.payment-gateway-picker', [ 'paymentGateways' => $paymentGateways ?? [], 'selectedPaymentProvider' => $selectedPaymentProvider ?? '', 'style' => 'app', ])

Pay with a card to enable auto-renew. Auto-renew charges one month at the monthly price (no prepaid discount).

@endif

Auto-renew (Paystack card)

@if ($company->hasCardOnFile())

Card on file: {{ strtoupper($company->card_brand ?? 'CARD') }} ···· {{ $company->card_last4 }} @if ($company->card_exp) (exp {{ $company->card_exp }}) @endif

@else

No reusable card saved yet. Complete a card checkout to store authorization for auto-renew.

@endif @if ($canManage)
@csrf @method('PUT')
@endif @if ($company->renewal_failures > 0)

Recent auto-renew failures: {{ $company->renewal_failures }}. Update your card by paying again.

@endif

Plan usage

@php $plan = $company->effectivePlan(); $rows = [ 'Devices' => [$company->deviceCount(), $plan?->maxDevices()], 'Users' => [$company->userCount(), $plan?->maxUsers()], 'Keywords' => [$company->keywordCount(), $plan?->maxKeywords()], ]; @endphp @foreach ($rows as $label => [$used, $max])
{{ $label }} {{ $used }} / {{ $max === null ? '∞' : $max }}
@endforeach @php $__retention = $company->dataRetentionDays(); @endphp
Data retention {{ $__retention ? $__retention.' days' : 'Indefinite' }}
@if (! $company->isSubCompany()) @php $__subMax = $company->planMaxSubCompanies(); @endphp
Sub-companies {{ $company->subCompanyCount() }} / {{ $__subMax === null ? '∞' : $__subMax }}
@endif

Limits come from your plan ({{ $plan?->name ?? 'Standard' }}). Upgrade or contact support to raise a cap.

@endsection