read.markets/app
Giorgio Gilestro 83995e96c8 stripe: detect buyer currency at checkout (GBP/USD/EUR)
Pass `currency` to Stripe checkout for first-time buyers so Stripe
picks the matching `currency_options` rate configured on the Price
in the Dashboard (multi-currency Prices: one Price, per-currency
unit_amount). Operator configures the rates on existing Prices
prod_UaZ0xCpCboUGCN/price_*; this commit is the application-side
signal.

Currency precedence: explicit request body > Cloudflare cf-ipcountry
header > Accept-Language locale > GBP fallback. Only honoured when
the user has no stripe_customer_id yet — Stripe locks currency to
the customer record at first checkout, so existing customers keep
their original currency (they can switch via the portal).

Adds 4 tests: sniffed currency on new customer, body override beats
sniff, currency omitted for existing customer, and unit-tests for
the sniffing fallback chain.
2026-05-28 12:42:40 +02:00
..
jobs jobs: per-row savepoint + aggregate logging in translation fan-out 2026-05-28 12:37:06 +02:00
routers stripe: detect buyer currency at checkout (GBP/USD/EUR) 2026-05-28 12:42:40 +02:00
services llm: estimate cost from tokens when provider omits it 2026-05-28 12:36:55 +02:00
static css: split cassandra.css into per-section files 2026-05-28 12:31:29 +02:00
templates css: split cassandra.css into per-section files 2026-05-28 12:31:29 +02:00
__init__.py initial commit — cassandra v0.1 2026-05-15 21:56:10 +01:00
auth.py public: landing + pricing + legal pages, apex-ready, lawyer-reviewed 2026-05-24 00:08:02 +02:00
branding.py css: split cassandra.css into per-section files 2026-05-28 12:31:29 +02:00
cli.py docs: drop Phase D.x markers now that the referral loop is closed 2026-05-26 23:09:39 +02:00
config.py cleanup: drop stale tombstones and dead config fields 2026-05-27 19:25:33 +02:00
db.py sync: encrypted cloud backup for portfolios + settings UX rework 2026-05-23 16:15:54 +02:00
logging.py initial commit — cassandra v0.1 2026-05-15 21:56:10 +01:00
main.py routers: extract chat + ops from api.py 2026-05-27 21:43:17 +02:00
models.py models: align translation column naming + add token counts 2026-05-27 21:18:29 +02:00
redis_client.py phase G: data minimisation + passwordless auth + DeepSeek-first LLM 2026-05-18 14:16:57 +01:00
scheduler_main.py scheduler: register email_digest_job at 06:30 UTC 2026-05-25 23:20:06 +02:00
schemas.py news: auto-tag headlines + market-aware cadence + filter UI 2026-05-21 23:25:03 +01:00
templates_env.py beta: header chip flagged by BETA_MODE config (default on) 2026-05-25 22:42:19 +02:00