{{-- One BMart subscription. The lifecycle bar here is the same component the generic subscription screen uses, posting to the same routes and calling the same SubscriptionManager. There is no second lifecycle — the only reason this screen exists rather than sending the administrator to the generic one is the two things below it, which the generic screen cannot show: the shop this subscription pays for, and the entitlement BMart is being handed for that shop right now. --}}
{{-- ── Header and the lifecycle bar ───────────────────────────── --}}

Subscription #{{ $subscription->id }}

{{ $subscription->tenant?->name ?? 'No account' }}

{{ $subscription->plan?->name ?? 'Plan removed' }} · {{ $subscription->currency }} {{ number_format((float) ($subscription->plan?->price ?? 0), 2) }} / {{ $subscription->plan?->billing_interval?->value ?? 'term' }}

{{ str_replace('_', ' ', $subscription->status instanceof \BackedEnum ? $subscription->status->value : (string) $subscription->status) }}
Trial ends
{{ $subscription->trial_ends_at?->format('M d, Y') ?? '—' }}
Period ends
{{ $subscription->current_period_ends_at?->format('M d, Y') ?? '—' }}
Grace until
{{ $subscription->grace_period_ends_at?->format('M d, Y') ?? '—' }}
{{-- ── The shop ───────────────────────────────────────────── --}}

BMart shop

The entitlement endpoint finds a shop's subscription by this link and nothing else, so an unlinked subscription is a merchant paying for a shop that is still being told it has none.

@csrf

Blank unlinks. A shop already carrying another live subscription is refused.

{{-- ── What BMart is being told ───────────────────────────── --}}

What BMart is told right now

Built by the same code that answers the API, so this cannot disagree with what the shop receives.

Status
{{ $entitlement['status'] }}
Plan code
{{ $entitlement['planCode'] }}
@php $features = $entitlement['features']; $limits = (array) $entitlement['limits']; $capped = array_filter($limits, fn ($value) => $value !== null); @endphp

Features ({{ count($features) }})

@forelse ($features as $feature) {{ $feature }} @empty None granted. @endforelse

Limits ({{ count($capped) }} capped)

@forelse ($capped as $key => $value) {{ $key }}: {{ $value }} @empty No ceilings — everything unlimited. @endforelse
@if ($subscription->product_account_id === null)

No shop is linked, so nothing is actually being told this. Link one above.

@endif

Editing what the plan grants: {{ $subscription->plan?->name }} entitlements →

{{-- ── Invoices ───────────────────────────────────────────────── --}}

Invoices

All invoices →
@forelse ($subscription->invoices as $invoice) @empty @endforelse
Invoice Status Total Due
{{ $invoice->invoice_number }} {{ $invoice->status instanceof \BackedEnum ? $invoice->status->value : $invoice->status }} {{ $invoice->currency }} {{ number_format((float) $invoice->total, 2) }} {{ $invoice->due_date?->format('M d, Y') ?? '—' }}

No invoices yet

Generate Invoice above raises one against this subscription.