staging: run the payment test checklist (Tracks B0, B1, B2) #579

Öppen
öppnade 2026-10-08 14:52:57 +00:00 av supernaut · 8 kommentarer
Ägare

Run "Test checklist" steps 1 to 12 in docs/runbook.md on staging. Tick each run.

Steps

  • Prerequisites deployed to staging: payment#98, #99, #100 and web#300, #301, #302. Cards enabled on the Mollie test profile.
    • All six PRs are merged. Cards were activated on 2026-10-11 and the B0 to B2 runs used the features.
  • Track B0: card checkout in test mode. Can start before Keycloak lands.
    • Ran 2026-10-11. Card checkout, Swish one-time, failed payment (payment#129) and tier_pro cleanup (payment#131) checked.
  • Track B1: refund, withdrawal, chargeback and reversal, time-shifted success and failure renewals.
    • PASS: refund (3), card withdrawal (4, rerun 2026-10-11 19:08 UTC), chargeback (5), renewal paid (6).
    • BLOCKED: reversal (test mode offers none). Failed renewal (7) is dropped: test mode cannot force it, covered by bitborg-payment unit tests.
  • Track B2: one-time annual purchase with Swish, partial refund, early renewal, reminders at 30, 7 and 1 day.
    • PASS: steps 11 and 12 (2026-10-11). Step 10 is covered by the Swish one-time year run in B0.
  • Record the untouched subscription and its renewal date. Keep staging up on that day, because a missed webhook is not replayed for failed renewals.
    • Recorded: untouched-test, sub_Q7CrcoDqkv, next charge 2026-11-13. Keep staging up on 2026-11-13, check on or after 2026-11-14, then tick step 8.
    • PASS (2026-11-15): the renewal was charged on 2026-11-13 and the staging billing rows match. Evidence in the comments.
  • Ask Mollie support: card retry count for failed renewals, and whether a reversal webhook exists in test mode.
  • File each failure on the owning repo's board.
    • Filed and closed, all in Done: payment#133 (refund outside a withdrawal), payment#163 (first period end one day early), web#364 (withdrawal notice does not scroll), infra#675 (runbook time-shift).

Closes web#259 and payment#51 when green. Evidence for infra#496. Full pass needs the Keycloak stack from bitborg/bitborg-docs#5.

Run "Test checklist" steps 1 to 12 in `docs/runbook.md` on staging. Tick each run. ## Steps - [x] Prerequisites deployed to staging: payment#98, #99, #100 and web#300, #301, #302. Cards enabled on the Mollie test profile. - All six PRs are merged. Cards were activated on 2026-10-11 and the B0 to B2 runs used the features. - [x] Track B0: card checkout in test mode. Can start before Keycloak lands. - Ran 2026-10-11. Card checkout, Swish one-time, failed payment (payment#129) and `tier_pro` cleanup (payment#131) checked. - [ ] Track B1: refund, withdrawal, chargeback and reversal, time-shifted success and failure renewals. - PASS: refund (3), card withdrawal (4, rerun 2026-10-11 19:08 UTC), chargeback (5), renewal paid (6). - BLOCKED: reversal (test mode offers none). Failed renewal (7) is dropped: test mode cannot force it, covered by bitborg-payment unit tests. - [x] Track B2: one-time annual purchase with Swish, partial refund, early renewal, reminders at 30, 7 and 1 day. - PASS: steps 11 and 12 (2026-10-11). Step 10 is covered by the Swish one-time year run in B0. - [x] Record the untouched subscription and its renewal date. Keep staging up on that day, because a missed webhook is not replayed for failed renewals. - Recorded: `untouched-test`, `sub_Q7CrcoDqkv`, next charge 2026-11-13. Keep staging up on 2026-11-13, check on or after 2026-11-14, then tick step 8. - PASS (2026-11-15): the renewal was charged on 2026-11-13 and the staging billing rows match. Evidence in the comments. - [ ] Ask Mollie support: card retry count for failed renewals, and whether a reversal webhook exists in test mode. - [x] File each failure on the owning repo's board. - Filed and closed, all in Done: payment#133 (refund outside a withdrawal), payment#163 (first period end one day early), web#364 (withdrawal notice does not scroll), infra#675 (runbook time-shift). Closes web#259 and payment#51 when green. Evidence for infra#496. Full pass needs the Keycloak stack from bitborg/bitborg-docs#5.
Upphovsperson
Ägare

Track B0 card checkout ran on staging on 2026-10-11, after Mollie activated cards. seed-trial: card, monthly, auto-renew, paid; subscription active, quota paid. first-signin-test: Swish one-time year paid, a renewal paid, and a failed payment that ended failed with no stuck pending (payment#129 fix). trial-pay-test: card paid on billing 0.10.1, Keycloak ended with tier_pro and forgejo_users only (payment#131). The return page updated without a reload and showed a spinner while waiting. Google Pay needs no code change: it runs inside creditcard. Not run yet: B1 and B2 (refund, chargeback, renewal charge).

Track B0 card checkout ran on staging on 2026-10-11, after Mollie activated cards. `seed-trial`: card, monthly, auto-renew, paid; subscription `active`, quota `paid`. `first-signin-test`: Swish one-time year paid, a renewal paid, and a failed payment that ended `failed` with no stuck `pending` (payment#129 fix). `trial-pay-test`: card paid on billing 0.10.1, Keycloak ended with `tier_pro` and `forgejo_users` only (payment#131). The return page updated without a reload and showed a spinner while waiting. Google Pay needs no code change: it runs inside `creditcard`. Not run yet: B1 and B2 (refund, chargeback, renewal charge).
Upphovsperson
Ägare

Track B1/B2 staging run, 2026-10-11 (test mode).

  • 3 refund: PASS. Webhook recorded (refund.refunded). No credit note, as documented. Gap: a dashboard refund leaves the period and tier_pro unchanged (filed separately).
  • 4 card withdrawal: BLOCKED. Needs a portal card checkout and a signed-in withdrawal (receipt mail).
  • 5 chargeback: PASS. Revoked, Mollie subscription cancelled, evidence stored. Reversal BLOCKED: test mode offers no reversal.
  • 6 renewal paid: PASS after a data fix. The runbook shift does not move charge.period, so the renewal hit charge_subscription_id_period_unique until fixed. It also sets startDate one day before the next charge billing reports. Runbook fix filed separately.
  • 7 renewal failed: BLOCKED. Test-mode recurring card payments are created paid, so a failure cannot be forced.
  • 8 untouched subscription: BLOCKED. Needs one new monthly card checkout; record its renewal date.
  • 11 Swish withdrawal: PASS. Partial refund 1499.85 SEK refunded and settled, revoked. Receipt mail not tested.
  • 12 one-time: PASS. Early renewal starts at period end. 30/7/1/0 day reminders sent once each. Sweep ended access at period end.

Open with Mollie: forcing a failed renewal in test mode, the live retry schedule, chargeback reversal in test mode.

Track B1/B2 staging run, 2026-10-11 (test mode). - 3 refund: PASS. Webhook recorded (`refund.refunded`). No credit note, as documented. Gap: a dashboard refund leaves the period and `tier_pro` unchanged (filed separately). - 4 card withdrawal: BLOCKED. Needs a portal card checkout and a signed-in withdrawal (receipt mail). - 5 chargeback: PASS. Revoked, Mollie subscription cancelled, evidence stored. Reversal BLOCKED: test mode offers no reversal. - 6 renewal paid: PASS after a data fix. The runbook shift does not move `charge.period`, so the renewal hit `charge_subscription_id_period_unique` until fixed. It also sets `startDate` one day before the next charge billing reports. Runbook fix filed separately. - 7 renewal failed: BLOCKED. Test-mode recurring card payments are created paid, so a failure cannot be forced. - 8 untouched subscription: BLOCKED. Needs one new monthly card checkout; record its renewal date. - 11 Swish withdrawal: PASS. Partial refund 1499.85 SEK refunded and settled, revoked. Receipt mail not tested. - 12 one-time: PASS. Early renewal starts at period end. 30/7/1/0 day reminders sent once each. Sweep ended access at period end. Open with Mollie: forcing a failed renewal in test mode, the live retry schedule, chargeback reversal in test mode.
Upphovsperson
Ägare

Step 4 rerun, 2026-10-11 19:08 to 19:09 UTC (test mode). New user, monthly card checkout from the account page, then withdrawal from the account page.

  • Paid: subscription active, tier_pro granted, first charge succeeded.
  • Withdrawal: PASS. Receipt mail received. tier_pro revoked. Mollie subscription cancelled at 19:09:05. Pro-rata refund 150.00 SEK (full charge, about one minute used) created, pending at Mollie.
  • The result notice did not scroll into view after the redirect (bitborg-web#364).

Also verified on this run: sign-up and sign-in through the Keycloak host-only address (#677); the session records the real client IP.

Step 4 rerun, 2026-10-11 19:08 to 19:09 UTC (test mode). New user, monthly card checkout from the account page, then withdrawal from the account page. - Paid: subscription `active`, `tier_pro` granted, first charge succeeded. - Withdrawal: PASS. Receipt mail received. `tier_pro` revoked. Mollie subscription cancelled at 19:09:05. Pro-rata refund 150.00 SEK (full charge, about one minute used) created, `pending` at Mollie. - The result notice did not scroll into view after the redirect (bitborg-web#364). Also verified on this run: sign-up and sign-in through the Keycloak host-only address (#677); the session records the real client IP.
Upphovsperson
Ägare

Step 8 started 2026-10-12. Account untouched-test, monthly card checkout, auto-renew, not time-shifted.

  • Mollie test subscription sub_Q7CrcoDqkv, created 2026-10-12 18:19 UTC, nextPaymentDate 2026-11-13.
  • The portal shows the next renewal as 12 November 2026. That is one day early: bitborg-payment#163.

Keep staging up on 2026-11-13. Check then that the renewal lands as paid and the period moves to end before 2026-12-13.

Step 8 started 2026-10-12. Account `untouched-test`, monthly card checkout, auto-renew, not time-shifted. - Mollie test subscription `sub_Q7CrcoDqkv`, created 2026-10-12 18:19 UTC, `nextPaymentDate` 2026-11-13. - The portal shows the next renewal as 12 November 2026. That is one day early: bitborg-payment#163. Keep staging up on 2026-11-13. Check then that the renewal lands as `paid` and the period moves to end before 2026-12-13.
Upphovsperson
Ägare

Runbook test step 7 (failed renewal) is dropped from this run. The failure path stays covered by unit tests in bitborg-payment.

Why test mode cannot run it:

  • A recurring card payment in test mode is paid within a second of creation (tr_WsqidBhgJZf5QuiBfC2YJ: created 17:35:22, paid 17:35:23 UTC on 2026-10-11). changePaymentState then only offers refund and chargeback.
  • The magic failure amounts only set failureReason after a manual "failed" in the test checkout, and testing supports EUR only (https://docs.mollie.com/reference/testing). A recurring payment has no checkout.
  • SEPA Direct Debit, which stays open long enough to change state, is EUR only. Our subscriptions are SEK.
Runbook test step 7 (failed renewal) is dropped from this run. The failure path stays covered by unit tests in bitborg-payment. Why test mode cannot run it: - A recurring card payment in test mode is `paid` within a second of creation (`tr_WsqidBhgJZf5QuiBfC2YJ`: created 17:35:22, paid 17:35:23 UTC on 2026-10-11). `changePaymentState` then only offers refund and chargeback. - The magic failure amounts only set `failureReason` after a manual "failed" in the test checkout, and testing supports EUR only (<https://docs.mollie.com/reference/testing>). A recurring payment has no checkout. - SEPA Direct Debit, which stays open long enough to change state, is EUR only. Our subscriptions are SEK.
Upphovsperson
Ägare

Parked until the renewal. Check on or after 2026-11-14:

  • Mollie test mode: subscription sub_Q7CrcoDqkv (customer cst_TuJeBej69v) has a second payment dated 2026-11-13, status paid, and a nextPaymentDate of 2026-12-13.
  • Staging billing: the subscription for untouched-test moved its period_end to 2026-12-12 23:59:59.999 Amsterdam time, with one new charge and invoice.
  • Staging stayed up on 2026-11-13 (missed webhooks for failed renewals are not replayed).

Then tick step 8.

Parked until the renewal. Check on or after 2026-11-14: - Mollie test mode: subscription `sub_Q7CrcoDqkv` (customer `cst_TuJeBej69v`) has a second payment dated 2026-11-13, status `paid`, and a `nextPaymentDate` of 2026-12-13. - Staging billing: the subscription for `untouched-test` moved its `period_end` to 2026-12-12 23:59:59.999 Amsterdam time, with one new charge and invoice. - Staging stayed up on 2026-11-13 (missed webhooks for failed renewals are not replayed). Then tick step 8.
Upphovsperson
Ägare

Step 8, checked 2026-11-15 (Mollie test mode, read only).

Mollie side: pass.

  • Subscription sub_Q7CrcoDqkv: active, nextPaymentDate 2026-12-13.
  • Renewal payment tr_bEAso8jfzTSNuwCfQmUZJ: recurring, SEK 150.00, paid, created 2026-11-13 00:15:48 UTC.

Staging side: not checked yet. Staging has no metrics or logs in monitoring, so the billing database has to be read on the host. Read-only queries:

SELECT id, status, provider_sub_ref, period_start, period_end
  FROM subscription
 WHERE provider_sub_ref = 'sub_Q7CrcoDqkv';
SELECT c.id, c.provider_ref, c.status, c.period, c.period_start, c.period_end, c.paid_at
  FROM charge c JOIN subscription s ON s.id = c.subscription_id
 WHERE s.provider_sub_ref = 'sub_Q7CrcoDqkv'
 ORDER BY c.period_start;
SELECT i.number, i.issued_at, c.provider_ref
  FROM invoice i
  JOIN charge c ON c.id = i.charge_id
  JOIN subscription s ON s.id = c.subscription_id
 WHERE s.provider_sub_ref = 'sub_Q7CrcoDqkv'
 ORDER BY i.issued_at;
SELECT type, created_at, processed_at
  FROM provider_event
 WHERE created_at >= '2026-11-13' AND created_at < '2026-11-14'
 ORDER BY created_at;

Expected: period_end at 2026-12-12 23:59:59.999 Europe/Amsterdam, one new charge with provider_ref tr_bEAso8jfzTSNuwCfQmUZJ and one new invoice from 2026-11-13, and a processed provider_event near 00:15 UTC. Step 8 gets ticked when those match.

Step 8, checked 2026-11-15 (Mollie test mode, read only). Mollie side: pass. - Subscription `sub_Q7CrcoDqkv`: `active`, `nextPaymentDate` 2026-12-13. - Renewal payment `tr_bEAso8jfzTSNuwCfQmUZJ`: `recurring`, SEK 150.00, `paid`, created 2026-11-13 00:15:48 UTC. Staging side: not checked yet. Staging has no metrics or logs in monitoring, so the billing database has to be read on the host. Read-only queries: ```sql SELECT id, status, provider_sub_ref, period_start, period_end FROM subscription WHERE provider_sub_ref = 'sub_Q7CrcoDqkv'; SELECT c.id, c.provider_ref, c.status, c.period, c.period_start, c.period_end, c.paid_at FROM charge c JOIN subscription s ON s.id = c.subscription_id WHERE s.provider_sub_ref = 'sub_Q7CrcoDqkv' ORDER BY c.period_start; SELECT i.number, i.issued_at, c.provider_ref FROM invoice i JOIN charge c ON c.id = i.charge_id JOIN subscription s ON s.id = c.subscription_id WHERE s.provider_sub_ref = 'sub_Q7CrcoDqkv' ORDER BY i.issued_at; SELECT type, created_at, processed_at FROM provider_event WHERE created_at >= '2026-11-13' AND created_at < '2026-11-14' ORDER BY created_at; ``` Expected: `period_end` at 2026-12-12 23:59:59.999 Europe/Amsterdam, one new `charge` with `provider_ref` `tr_bEAso8jfzTSNuwCfQmUZJ` and one new `invoice` from 2026-11-13, and a processed `provider_event` near 00:15 UTC. Step 8 gets ticked when those match.
Upphovsperson
Ägare

Step 8 passes. Staging billing database, read on 2026-11-15 (all times UTC):

  • subscription: active, reference ends in sub_Q7CrcoDqkv, period 2026-11-12 18:19:06 to 2026-12-12 22:59:59.999 (23:59:59.999 Europe/Amsterdam).
  • charge: a second row, period 2026-11, tr_bEAso8jfzTSNuwCfQmUZJ, succeeded, paid_at 2026-11-13 00:15:48. Its period starts where the first charge ends.
  • invoice: number 10, issued 2026-11-13 00:15:50, on that charge. Number 9 is the first charge.
  • provider_event: one payment.paid, created 2026-11-13 00:15:49.998, processed 00:15:50.51.

Mollie's schedule and our period end agree with no edit on our side. The webhook was processed within a second. Next charge on the Mollie side: 2026-12-13.

Still open here: track B1 (the failed renewal, blocked by test mode) and the question to Mollie support.

Step 8 passes. Staging billing database, read on 2026-11-15 (all times UTC): - `subscription`: `active`, reference ends in `sub_Q7CrcoDqkv`, period 2026-11-12 18:19:06 to 2026-12-12 22:59:59.999 (23:59:59.999 Europe/Amsterdam). - `charge`: a second row, period `2026-11`, `tr_bEAso8jfzTSNuwCfQmUZJ`, `succeeded`, `paid_at` 2026-11-13 00:15:48. Its period starts where the first charge ends. - `invoice`: number 10, issued 2026-11-13 00:15:50, on that charge. Number 9 is the first charge. - `provider_event`: one `payment.paid`, created 2026-11-13 00:15:49.998, processed 00:15:50.51. Mollie's schedule and our period end agree with no edit on our side. The webhook was processed within a second. Next charge on the Mollie side: 2026-12-13. Still open here: track B1 (the failed renewal, blocked by test mode) and the question to Mollie support.
Logga in för att delta i denna konversation.
Ingen milstolpe
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-infra#579
Ingen beskrivning angiven.