subscriptions: replace the card on a live subscription #85

Stängd
öppnade 2026-10-05 12:32:41 +00:00 av supernaut · 0 kommentarer
Ägare

Problem

A customer cannot replace an expired or failing card on a live subscription. The README lists this as not built. Monthly plans make it urgent: a card that expires mid-subscription leads straight to past_due and revoke.

This is the open go-live decision "card replacement for past-due or expired cards before monthly plans launch".

Mollie docs

  • Update subscription accepts mandateId (https://docs.mollie.com/reference/update-subscription). "Canceled subscriptions cannot be updated."
  • No dedicated change-payment-method flow is documented. The usual path is a new sequenceType: first payment on the same customer, then updating the subscription's mandateId.

Fix

  1. A tRPC procedure that starts a first payment for a small verification amount on the existing Mollie customer, refunded after success.
  2. On success, customerSubscriptions.update({ mandateId }) and a new payment_method row.
  3. Portal: a "replace card" action on the account page. That part is a portal issue.

Keep the subscription description unique per customer once customers are reused (Mollie requires it with multiple active subscriptions).

Done when

  • Staging: replace the card on a past_due subscription; the next renewal charges the new mandate.

Depends on #84 (mandate fetch, expiry date). The portal "replace card" action needs its own bitborg-web issue when this is picked up. Found in the Mollie docs audit of 2026-10-05.

## Problem A customer cannot replace an expired or failing card on a live subscription. The README lists this as not built. Monthly plans make it urgent: a card that expires mid-subscription leads straight to `past_due` and revoke. This is the open go-live decision "card replacement for past-due or expired cards before monthly plans launch". ## Mollie docs - Update subscription accepts `mandateId` (https://docs.mollie.com/reference/update-subscription). "Canceled subscriptions cannot be updated." - No dedicated change-payment-method flow is documented. The usual path is a new `sequenceType: first` payment on the same customer, then updating the subscription's `mandateId`. ## Fix 1. A tRPC procedure that starts a `first` payment for a small verification amount on the existing Mollie customer, refunded after success. 2. On success, `customerSubscriptions.update({ mandateId })` and a new `payment_method` row. 3. Portal: a "replace card" action on the account page. That part is a portal issue. Keep the subscription description unique per customer once customers are reused (Mollie requires it with multiple active subscriptions). ## Done when - Staging: replace the card on a `past_due` subscription; the next renewal charges the new mandate. Depends on #84 (mandate fetch, expiry date). The portal "replace card" action needs its own bitborg-web issue when this is picked up. Found in the Mollie docs audit of 2026-10-05.
supernaut lade till detta till projektet Bitborg Payment 2026-10-05 12:34:44 +00:00
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#85
Ingen beskrivning angiven.