@extends('layouts.panel') @section('title', 'Planos e assinaturas') @section('panel')

Planos e assinaturas

Gerencie o catálogo, vincule os checkouts e acompanhe os eventos da Kiwify.

Assinaturas ativas

{{ $active }}

Assinaturas em atraso

{{ $late }}

Receita aprovada no mês

R$ {{ number_format($revenue / 100, 2, ',', '.') }}

Em BRL, antes de taxas e sem pedidos estornados.

Catálogo de planos

{{ $secretReady ? 'Token do webhook configurado.' : 'Configure KIWIFY_WEBHOOK_TOKEN no servidor para receber eventos e liberar o checkout vinculado.' }} Endpoint {{ rtrim(config('app.url'), '/') }}/webhooks/kiwify

@if($errors->any()) @endif
@foreach($plans as $code => $plan)

@csrf @method('PATCH')
@if($code !== 'starter')
@endif
@foreach(\App\Enums\PlanResource::cases() as $resource)
@endforeach
@if($code !== 'starter')

O valor cobrado é o da oferta na Kiwify. Use um link diferente para cada plano ativo.

@if($plan['checkout_url'] && ! $plan['kiwify_plan_id'])

Checkout de teste. Preencha os dois IDs para vincular a oferta e liberar o plano após o pagamento.

@endif @endif
@endforeach

Eventos do webhook

@forelse($events as $event) @empty @endforelse
IDEvento e pedidoRecebido (UTC)ProcessamentoEntregas
{{ $event->id }} {{ $event->event_type ?? 'Evento sem tipo' }}@if($event->order_id)
{{ $event->order_id }}@endif
{{ $event->received_at }} {{ ['pending' => 'Pendente', 'retry' => 'Aguardando nova tentativa', 'processed' => 'Processado', 'ignored' => 'Ignorado', 'unmatched' => 'Sem vínculo', 'review' => 'Em revisão', 'failed' => 'Falhou'][$event->status] ?? $event->status }} @if($event->result)
{{ $event->result }}@endif
{{ $event->deliveries }}
Nenhum evento recebido.
{{ $events->links('pagination::bootstrap-5') }}
@endsection