Payments: deploy the billing service #496
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-infra#496
Läser in…
Hänvisa till i nytt ärende
Ingen beskrivning angiven.
Ta bort grenen "%!s()"
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?
Problem
Paid checkout on production is dark until the billing service runs with a live Mollie key and
billing_payments_enabled: true.State
The service runs on production (v0.11.2) with
billing_enabled: trueandbilling_payments_enabled: false. Its Postgres database and role, the Quadlet unit, the Caddy webhook route, the backup and drill, and the Keycloakbitborg-billingclient (which grantstier_prothrough the reconciler, ADR 0017 and ADR 0040) are all in place. Complimentary grants work on production. A test-mode payment granted the paid tier end to end on staging (#579).Scope
isTestKeyin the service and the billing role assert. Update the README "Before live keys" list and the runbook (#693).billing_payments_enabled: true, apply--tags billing,web.billing_payments_enabled: false, apply--tags billing,web.Done when
A real payment grants the paid tier and a real withdrawal refunds it, both visible in the Mollie dashboard, with the alerts in #692 live.
Epic: bitborg/bitborg-docs#5
Status 2026-10-01: the role is merged (#507), pinned to the first published image
v0.2.1(#508) and applied. Production runs it disabled:billing_enabled: false. A second--checkgavechanged=0.No webhook secret: Mollie does not sign webhooks, so the service re-fetches each payment by id.
Left before this closes, in order (runbook "Billing service"):
bitborg-billingKanidm service account and a read-write API token.vault_payments_mollie_api_key_test,vault_billing_db_password,vault_billing_api_token,vault_kanidm_billing_token.billing_enabled: true, dry-run, apply. Verify, including thatentry_managed_byon an account grants member write ontier_pro.billing_payments_enabled: true, run a test payment, confirm the paid tier reaches Forgejo.One more step for the enable checklist, from #510: after
billing_enabled: trueis applied and thebitborg-billingcontainer logs to Loki, confirm theBillingReconcileManualReviewalert fires on one matching line. For example, log[reconcile] test is paid at the provider with no settled local charge; needs manual reviewfrom inside the container to stdout, then check Alertmanager. The rule needs themonitoringtag applied first.Retarget: Kanidm is being replaced by Keycloak before launch (bitborg/bitborg-docs#127). The billing service account becomes the Keycloak
bitborg-billingclient. Left: enable in prod at go-live, after the staging payment test run.State 2026-10-12: prod runs billing v0.11.1 with
billing_enabled: trueandbilling_payments_enabled: false(#678, #686, #690, #691). The admin client is the Keycloakbitborg-billingclient, not a Kanidm service account. Webhooks carry no secret: the handler re-fetches the payment. Live switch steps and blockers: the operator guide, and #693.Added prerequisite for the live switch: signed data processing agreements with the hosting provider and the mail provider are on file.
Blocked 2026-10-17. The live switch waits on the signed processor agreements, the accountant's VAT sign-off and the legal answer on the early-renewal withdrawal window (bitborg-payment#150). Move back to Todo with ready-for-implementation once those are in.
Status 2026-10-24: the VAT sign-off is done for Sweden. Launch sells to Sweden only, and the payment README "Before live keys" VAT item is ticked (bitborg/bitborg-payment#192). Prod runs billing v0.20.0 (#841).
Still blocking: the processor agreements, and counsel's answer on the withdrawal window (bitborg/bitborg-payment#150).
State on 2026-11-15. The issue body above is older than this.
v0.20.0withbilling_enabled: trueandbilling_payments_enabled: false.live_key since bitborg-payment#182. No new billing release is needed for the switch.ansible/roles/billing/tasks/main.yml(lines 17 and 18). Draft #741 lifts it. Its branch is stale and needs a refresh onmainbefore it can merge.The switch itself is then: live key into the vault,
billing_payments_enabled: true, apply with--tags billing,web, one real payment and one withdrawal refund.