Account self-service: license labels, password change, billing/receipts #4
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Dashboard quality-of-life for customers.
License labels — customers holding several licenses (e.g. an MSP licensing multiple end-customers) can name each one.
PATCH /v1/licenses/{id}{label}(owner-gated: license must belong to the caller's account/org); label shown in the dashboard list. Stored on the record, not in the signed payload (no re-signing).Password change —
POST /v1/account/password{current, new}: verify current (same PBKDF2 path as login), ≥10 chars, re-hash, persist; revoke other sessions. Dashboard gets a small "Account" section.Billing / receipts — list past payments with receipt links. Server-side proxy (needs
PADDLE_API_KEYenv — server-side secret, never in the page):GET /v1/billingreturns the account's transactions (date, amount, seats, cycle) with Paddle invoice/receipt URLs fetched via the Paddle API. Records already storepaddleTxnper license; renewals (refresh issue) should append txn history per record.Site half: dashboard sections for all three in
account.html.Decision needed at greenlight (Nikola): Paddle API key (sandbox now, live later) as a server env secret on the VPS.
Acceptance: label set + displayed; password change works and old password stops working; billing list shows sandbox transactions with working receipt links.
Partially shipped (PR #7 + site dashboard update):
PATCH /v1/licenses/{id}(owner-gated, 64-char cap, not-found/not-owned indistinguishable), label in theGET /v1/licensesview, inline edit UI on account.html.POST /v1/account/password(verifies current, min 10 chars, re-salts, revokes all other sessions), form on account.html.Remaining in this issue: billing/receipts view — blocked on
PADDLE_API_KEYbeing provisioned on the VPS (guide delivered at end of this run). Keeping open for that.Receipts shipped (PR #9) — issue complete.
GET /v1/receipts: org-scoped Paddle transaction history (date, amount, currency, status, invoice number), via thePADDLE_API_KEYnow on the VPS (PADDLE_API_URLselects sandbox; live = swap both at launch alongside the client token).GET /v1/receipts/{id}/invoice: authorized invoice-PDF URL proxy — a transaction is visible only if its Paddle customer id appears on one of the org's license records; foreign txns are indistinguishable from not-found.Together with the earlier half (labels, password change), everything in this issue is live. Tested against a fake Paddle server (listing, owned/foreign invoice authorization, unconfigured 503).
Also cleaned up in passing: the one-shot patch workflows had committed the 9 MB build binary to the repo root (
go build ./...+git add -A) — removed; future one-shot workflows should build to/tmp.