Repository navigation
feat(billing): Pro checkout on CoinPay with every coin + PayPal, translation in Pro, renewal reminders - #156
Merged
Merged
Conversation
…slation in Pro, renewal reminders
- Checkout: CoinPay hosted checkout sessions when CoinPay offers them
(feature-detected; 404/405 remembered 10 min), else a picker on
/upgrade/<plan> with every coin CoinPay reports active for the business
plus PayPal via CoinPay's PayPal rail. The Stripe card path is gone.
- Every payment carries metadata {property: 'pairux.com', account_id,
user_id, email, customer_email, type, plan}.
- Webhook: reads crypto, PayPal and session events (checkout_session_id),
grants through a new atomic plan_credit_payment RPC (confirmed + forwarded
can no longer double-grant), returns 500 on a failed grant so CoinPay
retries, and rebuilds a lost pending row from pairux metadata.
- Live meeting translation is part of Pro and Team ($12/mo): Pro/Team hosts
run it unmetered; the panel offers Upgrade to Pro instead of Day/Month
passes (legacy pass credit is still honoured).
- In-call upgrade prompt opens /upgrade/<plan> in a new tab so the call
keeps running; pricing buttons link to it too.
- Renewal reminders: 3 days, 1 day and just after a term ends, on the
existing per-minute reminders tick, ledgered in plan_renewal_reminders.
- Pricing: translation listed on Pro/Team, payment methods line; 19 locales.
Migration 20261021120000 applied to prod pairux-com-supabase-db by hand.
Pre-commit hook bypassed (OOM); ran web lint/typecheck/vitest (110 files,
1154 tests) and desktop typecheck instead.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
ThreatCrush Security Scan48 finding(s) HIGH/CRITICAL: 4 | MEDIUM: 28 | LOW: 16
Snippets are redacted; ThreatCrush never prints matched credential material. |
…d hide any coin refused at create for an hour Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
pairux has 260 signups in the last 7 days and has never taken a payment (plan_payments was empty). This PR makes the paid path work end to end and gives people a reason to pay.
Checkout
POST /api/checkout/sessions) are used when CoinPay offers them. This is feature-detected: a 404/405 is remembered for 10 minutes. Until then,/upgrade/<plan>shows a picker with every coin CoinPay reports active for the business (16 today, including BTC, ETH, SOL, DOGE, XRP, ADA, BNB, BCH and USDC/USDT on several chains) plus PayPal through CoinPay's PayPal rail.payment_method: both) is removed.{property: 'pairux.com', account_id, user_id, email, customer_email, type, plan}.Webhook
checkout_session_id).plan_credit_paymentRPC, so a confirmed and a forwarded event can no longer both extend the plan. Paying for a smaller plan while a bigger one is still running adds time and keeps the bigger plan.Translation is now part of Pro ($12/mo, from PLAN_PRICE_USD)
/api/billing/translation-checkoutnow answers with the Pro checkout URL, so older desktop builds still work.Upgrade prompt: the in-call cap prompt opens /upgrade/ in a new tab so the call keeps running. The pricing buttons link there too.
Renewal reminders: emails go out 3 days before a term ends, 1 day before, and just after it ends, each with a one-click renew link. They run on the existing per-minute
/api/reminders/runtick, and theplan_renewal_reminderstable makes sure each email is sent at most once.Pricing: Pro and Team now list translation, and a new line names the payment methods. All 19 locales are updated.
Ops (already done)
20261021120000_plan_credit_and_renewal_remindersis applied to the prodpairux-com-supabase-db(backup in ~/backups/pairux).Tests: web vitest 110 files / 1154 tests, web lint and typecheck, and desktop typecheck all pass. The pre-commit hook was bypassed (it OOMs).
🤖 Generated with Claude Code