@extends('dev.layout') @php $showNav = true; @endphp @section('title', 'Yoco Webhooks') @section('content')
@if(session('success'))
{{ session('success') }}
@endif @if(session('error'))
{{ session('error') }}
@endif @if(session('warning'))
{{ session('warning') }}
@endif {{-- โ”€โ”€ Active API Key โ”€โ”€ --}}
Active Yoco Secret Key

{{ $activeKey }}

Set via Settings โ†’ yoco.secret_key. If this looks wrong, update it there and refresh.

{{-- โ”€โ”€ Signing Secret Status โ”€โ”€ --}}
Signing Secret
@if($storedSecret)

Configured  ยท  {{ $secretStatus }}

Webhook signature verification is active. All incoming Yoco events will be verified.

@else

Not configured

Signature verification is bypassed until a subscription is registered. Register below to receive and store the secret.

@endif
{{-- โ”€โ”€ Register / Rotate โ”€โ”€ --}}
Register Webhook Subscription

Subscribes to payment.created and payment.refunded events. The signing secret is returned only once and will be stored automatically.

@csrf
@if($storedSecret)

โš  Rotating the secret: If you force re-register, Yoco will issue a new secret which will overwrite the one currently stored. This will not affect in-flight webhooks already in transit.

@endif
{{-- โ”€โ”€ Current Subscriptions โ”€โ”€ --}}
Current Subscriptions (live from Yoco API)
@if($listError)
Could not fetch subscriptions: {{ $listError }}
@elseif(empty($subscriptions))

No subscriptions found on this account.

@else @foreach($subscriptions as $sub) @endforeach
ID Name Notification URL Event Types Enabled Created
{{ $sub['id'] ?? 'โ€”' }} {{ $sub['name'] ?? 'โ€”' }} {{ $sub['notification_url'] ?? 'โ€”' }} @foreach((array)($sub['event_types'] ?? []) as $et) {{ $et }} @endforeach @if($sub['enabled'] ?? false) yes @else no @endif {{ isset($sub['created_at']) ? \Carbon\Carbon::parse($sub['created_at'])->format('d M Y H:i') : 'โ€”' }}
@endif
@endsection