- /customers/:id/wallets[/:code]: create (code given, or derived from the
name with a suffix when taken), list, show, update, terminate; wallet
alerts by code (create, list, show, update, destroy, destroy all) and
metadata through the code path. Wallet objects carry code and metadata.
- Metadata on plans, wallets and credit notes (migration 0049): create
replaces, update merges, destroy clears, destroy one key; string values,
at most 50 keys.
- DELETE /customers/:id/payment_methods/:id and PUT .../set_as_default,
checked against the customer.
- /wallet_transactions/:id (show, payment_url of a pending purchase,
consumptions of a top-up, fundings of a draw, FIFO over settled
transactions) and GET /wallets/:id/wallet_transactions.
- Plan lookups by code and the plan list ignore override plans (they share
their parent's code; used by subscription overrides next).
- Migration 0049 also adds the tables of the next parity steps (feature
removals, api_logs, security_logs, historical lifetime usage).
Tests: parity_wallets (4, live Postgres) and 3 unit.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>