fix(billing): detect a subscription mollie cancelled or suspended #157
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!157
Läser in…
Hänvisa till i nytt ärende
Ingen beskrivning angiven.
Ta bort grenen "fix/142-detect-mollie-cancelled-sub"
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
Mollie sends no webhook when a subscription changes status. Revoking a mandate cancels its subscriptions without creating a payment, and a subscription can become
suspended. Locally the subscription stayedactive,nextChargekept promising a charge, and access ended silently after period end plus grace.PaymentProvider.getSubscription(providerSubRef)returnsstatusandnextPaymentDate. Implemented in the Mollie adapter, the disabled provider and the test fake.canceledorsuspendedmarks the subscriptionpast_due.nextChargeis then null andgraceEndsAtis set. The normal grace and end path follows.cancelAtPeriodEndandperiodEnd, so a renewal or cancellation that lands after the read wins.No version bump: the release bump comes with the batch.
API
For
past_due,subscriptionStatusreturnsstatus: "past_due",nextCharge: null,paidUntilandcurrentPeriodEndset to the period end, andgraceEndsAt= period end + 8 days (null ifcancelAtPeriodEnd). No shape change. A provider-stopped subscription can bepast_duebefore its period end, with no failed charge. ThegraceEndsAtcontract comment says so.Tests
past_duewith no next charge, then end after the grace.past_due.getSubscriptionreads under the customer and maps status and next payment date.Closes #142
fbd2cd33fcbe4e3fff10