status: expose the renewal payment method and last four digits #102

Stängd
öppnade 2026-10-06 11:20:37 +00:00 av supernaut · 1 kommentar
Ägare

Goal

Show the customer which payment method their subscription renews on, so a removed or replaced card is noticed before a renewal fails.

Design

  • subscriptionStatus returns the stored payment method label and the last four digits when the provider gives them (card brand, Apple Pay, Google Pay).
  • Apple Pay charges a device token. Removing the card from the wallet invalidates the mandate, so the label should say which wallet the renewal uses.

Done when

  • The contract exposes the method label and last four digits, null when unknown.
  • Tests cover a card, a wallet payment and a payment without details.

Portal side: a bitborg-web issue to show it on the account page.

## Goal Show the customer which payment method their subscription renews on, so a removed or replaced card is noticed before a renewal fails. ## Design - `subscriptionStatus` returns the stored payment method label and the last four digits when the provider gives them (card brand, Apple Pay, Google Pay). - Apple Pay charges a device token. Removing the card from the wallet invalidates the mandate, so the label should say which wallet the renewal uses. ## Done when - The contract exposes the method label and last four digits, null when unknown. - Tests cover a card, a wallet payment and a payment without details. Portal side: a bitborg-web issue to show it on the account page.
supernaut lade till detta till projektet Bitborg Payment 2026-10-06 11:24:47 +00:00
Upphovsperson
Ägare

Done on main. The status contract carries nextCharge.method (card or applepay) and nextCharge.last4, plus card: {brand, last4}, which stays set while past_due (contract/src/index.ts). src/billing.ts fills both from the stored payment method, and src/provider/mollie.ts captures the brand, last four and Apple Pay wallet. Tests cover card, Apple Pay and missing details. Mollie reports Google Pay as a card payment, so it shows as the card brand by design.

Done on main. The status contract carries `nextCharge.method` (card or applepay) and `nextCharge.last4`, plus `card: {brand, last4}`, which stays set while past_due (`contract/src/index.ts`). `src/billing.ts` fills both from the stored payment method, and `src/provider/mollie.ts` captures the brand, last four and Apple Pay wallet. Tests cover card, Apple Pay and missing details. Mollie reports Google Pay as a card payment, so it shows as the card brand by design.
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#102
Ingen beskrivning angiven.