@extends('layouts.panel') @section('content')

WORKSPACE

Billing

Manage your plan, payments, and usage allowance.

@if($subscription)

Current subscription

{{ $subscription->state }} Paid period ends {{ $subscription->current_period_end }} UTC.

@csrf
@if($subscription->gateway==='stripe')
@csrf
@endif
@php($contract=\Illuminate\Support\Facades\DB::table('plan_versions')->find($subscription->plan_version_id))@php($terms=json_decode($contract->entitlements_json,true))
Account rate limit
{{ number_format($terms['rpm']) }} requests/minute
Per-key rate limit
{{ number_format($terms['key_rpm']??$terms['rpm']) }} requests/minute
Concurrent requests
{{ number_format($terms['concurrency']) }}
Monthly allowance
{{ number_format($terms['included_units']) }} units

Rate limits use a rolling 60-second window and include cache hits. All API keys share the account limit.

Optional overage allowance

Hard stop is the default. @if(!empty($terms['overage_enabled'])) Additional units cost {{ (new \App\Domain\Billing\Money($terms['overage_price_minor'],$contract->currency))->display() }} each and are invoiced separately for manual payment after the period closes. @else This plan does not permit overage. @endif

@csrf
@endif @if($subscription?->next_plan_version_id)@php($next=\Illuminate\Support\Facades\DB::table('plan_versions as v')->join('plans as p','p.id','=','v.plan_id')->where('v.id',$subscription->next_plan_version_id)->first(['p.display_name','v.version']))

Approved for renewal: {{ $next->display_name }} v{{ $next->version }}. @if($subscription->gateway==='stripe') Schedule this same plan at the next renewal in the payment portal. @endif

@endif
@forelse($plans as $plan)

{{ $plan->display_name }}

{{ (new \App\Domain\Billing\Money($plan->monthly_price_minor,$plan->currency))->display() }} / month

@php($e=json_decode($plan->entitlements_json,true))

{{ number_format($e['included_units']) }} units · {{ $e['rpm'] }} requests/minute · {{ $e['max_keys'] }} API keys

Complete HTTP 200 JSON source responses use one unit, including cache hits and provider lookup failures. Source retries use no extra customer units.

@csrf
@empty

Plans are not published yet

An administrator will publish pricing after configuring the merchant and payment gateway.

@endforelse

Invoices

@forelse($invoices as $i)@empty@endforelse
InvoiceIssuedTotalStatus
{{ $i->number }}{{ $i->created_at }}{{ (new \App\Domain\Billing\Money($i->total_minor,$i->currency))->display() }}{{ $i->state }}View invoice
No invoices yet.
{{ $invoices->links('pagination::simple-tailwind') }}
@endsection