Skip to content

feat(pass): Profullstack Pass pays an owner's practices until it expires - #38

Merged
ralyodio merged 1 commit into
masterfrom
feat/coinpay-pass
Nov 7, 2026
Merged

ralyodio merged 1 commit into
masterfrom
feat/coinpay-pass

Conversation

@ralyodio

@ralyodio ralyodio commented Nov 7, 2026

Copy link
Copy Markdown
Contributor

Profullstack Pass on tleehealth.

  • auth.coinPayIdentityFromCode returns { subject, pass } (inline passFromUserinfo: active only with active === true and a future expires_at). coinPaySubjectFromCode still exists as a wrapper.
  • credits.applyPass: practices are what is paid for here, so an active pass sets org_billing.paid_through = max(stored, pass expiry) on every practice the user owns (active owner rows), plus an audit_log billing.coinpay_pass row. Idempotent, never shortens paid time.
  • Callback applies it after a CoinPay sign-in (account found by subject) or a successful link. Never by email. Failure never blocks sign-in.
  • Pricing section: one line linking https://coinpayportal.com/pass.
  • No migration.

Tests (test/credits.test.js, real Postgres): practice paid until the pass expires, repeat is a no-op, a shorter pass never shortens, inactive pass touches nothing; claim parsing. Full suite 145 pass.

Note: the tleehealth container on dev2 is stopped (Exited, restart=no); merge only, not started.

🤖 Generated with Claude Code

CoinPay userinfo carries `pass: { active, expires_at }`. The bespoke callback
now returns it with the subject (active only with a future expiry), and on a
CoinPay sign-in or link an active pass sets org_billing.paid_through =
max(stored, pass expiry) on every practice the user owns, with an audit_log
row. Idempotent (greatest), never shortens paid time, and a payment during
the pass extends from the later end. Bound to the CoinPay subject only.

Pricing section gets one line pointing at https://coinpayportal.com/pass.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@ralyodio
ralyodio merged commit a1f669f into master Nov 7, 2026
3 checks passed
@ralyodio
ralyodio deleted the feat/coinpay-pass branch November 7, 2026 16:21
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