feat: http runtime with mollie checkout, webhook, withdrawal and gapless invoices #59
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!59
Läser in…
Hänvisa till i nytt ärende
Ingen beskrivning angiven.
Ta bort grenen "feat/runtime"
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?
What
The first runtime for the billing service, in test mode only.
/healthzand tRPC under/trpc(bearerPAYMENT_API_TOKEN, timing-safe compare).provider_event, applies each event once. Onlypaidgrants.tier_progrant and revoke through the Kanidm group API (ADR 0017).withdraw) with a proportional refund, measured against the first purchase. The deadline is 14 days, moved past Swedish weekends and public holidays (lag 1930:173).displayNameandemailonstartCheckout,withdraw,cancel,interval,startImmediatelyRequestedAt,withdrawalDeadline,refundStatus, anderror.data.reasonon every error.node dist/src/migrate.js.Refuses to start with a
live_Mollie key.PAYMENTS_ENABLEDgates every money-moving path.Review
An independent review found 16 issues, including a double charge from two paid checkouts, a renewal charged after cancel, a sweep revoking a just-renewed subscription, backdated withdrawals and missing public holidays. All are fixed with a test that fails without the fix, except credit notes for refunds, which wait on the accountant.
Verified
pnpm testwithTEST_DATABASE_URLagainst a throwaway Postgres 17: 244 passed.billing.tscoverage reads about 10 % there.drizzle-kit check, audit, gitleaks: clean./healthz200, unauthenticated tRPC 401, webhook 503 with payments disabled,live_key refused.Known gaps
subscriptiontable. No environment has run the service, so none should have rows. Confirm before the first deploy.Before this is live
bitborg-billing: member write ontier_proonly. No person reads: the portal passes display name and email instartCheckout.PUBLIC_URL,PAYMENT_API_TOKEN,/trpcoff the public edge, run the migrate entry before each new image.requestedAtbound.Refs #51, #52. Neither closes on merge: #51 needs an end-to-end test-mode payment from the portal, #52 needs the accountant's sign-off.