runtime: HTTP server, Mollie checkout and webhook, tier grant #51

Stängd
öppnade 2026-09-24 13:03:35 +00:00 av supernaut · 4 kommentarer
Ägare

Problem

src/main.ts is a stub. The domain core (pricing, VAT, refund idempotency, Mollie webhook semantics) is built and tested, but there is no HTTP server, the webhook route is not wired, and nothing writes the tier grant.

Scope (minimum checkout, per roadmap decision 2026-09-24)

  • HTTP server with health endpoint.
  • Create a Mollie hosted checkout for one product (annual shown first, monthly second).
  • Webhook route: verify, fetch the payment from Mollie, idempotent handling, grant tier_pro through Kanidm (ADR 0017).
  • Cancellation stops renewal at period end.
  • Test mode first. Live keys only after Mollie KYC.

Done when

A test-mode payment from the portal grants tier_pro end to end, a replayed webhook changes nothing, and a cancelled subscription does not renew.

Infra deploy: bitborg/bitborg-infra (billing service deploy issue). Epic: bitborg/bitborg-docs#5.

## Problem `src/main.ts` is a stub. The domain core (pricing, VAT, refund idempotency, Mollie webhook semantics) is built and tested, but there is no HTTP server, the webhook route is not wired, and nothing writes the tier grant. ## Scope (minimum checkout, per roadmap decision 2026-09-24) - HTTP server with health endpoint. - Create a Mollie hosted checkout for one product (annual shown first, monthly second). - Webhook route: verify, fetch the payment from Mollie, idempotent handling, grant `tier_pro` through Kanidm (ADR 0017). - Cancellation stops renewal at period end. - Test mode first. Live keys only after Mollie KYC. ## Done when A test-mode payment from the portal grants `tier_pro` end to end, a replayed webhook changes nothing, and a cancelled subscription does not renew. Infra deploy: bitborg/bitborg-infra (billing service deploy issue). Epic: bitborg/bitborg-docs#5.
supernaut lade till detta till projektet Bitborg Payment 2026-09-24 13:03:58 +00:00
Upphovsperson
Ägare

Infra deploy: bitborg/bitborg-infra#496.

Infra deploy: bitborg/bitborg-infra#496.
Upphovsperson
Ägare

Status 2026-10-01: runtime merged in #59 (review fixes included), image build fixed in #60, released as v0.2.1 (v0.2.0 is a dead tag). Deployed to production disabled via bitborg-infra#507 and #508.

Left before this closes: create the bitborg-billing Kanidm account, add the four vault values, enable, and run one test-mode payment from the portal end to end (runbook "Billing service"). Follow-ups: #61 (DB tests in CI), #62 (Mollie reconciliation), #63 (credit notes).

Status 2026-10-01: runtime merged in #59 (review fixes included), image build fixed in #60, released as `v0.2.1` (`v0.2.0` is a dead tag). Deployed to production disabled via bitborg-infra#507 and #508. Left before this closes: create the `bitborg-billing` Kanidm account, add the four vault values, enable, and run one test-mode payment from the portal end to end (runbook "Billing service"). Follow-ups: #61 (DB tests in CI), #62 (Mollie reconciliation), #63 (credit notes).
Upphovsperson
Ägare

Retarget: Kanidm is being replaced by Keycloak before launch (bitborg/bitborg-docs#127). The billing account becomes the Keycloak bitborg-billing client. Left: an end-to-end test payment in the staging test run.

Retarget: Kanidm is being replaced by Keycloak before launch (bitborg/bitborg-docs#127). The billing account becomes the Keycloak `bitborg-billing` client. Left: an end-to-end test payment in the staging test run.
Upphovsperson
Ägare

Done. The runtime shipped in #59 and is live in v0.11.2: HTTP server with health endpoint, Mollie hosted checkout, webhook with idempotent handling, and tier_pro granted through the Keycloak bitborg-billing client. A replayed webhook changing nothing is covered by a test in src/billing.test.ts. Staging evidence is in bitborg-infra#579 (2026-10-11, test mode): a card checkout on billing 0.10.1 ended with tier_pro and forgejo_users in Keycloak, a signed-in withdrawal revoked tier_pro and cancelled the Mollie subscription so it does not renew, and the chargeback and one-time year runs also passed. The open items there (forced failed renewal, an untouched monthly subscription) are tracked on that issue and in their own payment issues, not here. Closing.

Done. The runtime shipped in #59 and is live in v0.11.2: HTTP server with health endpoint, Mollie hosted checkout, webhook with idempotent handling, and `tier_pro` granted through the Keycloak `bitborg-billing` client. A replayed webhook changing nothing is covered by a test in `src/billing.test.ts`. Staging evidence is in bitborg-infra#579 (2026-10-11, test mode): a card checkout on billing 0.10.1 ended with `tier_pro` and `forgejo_users` in Keycloak, a signed-in withdrawal revoked `tier_pro` and cancelled the Mollie subscription so it does not renew, and the chargeback and one-time year runs also passed. The open items there (forced failed renewal, an untouched monthly subscription) are tracked on that issue and in their own payment issues, not here. Closing.
Logga in för att delta i denna konversation.
Ingen milstolpe
Inget projekt
Inga tilldelade
1 deltagare
Notiser
Förfallodatum
Förfallodatumet är ogiltigt eller utanför gränserna. Använd formatet "åååå-mm-dd".

Inget förfallodatum satt.

Beroenden

Inga beroenden satta

Referens
bitborg/bitborg-payment#51
Ingen beskrivning angiven.