checkout: fetch the mandate, check its status and store the card expiry #84
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#84
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
completeCheckoutnever fetches the mandate. Thepayment_methodrow is written withstatus: "valid"hard-coded (src/billing.ts:619) andexp: ""(src/provider/mollie.ts:77-99, the comment there notes the expiry lives on the mandate).So we neither confirm the mandate can be charged nor know when the card expires. The card-expiry warning and card replacement both need that date.
Mollie docs
statusvalid(cards) orpending(direct debit) (https://docs.mollie.com/docs/recurring-payments).YYYY-MM-DDand the last four digits (https://docs.mollie.com/reference/get-mandate).Fix
In
completeCheckout, callcustomerMandates.get(mandateId). Requirevalidorpending, otherwise fail the checkout the way the missing-mandate case does. Store the real mandate status andcardExpiryDate.Done when
invalidmandate fails the checkout; a valid card mandate stores its expiry.Found in the Mollie docs audit of 2026-10-05.