feat(checkout): one-time annual payment with Swish, no auto-renewal #99
Inga granskare
Etiketter
Inga etiketter
area/backups
area/ci
area/control-panel
area/identity
area/infra
area/observability
area/payments
area/security
area/storage
area/web
blocked
needs-info
needs-triage
priority
high
priority
low
priority
medium
ready-for-implementation
type
bug
type
chore
type
docs
type
epic
type
feature
type
task
wontfix
Ingen milstolpe
Inget projekt
Inga tilldelade
1 deltagare
Notiser
Förfallodatum
Inget förfallodatum satt.
Beroenden
Inga beroenden satta
Referens
bitborg/bitborg-payment!99
Läser in…
Hänvisa till i nytt ärende
Ingen beskrivning angiven.
Ta bort grenen "feat/95-one-time-swish"
Borttagning av en gren är permanent. Även om den borttagna grenen kan fortsätta existera en kort tid innan den faktiskt tas bort, kan det INTE ångras i de flesta fall. Vill du fortsätta?
Two ways to buy the personal plan at the same price: auto-renew by card, or a one-time annual payment with Swish that does not renew.
startCheckouttakesrenewal: "auto" | "none", default"auto"."none"needsinterval: "annual"and sendsmethod: ["swish"]with no customer, no mandate and nosequenceType. New provider methodbeginOneOffCheckout.renewaland columnsubscription.renewal(defaultauto).charge_subscription_id_period_uniquebecomes a partial unique indexWHERE status <> 'failed', so a failed early renewal does not block its period. Migration0007."none"runs the same transaction (charge, period, tier grant, gapless invoice) withoutcreateSubscription, and setscancelAtPeriodEndso the sweep ends it at period end. The no-mandate refund from #82 runs only for"auto".periodEnd, and the invoice covers the new period from that date.already_subscribed); monthly with"none"(one_time_needs_annual); one early renewal at a time (payment_pending, also on a concurrent insert race).failed.subscriptionStatusaddsrenewalandpaidUntil. Contract 0.6.0, service 0.5.0.Known limit: a pending early renewal whose failure webhook is lost blocks further early renewals until the period ends (marked in code).
Tests: 335 passed with Postgres, including one-time activation without refund, an auto payment without a mandate still refunded, early renewal, lapse then repurchase, withdrawal amounts and the concurrent-checkout race.
To check on staging: buy with Swish, withdraw, buy again, renew early, let a period lapse. Confirm Mollie test mode takes
method: ["swish"]for SEK and how long an open Swish payment takes to expire.Closes #95.