{{- /* SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Commercial */ -}} {{- /* SPDX-FileCopyrightText: 2025-2026 Christian Galo */ -}} {{/* operator_integration_stripe.html Stripe's provider page (/operator/integrations/stripe), the destination of its name on the Integrations table and the overview's Integrations card (design D24). Distinct from its settings page, which carries configuration only and is reached through the header's action. Built from the page-anatomy parts: the header, the Details list's Status badge, and the Delivery queue section (moved here from the settings page, unchanged in shape) all use the same statusBadge/ sectionHeader parts every operator page uses. */}} {{ template "pageHeader" .Header }} {{ template "sectionHeader" .DetailsHeader }}
Status
{{ template "statusBadge" .StatusBadge }}
Mode
{{ .ModeLabel }}
{{/* Environment check: where the read-back of the mapped Stripe ids stands under the key in force (stripe-environment-stamp D3). Only rendered when Stripe is configured, because there is no key to read anything back under otherwise. */}} {{ if .Configured }} {{ template "sectionHeader" .EnvironmentCheckHeader }} {{ template "operator_integration_stripe_environment.html" .EnvironmentCheck }} {{ end }} {{/* Delivery queue: moved from the settings page (integration-settings ADDED requirement "The Stripe provider page carries its status and the delivery-queue report"); only the dead-letter bucket ever carries alarm styling, pending and retrying are normal draining states. The three counts render through the readout part, the same value and the same size as the landing surface's tiles (overview-consistency D3), so the console has one readout. */}} {{ template "sectionHeader" .DeliveryQueueHeader }}

Tracks Stripe's queued outbound work only; other integrations dispatch directly and are not reflected here, so an empty or draining queue says nothing about their state.

{{ if .DeliveryQueue.Available }}
{{ template "readout" .DeliveryQueue.PendingReadout }}
{{ template "readout" .DeliveryQueue.RetryingReadout }}
{{ template "readout" .DeliveryQueue.DeadLetterReadout }}
{{ if .DeliveryQueue.NeedsAttention }}

Dead-lettered work has exhausted its retries and needs an operator.

{{ if .DeliveryQueueEntries }}
{{/* list-scale exempt: detail page, the Stripe integration's own delivery queue */}} {{ range .DeliveryQueueEntries }} {{ end }}
Operation Error Attempts Last attempt
{{ .OperationType }} {{ if .ErrorMessage }}{{ .ErrorMessage }}{{ else }}{{ end }} {{ .Attempts }} {{ .UpdatedAt }}
{{ end }} {{ else }}

Queued integration work is draining normally.

{{ end }} {{ else }}

Queue health is unavailable.

{{ end }} {{/* Inbound events: Stripe's webhook events that failed processing through every retry round (stripe-integration-infrastructure "Failed events are retried, then dead-lettered"). The mirror of the delivery queue above, same alarm rule: only dead-lettered events carry it. */}} {{ template "sectionHeader" .InboundEventsHeader }} {{ if .InboundEvents.Available }} {{ if .InboundEvents.NeedsAttention }}

{{ .InboundEvents.DeadLetter }} event{{ if ne .InboundEvents.DeadLetter 1 }}s{{ end }} could not be processed after retries and need{{ if eq .InboundEvents.DeadLetter 1 }}s{{ end }} an operator.

{{ end }} {{/* Events from the other Stripe environment: captured and not processed (stripe-environment-stamp D6). Not alarm styling, because no operator can move them; the line renders only when some arrived. */}} {{ with .InboundEvents.RefusedLine }}

{{ . }}

{{ end }} {{ if .InboundEventEntries }}
{{/* list-scale exempt: detail page, the Stripe integration's own dead-lettered and refused inbound events */}} {{/* The second column reads Detail, not Error: the table holds two kinds of row, and a refused row carries the reason it was kept rather than a message from something that failed. */}} {{ range .InboundEventEntries }} {{ end }}
Event Detail Attempts Last attempt
{{ .OperationType }} {{ if .ErrorMessage }}{{ .ErrorMessage }}{{ else }}{{ end }} {{ .Attempts }} {{ .UpdatedAt }}
{{ end }} {{ if .InboundEvents.Quiet }}

Inbound events are processing normally.

{{ end }} {{ else }}

Inbound event health is unavailable.

{{ end }}