Skip to content

Saved payment methods management UI#17

Merged
v0l merged 2 commits into
mainfrom
feat/payment-methods-management
Jul 14, 2026
Merged

Saved payment methods management UI#17
v0l merged 2 commits into
mainfrom
feat/payment-methods-management

Conversation

@v0l

@v0l v0l commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

Companion to LNVPS/api#160.

Summary

Replaces the single NWC connection field on the account settings page with a payment-methods manager backed by the new /api/v1/payment-methods API. Users can now keep multiple methods (Lightning wallet via NWC and/or a saved Revolut card) and choose which is the default used for automatic renewals.

Changes

  • components/payment-methods.tsx (new): lists saved methods (card brand •••• last4 + expiry, or "Lightning Wallet (NWC)"), with set default, enable/disable, remove, and add NWC wallet. Flags expired cards.
  • account-settings.tsx: the "Automatic Renewal" NWC input is replaced by the new manager.
  • api.ts: adds SavedPaymentMethod + listPaymentMethods / addNwcPaymentMethod / updatePaymentMethod / deletePaymentMethod; removes nwc_connection_string from AccountDetail.
  • VM / subscription payment flows: the NWC "pay now" option now shows based on whether the user has a saved enabled NWC method (rather than the removed account field).

Notes

Revolut cards are still saved automatically during checkout (#16); this PR adds management of the resulting methods. Requires api#160 (the /api/v1/payment-methods endpoints + account field removal).

Typecheck (tsc --noEmit) and eslint pass.

v0l added 2 commits July 14, 2026 19:44
Replaces the single NWC connection field on the account settings page with a
payment-methods manager backed by the new /api/v1/payment-methods API:

- List saved methods (Lightning wallet / card with brand, last4, expiry)
- Set default, enable/disable, and remove methods
- Add a Nostr Wallet Connect wallet
- Flag expired cards

The NWC payment option in the VM/subscription payment flows now shows based on
whether the user has a saved NWC method (the account nwc_connection_string field
was removed from the API).

Companion to LNVPS/api#160.
Show and edit an optional label per saved method (rename inline, and set a
label when adding an NWC wallet) so users can distinguish multiple methods.

Refs LNVPS/api#85
@v0l

v0l commented Jul 14, 2026

Copy link
Copy Markdown
Contributor Author

Added UI to set/edit an optional name per saved method (inline rename + label when adding an NWC wallet). Backend: LNVPS/api#160. Refs LNVPS/api#85.

@v0l
v0l merged commit 59778c9 into main Jul 14, 2026
1 check passed
@v0l
v0l deleted the feat/payment-methods-management branch July 14, 2026 18:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant