Tracking issue for the remediation work that came out of an adversarial review of the Stripe payment integration (single entry point: PaymentClient.scala, raw WSClient, no Stripe SDK).
Verdict
The third-party payment feature is an unfinished MVP:
- Does it work today? The flat-subscription path (
costPerMonth only) probably works; the metered / pay-per-request path is broken on recent Stripe accounts; several functions are stubs.
- Is it up to date? No — it uses the legacy usage-based billing APIs Stripe removed in
2025-03-31.basil, and no Stripe-Version is pinned.
- What's missing? Webhooks (reliable confirmation), idempotency, failure/cancellation handling, Stripe-side cleanup, and any test coverage.
- Security: the Stripe secret key leaks into the SPA payload served to the browser.
Sub-issues (suggested order)
Related existing issues
Tracking issue for the remediation work that came out of an adversarial review of the Stripe payment integration (single entry point:
PaymentClient.scala, raw WSClient, no Stripe SDK).Verdict
The third-party payment feature is an unfinished MVP:
costPerMonthonly) probably works; the metered / pay-per-request path is broken on recent Stripe accounts; several functions are stubs.2025-03-31.basil, and noStripe-Versionis pinned.Sub-issues (suggested order)
toUiPayload)Stripe-VersionstopPayment+ fix billing portal legal URLsPaymentClient(idempotency, bugs, currencies, 429)api.stripe.com)Related existing issues
stopPaymentcleanup Stripe: implement stopPayment + fix billing portal legal URLs #1151 and the additive usage-sync double-count noted inQueueJob.scala:508).