Repository navigation
fix(website): show Pro's MXN charge, read from Dhanam's catalog - #736
Merged
Merged
Conversation
The pricing page shows Pro at USD $29, but Dhanam's checkout charges it in MXN with IVA (MX$499 a month, MX$4,789 a year in the catalog). The buyer never saw that amount before the checkout page. The pricing route now reads GET /v1/billing/catalog/janua on the server (the page CSP keeps connect-src to 'self'), revalidated every 300 s, and the Pro card states the MXN amount for the selected interval. A failed read logs an error and the card says the MXN amount is charged at checkout, with no stale figure. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
|
📚 Documentation checks found issues. Please review the maintenance script output. |
Contributor
|
|
Contributor
Security Scan SummaryDate: Sun Oct 18 17:36:11 UTC 2026 Scan Results
|
Contributor
🎭 Playwright E2E Test Results
|
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.
Summary
janua.dev/pricingshows the managed Pro plan at USD $29/month. The checkout that the Pro path reaches (dashboard billing → Dhanam federation → Stripe MX) charges it in MXN with 16% IVA. Dhanam's public catalog, the pricing authority, publishes that amount:So a buyer sees $29 and is charged MX$499 without the page ever naming it.
This PR:
apps/website/lib/dhanam-catalog.ts: readsGET /v1/billing/catalog/janua(base overridable withDHANAM_CATALOG_URL), takes the IVA-inclusivegrossPrices.MXNamount, or derives it with Dhanam's ceil rule when only the net is present. It never throws: a failed read logs[pricing] Dhanam catalog … unreachable|answered <status>and returns null;/pricingroute a server component that reads the price (revalidate = 300) and passes it toPricingSection. The page CSP keepsconnect-src 'self', so the browser does not call Dhanam;Charged MX$499/month in MXN, IVA incluido.(or the yearly amount on the annual toggle). If the catalog could not be read it saysCharged in MXN with IVA at checkout., never a typed number.USD figures, plan names, CTAs and the Business/Enterprise cards are unchanged.
Tests
apps/website/lib/dhanam-catalog.test.ts: gross fromgrossPrices, the ceil fallback from the net, missing tier/price → null, formatting, the fetch URL, and null (not a throw) on a 503 or a network error.apps/website/components/sections/pricing.test.tsx: three new cases (monthly, annual toggle, catalog unavailable).What merging deploys
docker-publish.ymlbuilds and signsjanua-websiteand writes its digest intok8s/overlays/staging/kustomization.yaml. It does not reach production. Note: since #718 the staging overlay is API-only andpromote-to-prod.ymloffers onlycomponent: api, so a website image has no promote path today; production keeps its current pin until one exists (this also applies to #715 and #716).🤖 Generated with Claude Code