You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Aug 11, 2026. It is now read-only.
SaaS subscription billing needs payment collection, but provider calls and webhook handling must remain isolated behind adapters. Payment status must never be trusted from browser redirects, and provider outages must not hold or roll back source database transactions.
Objective
Implement a provider-neutral payment_gateway capability for hosted checkout/session requests, signed inbound webhooks, normalized payment events, refunds/cancellations where supported, retry/DLQ, provider health, and reconciliation.
General ledger, bank reconciliation, merchant settlement accounting, tax, payment allocation across tenant business invoices, or PCI card-data handling.
Collecting raw card credentials.
Treating browser return URL as payment confirmation.
Mandatory internet/provider dependency for LAN/offline/manual-payment mode.
Security and integrity requirements
Secrets come only from environment/secrets manager references and are never returned or logged.
Provider endpoints and callback URLs are allow-listed; SSRF/open-redirect protections apply.
Webhook replay, duplicate delivery, out-of-order events, signature failure, and oversized payload are handled fail-closed.
Provider call occurs outside DB transaction; local intent/outbox is committed first.
Payment status transitions are monotonic or explicitly compensating; invalid regressions are rejected/reconciled.
Parent epic: #868
Depends on: #869, #876
Context
SaaS subscription billing needs payment collection, but provider calls and webhook handling must remain isolated behind adapters. Payment status must never be trusted from browser redirects, and provider outages must not hold or roll back source database transactions.
Objective
Implement a provider-neutral
payment_gatewaycapability for hosted checkout/session requests, signed inbound webhooks, normalized payment events, refunds/cancellations where supported, retry/DLQ, provider health, and reconciliation.Scope
Out of scope
Security and integrity requirements
Acceptance criteria
Testing
Documentation
Dependencies
Feeds platform operator UI #878, security controls #879, operations/reporting #880, and pilot #881.