# pricing.yaml — Canonical pricing source for all ChurchWiseAI products
# SECURITY: No secret keys (sk_live_, sk_test_, rk_live_). Only public price IDs and amounts.
#
# Sources reconciled (2026-03-24):
#   1. C:\dev\PRICING.md (all Stripe IDs, dollar amounts, billing rules)
#   2. C:\dev\churchwiseai-web\src\lib\pricing.ts (tier structure, features, priceKeys)
#   3. Stripe CLI — live-mode prices verified via `stripe prices retrieve --live`
#
# Priority when sources disagree: Stripe > PRICING.md > pricing.ts
#
# NOTE on live-mode product structure:
#   Live mode has SPLIT products for annual billing (e.g., "CWA Chat Starter" and
#   "CWA Chat Starter Annual" are separate Stripe products). Test mode consolidates
#   monthly + annual prices under ONE product per tier. This is a known quirk — see
#   PRICING.md "Stripe account" notes and C:\dev\INSTITUTIONAL_KNOWLEDGE.md.
#
# NOTE on test price ID sets:
#   Two test-mode price ID sets exist:
#   - F8WTm3d6SH prices (test ACCOUNT acct_1SSPzDF8WTm3d6SH) — used in .env.local
#   - FaoK5IPzNo test prices (test MODE on live account) — second mirror set
#   The env_vars mapping uses the F8WTm3d6SH set per PRICING.md.

products:
  # ═══════════════════════════════════════════════════════════════
  # ChurchWiseAI Chat — Monthly + Annual
  # ═══════════════════════════════════════════════════════════════

  starter_chat:
    name: "Starter Chat"
    description: "12 tools to get started"
    category: "churchwiseai"
    stripe:
      test:
        product_id: "prod_UBibBVrVFsXeor"
        monthly_price_id: "price_1TDLKaF8WTm3d6SHPhaI4pdV"
        annual_price_id: "price_1TDLKaF8WTm3d6SHPIbFmi0S"
      live:
        product_id: "prod_U7NyuMoaat5WfL"
        monthly_price_id: "price_1T99CsFaoK5IPzNormWHeao6"
        annual_product_id: "prod_U7NyuMoaat5WfL"  # consolidated 2026-04-14 onto canonical product (was prod_U7O1qreacakx8V — pending archival in Phase 2)
        annual_price_id: "price_1TM4lTFaoK5IPzNoQ5mn8sW7"  # consolidated 2026-04-14 (was price_1T99FcFaoK5IPzNoWnhh0HxF — pending archival in Phase 2)
    env_vars:
      monthly: "STRIPE_PRICE_STARTER_CHAT"
      annual: "STRIPE_PRICE_STARTER_CHAT_ANNUAL"
    pricing:
      monthly: 14.95
      annual: 149.50
    trial:
      enabled: true
      days: 14
    billing_notes: "Monthly + annual. Annual saves ~17% (10 months for 12). Live mode has separate product for annual variant."

  pro_chat:
    name: "Pro Chat"
    description: "Your full AI ministry team"
    category: "churchwiseai"
    stripe:
      test:
        product_id: "prod_UBibI4VamWSNWV"
        monthly_price_id: "price_1TDLKbF8WTm3d6SHSfhk7DJU"
        annual_price_id: "price_1TDLKcF8WTm3d6SHBwxhP53O"
      live:
        product_id: "prod_U7O2GWQXaxbtuR"
        monthly_price_id: "price_1T99GjFaoK5IPzNogFqCiQjS"
        annual_price_id: "price_1TDKuZFaoK5IPzNoS1u6ULoR"
    env_vars:
      monthly: "STRIPE_PRICE_PRO_CHAT"
      annual: "STRIPE_PRICE_PRO_CHAT_ANNUAL"
    pricing:
      monthly: 34.95
      annual: 349.50
    trial:
      enabled: true
      days: 14
    billing_notes: "Monthly + annual. Most popular tier. Live mode uses single product for both intervals."

  suite_chat:
    name: "Suite Chat"
    description: "Full platform + admin tools"
    category: "churchwiseai"
    stripe:
      test:
        product_id: "prod_UBibnwzSTGjkYX"
        monthly_price_id: "price_1TDLKdF8WTm3d6SHrd8VqCWW"
        annual_price_id: "price_1TDLKdF8WTm3d6SHNeFPSG7N"
      live:
        product_id: "prod_U7O4IU5jPOM0Qe"
        monthly_price_id: "price_1T99IDFaoK5IPzNoRmcX7Rnu"
        annual_price_id: "price_1TDKyNFaoK5IPzNoFqKjxIab"
    env_vars:
      monthly: "STRIPE_PRICE_SUITE_CHAT"
      annual: "STRIPE_PRICE_SUITE_CHAT_ANNUAL"
    pricing:
      monthly: 59.95
      annual: 599.50
    trial:
      enabled: true
      days: 14
    billing_notes: "Monthly + annual. White-label tier (remove ChurchWiseAI badge). Live mode uses single product for both intervals."

  # ═══════════════════════════════════════════════════════════════
  # ChurchWiseAI Voice — Monthly Only
  # ═══════════════════════════════════════════════════════════════

  starter_voice:
    name: "Voice Starter"
    description: "AI voice agent for your church phone"
    category: "churchwiseai"
    stripe:
      test:
        product_id: "prod_UBibR18vxaZXKI"
        monthly_price_id: "price_1TLDKaFaoK5IPzNods52nLYe"
        annual_price_id: "price_1TLDLBFaoK5IPzNoFDb5560J"
        legacy_monthly_price_id: "price_1TDLLFF8WTm3d6SH67ehhiq7"
      live:
        product_id: "prod_U7O5mQidEbtj2W"
        monthly_price_id: "price_1TLDXOFaoK5IPzNoJamtgXcb"  # 2026-05-19 fix: was price_1T99JLFaoK5IPzNodFvihZb3 ($39.95 pre-overhaul, archived in Stripe 2026-05-20). $49.95 verified live.
        annual_price_id: "price_1TM5BFFaoK5IPzNoOvtpJUPr"
    env_vars:
      monthly: "STRIPE_PRICE_STARTER_VOICE"
      annual: "STRIPE_PRICE_STARTER_VOICE_ANNUAL"
    pricing:
      monthly: 49.95
      annual: 549
    setup_fee: 49.95
    setup_fee_waived_on_annual: true
    trial:
      enabled: false
    billing_notes: "Monthly + annual. Annual saves ~8% ($549 vs $599.40). One-time $49.95 setup fee on monthly (waived for annual). Includes phone provisioning, SIP config, knowledge base setup."

  pro_voice:
    name: "Voice Pro"
    description: "Advanced AI voice agent with full tool access"
    category: "churchwiseai"
    stripe:
      test:
        product_id: "prod_UBibc2wpkiR6Px"
        monthly_price_id: "price_1TLDKkFaoK5IPzNoXwFx1bPE"
        annual_price_id: "price_1TLDLCFaoK5IPzNoMA1sKkko"
        legacy_monthly_price_id: "price_1TDLLGF8WTm3d6SHhQb19bgB"
      live:
        product_id: "prod_U7O6aazVEWgQjZ"
        monthly_price_id: "price_1TLDXPFaoK5IPzNopP1DLQXh"  # 2026-05-19 fix: was price_1T99KZFaoK5IPzNoNZ8pYgy5 ($69.95 pre-overhaul, archived in Stripe 2026-05-20). $99.95 verified live.
        annual_price_id: "price_1TM5BGFaoK5IPzNoqajLS34I"
    env_vars:
      monthly: "STRIPE_PRICE_PRO_VOICE"
      annual: "STRIPE_PRICE_PRO_VOICE_ANNUAL"
    pricing:
      monthly: 99.95
      annual: 1099
    setup_fee: 49.95
    setup_fee_waived_on_annual: true
    trial:
      enabled: false
    billing_notes: "Monthly + annual. Annual saves ~8% ($1099 vs $1199.40). One-time $49.95 setup fee on monthly (waived for annual). Per-minute voice costs included in tier pricing."

  # ═══════════════════════════════════════════════════════════════
  # ChurchWiseAI Bundles (Voice + Chat) — Monthly Only
  # ═══════════════════════════════════════════════════════════════

  starter_both:
    name: "Starter Bundle (Voice + Chat)"
    description: "Voice agent + chatbot starter package"
    category: "churchwiseai"
    stripe:
      test:
        product_id: "prod_UBiblYKovhX3zE"
        monthly_price_id: "price_1TLDKxFaoK5IPzNoz849SUCr"
        annual_price_id: "price_1TLDLCFaoK5IPzNoMkDRwbn5"
        legacy_monthly_price_id: "price_1TDLLHF8WTm3d6SHIfFfbApO"
      live:
        product_id: "prod_U7O7nDxAPTliUV"
        monthly_price_id: "price_1TLDXPFaoK5IPzNopifICciu"  # 2026-05-19 fix: was price_1T99LMFaoK5IPzNoSdtRWTfg ($49.95 pre-overhaul, archived in Stripe 2026-05-20). $54.95 verified live.
        annual_price_id: "price_1TM5BGFaoK5IPzNo1O0YynYU"
    env_vars:
      monthly: "STRIPE_PRICE_STARTER_BOTH"
      annual: "STRIPE_PRICE_STARTER_BOTH_ANNUAL"
    pricing:
      monthly: 54.95
      annual: 599
      savings_vs_separate: 10.00
    setup_fee: 49.95
    setup_fee_waived_on_annual: true
    trial:
      enabled: false
    billing_notes: "Monthly + annual. Annual saves ~9% ($599 vs $659.40). One-time $49.95 setup fee on monthly (waived for annual). Saves $10/mo vs Starter Chat + Starter Voice separately."

  pro_both:
    name: "Pro Bundle (Voice + Chat)"
    description: "Full AI ministry team — voice + chat"
    category: "churchwiseai"
    stripe:
      test:
        product_id: "prod_UBibQ8CJf4AeTm"
        monthly_price_id: "price_1TLDKyFaoK5IPzNoENFO70jf"
        annual_price_id: "price_1TLDLDFaoK5IPzNog7W0Qc3r"
        legacy_monthly_price_id: "price_1TDLLIF8WTm3d6SHaT4GJRHZ"
      live:
        product_id: "prod_U7O8bIj604iNGY"
        monthly_price_id: "price_1TLDXPFaoK5IPzNo4xaZKglE"  # 2026-05-19 fix: was price_1T99MHFaoK5IPzNogsndtolX ($79.95 pre-overhaul, archived in Stripe 2026-05-20). $119.95 verified live.
        annual_price_id: "price_1TM5BHFaoK5IPzNoIAeIC1BI"
    env_vars:
      monthly: "STRIPE_PRICE_PRO_BOTH"
      annual: "STRIPE_PRICE_PRO_BOTH_ANNUAL"
    pricing:
      monthly: 119.95
      annual: 1299
      savings_vs_separate: 15.00
    setup_fee: 49.95
    setup_fee_waived_on_annual: true
    trial:
      enabled: false
    billing_notes: "Monthly + annual. Annual saves ~10% ($1299 vs $1439.40). One-time $49.95 setup fee on monthly (waived for annual). Most popular bundle. Saves $15/mo vs Pro Chat + Pro Voice separately."

  suite_both:
    name: "Suite Bundle (Voice + Chat)"
    description: "Complete AI ministry system — everything included"
    category: "churchwiseai"
    stripe:
      test:
        product_id: "prod_UBibdVtTBc2WQv"
        monthly_price_id: "price_1TLDKyFaoK5IPzNoeeSp41ra"
        annual_price_id: "price_1TLDLDFaoK5IPzNoJNKFlLZ9"
        legacy_monthly_price_id: "price_1TDLLJF8WTm3d6SHgQoAjYOy"
      live:
        product_id: "prod_U7O9Vw8sDThkbf"
        monthly_price_id: "price_1TLDXQFaoK5IPzNoCO8VBxgb"  # 2026-05-19 fix: was price_1T99N2FaoK5IPzNoNY197kWK ($99.95 pre-overhaul, archived in Stripe 2026-05-20). $139.95 verified live.
        annual_price_id: "price_1TM5BHFaoK5IPzNoflkxNRCn"
    env_vars:
      monthly: "STRIPE_PRICE_SUITE_BOTH"
      annual: "STRIPE_PRICE_SUITE_BOTH_ANNUAL"
    pricing:
      monthly: 139.95
      annual: 1499
      savings_vs_separate: 20.00
    setup_fee: 49.95
    setup_fee_waived_on_annual: true
    trial:
      enabled: false
    billing_notes: "Monthly + annual. Annual saves ~11% ($1499 vs $1679.40). One-time $49.95 setup fee on monthly (waived for annual). Saves $20/mo vs Suite Chat ($59.95) + Pro Voice ($99.95) = $159.90 separate. Note: Suite Voice does not exist as standalone — Suite tier is chat+voice bundle only at top tier."

  # ═══════════════════════════════════════════════════════════════
  # PewSearch — Monthly Only
  # ═══════════════════════════════════════════════════════════════

  pewsearch_premium:
    name: "PewSearch Premium Church Page"
    description: "SEO-optimized church page on PewSearch directory (218K+ listings)"
    category: "pewsearch"
    stripe:
      test:
        product_id: "prod_UBim8W2UPVLmdO"          # F8 test account: acct_1SSPzDF8WTm3d6SH
        monthly_price_id: "price_1TREAPF8WTm3d6SHwBI8ikhN"   # $4.95/mo USD (created 2026-04-28 to match live)
        legacy_price_ids:
          - "price_1TDLLKF8WTm3d6SHcRZH8WDg"       # $9.95/mo F8 test (kept active for backwards compat)
      live:
        product_id: "prod_U7ODneitVJFbl7"          # Live account: acct_1SSPz2FaoK5IPzNo (default_price set to canonical $4.95 on 2026-04-28)
        monthly_price_id: "price_1TMsbMFaoK5IPzNobI2geegX"   # $4.95/mo USD canonical
        cad_price_id: "price_1TRFQeFaoK5IPzNo8xguoBbC"       # $6.45/mo CAD pair (created 2026-04-28; metadata.cwa_pair_id back-references USD canonical)
        archived_price_ids:
          - "price_1T99QpFaoK5IPzNovuApvVUa"       # $9.95/mo USD legacy — DEACTIVATED 2026-04-28 (was default_price; flipped + archived)
          - "price_1TQssfFaoK5IPzNoXqdVdToN"       # $12.95/mo CAD orphan — DEACTIVATED 2026-04-28 (was paired with $9.95 USD legacy; replaced by $6.45 CAD)
    env_vars:
      monthly: "STRIPE_PREMIUM_MONTHLY_PRICE_ID"
    pricing:
      monthly: 4.95
      monthly_cad: 6.45
    trial:
      enabled: false
    billing_notes: "Monthly only. No trial — preview mode serves this purpose. Basic directory listing upgrade. USD price dropped from $9.95 → $4.95 on 2026-04-16; CAD pair updated from $12.95 → $6.45 on 2026-04-28. Legacy $9.95 USD + $12.95 CAD prices archived in Stripe (zero active subs at deactivation)."

  pro_website:
    name: "Pro Website"
    description: "Full church website on PewSearch — cinematic video backgrounds, custom URL, built-in chatbot. Distinct from the basic Premium Listing ($4.95). Bundled with CWA Pro/Suite plans."
    category: "pewsearch"
    stripe:
      test:
        product_id: null
        monthly_price_id: null
        note: "Test mode price ID unknown — live ID is price_1TEJh4FaoK5IPzNojyaDlegM"
      live:
        product_id: null
        monthly_price_id: "price_1TEJh4FaoK5IPzNojyaDlegM"
    env_vars:
      monthly: "STRIPE_PRO_WEBSITE_PRICE_ID"
    pricing:
      monthly: 19.95
    trial:
      enabled: false
    billing_notes: "Monthly only. Included free with CWA Pro/Suite — the $19.95/mo value shown on pricing page refers to this product. Separate from Premium Listing ($4.95). Standalone purchase available for churches that want the full website without CWA AI."

  # ═══════════════════════════════════════════════════════════════
  # IllustrateTheWord — Monthly + Annual
  # ═══════════════════════════════════════════════════════════════

  itw_premium:
    name: "ITW Premium"
    description: "Full access to IllustrateTheWord sermon illustration library"
    category: "illustratetheword"
    stripe:
      test:
        product_id: "prod_UBibkJVSBOcHYc"
        monthly_price_id: "price_1TDLLLF8WTm3d6SHDBHvO5Pv"
        annual_price_id: "price_1TDLLMF8WTm3d6SHin6nUTlR"
      live:
        monthly_product_id: "prod_U7OFzu0vIWOFuz"
        monthly_price_id: "price_1T99TPFaoK5IPzNoCqX8hEik"
        annual_product_id: "prod_U7OFzu0vIWOFuz"  # consolidated 2026-04-14 onto canonical product (split product prod_U7OGpFN8OR2LST archived 2026-05-12)
        annual_price_id: "price_1TM4lTFaoK5IPzNoTbothyxa"  # consolidated 2026-04-14 (split-product price price_1T99U5FaoK5IPzNobdKJhCyJ archived 2026-05-12)
    env_vars:
      monthly: "ITW_PREMIUM_MONTHLY"
      annual: "ITW_PREMIUM_ANNUAL"
    pricing:
      monthly: 9.95
      annual: 99.50
    trial:
      enabled: false
    billing_notes: "Monthly + annual. Annual saves ~17%. Live mode has separate products for monthly and annual."

  # ═══════════════════════════════════════════════════════════════
  # SermonWise — Monthly + Annual
  # ═══════════════════════════════════════════════════════════════

  sermonwise_pro:
    name: "SermonWise Pro"
    description: "AI-powered sermon preparation tools"
    category: "sermonwise"
    stripe:
      test:
        product_id: "prod_UBib8eY8WuIP4L"
        monthly_price_id: "price_1TDLLNF8WTm3d6SHfS86tgyk"
        annual_price_id: "price_1TDLLNF8WTm3d6SHA042eWiX"
      live:
        monthly_product_id: "prod_U7OEapCdCn42eJ"
        monthly_price_id: "price_1T99RtFaoK5IPzNoDWkdDMnA"
        annual_product_id: "prod_U7OEapCdCn42eJ"  # consolidated 2026-04-14 onto canonical product (split product prod_U7OF3hRQYrSpar archived 2026-05-12)
        annual_price_id: "price_1TM4lUFaoK5IPzNoCXxFPUnr"  # consolidated 2026-04-14 (split-product price price_1T99SiFaoK5IPzNoWXDIJVsE archived 2026-05-12)
    env_vars:
      monthly: "STRIPE_SERMON_PRO_MONTHLY"
      annual: "STRIPE_SERMON_PRO_ANNUAL"
    pricing:
      monthly: 19.95
      annual: 199.50
    trial:
      enabled: false
    billing_notes: "Monthly + annual. Annual saves ~17%. Live mode has separate products for monthly and annual. Env vars sometimes suffixed with _PRICE_ID in .env files."

  # ═══════════════════════════════════════════════════════════════
  # ShareWiseAI — Monthly Only (Coming Soon)
  # ═══════════════════════════════════════════════════════════════

  social_pro:
    name: "ShareWiseAI Pro"
    description: "AI social media management for churches — Pro tier"
    category: "sharewiseai"
    status: "coming_soon"
    stripe:
      test:
        product_id: "prod_UBibLjgRwdnbf7"
        monthly_price_id: "price_1TDLLOF8WTm3d6SHHa34EnNA"
      live:
        product_id: null
        monthly_price_id: null
        note: >
          Live-mode prices not yet created. PRICING.MD listed price_1TAfvVFaoK5IPzNoA2g5nWK6
          as live but Stripe confirms it exists in test mode only. A test-mode price also exists
          on the live account (prod_U8xrCoboI6RW7v / price_1TAfvVFaoK5IPzNoA2g5nWK6).
          Create proper live-mode products in Stripe Dashboard before launch.
    env_vars:
      monthly: "STRIPE_SOCIAL_PRO"
    pricing:
      monthly: 19.95
    trial:
      enabled: false
    billing_notes: "Monthly only. Coming Soon — OAuth integration pending."

  social_business:
    name: "ShareWiseAI Business"
    description: "AI social media management — Business tier"
    category: "sharewiseai"
    status: "coming_soon"
    stripe:
      test:
        product_id: "prod_UBibA3AH4yuxvM"
        monthly_price_id: "price_1TDLLPF8WTm3d6SH8KduBZCm"
      live:
        product_id: null
        monthly_price_id: null
        note: >
          Live-mode prices not yet created. PRICING.MD listed price_1TAfvlFaoK5IPzNowHHIGKEy
          as live but Stripe confirms it exists in test mode only. A test-mode price also exists
          on the live account (prod_U8xrXzue60afb4 / price_1TAfvlFaoK5IPzNowHHIGKEy).
          Create proper live-mode products in Stripe Dashboard before launch.
    env_vars:
      monthly: "STRIPE_SOCIAL_BUSINESS"
    pricing:
      monthly: 49.95
    trial:
      enabled: false
    billing_notes: "Monthly only. Coming Soon."

  social_agency:
    name: "ShareWiseAI Agency"
    description: "AI social media management — Agency tier (multi-church)"
    category: "sharewiseai"
    status: "coming_soon"
    stripe:
      test:
        product_id: "prod_UBib20mCeszV1t"
        monthly_price_id: "price_1TDLLQF8WTm3d6SHTRb4U9hW"
      live:
        product_id: null
        monthly_price_id: null
        note: >
          Live-mode prices not yet created. PRICING.MD listed price_1TAfvzFaoK5IPzNoSmaZwJrN
          as live but Stripe confirms it exists in test mode only. A test-mode price also exists
          on the live account (prod_U8xrCReKfeV31A / price_1TAfvzFaoK5IPzNoSmaZwJrN).
          Create proper live-mode products in Stripe Dashboard before launch.
    env_vars:
      monthly: "STRIPE_SOCIAL_AGENCY"
    pricing:
      monthly: 99.95
    trial:
      enabled: false
    billing_notes: "Monthly only. Coming Soon."

  # ═══════════════════════════════════════════════════════════════
  # One-Time Products
  # ═══════════════════════════════════════════════════════════════

  ai_starter_kit:
    name: "AI Starter Kit"
    description: "The FAITH Framework — your church's guide to implementing AI responsibly"
    category: "churchwiseai"
    stripe:
      test:
        product_id: "prod_UBibqF0222MIAS"
        price_id: "price_1TDLLKF8WTm3d6SHy4vZIHna"
      live:
        product_id: "prod_U7OAJvlm0UMjYt"
        price_id: "price_1T99NvFaoK5IPzNoZSGvefI6"
    env_vars:
      price: "STRIPE_PRICE_AI_STARTER_KIT"
    pricing:
      one_time: 4.95
    trial:
      enabled: false
    billing_notes: "One-time purchase. Instant delivery. Included free with any Starter tier or above."

  voice_setup_fee:
    name: "Voice Setup Fee"
    description: "One-time setup fee for voice agent provisioning (phone number, SIP config, knowledge base)"
    category: "churchwiseai"
    stripe:
      test:
        product_id: "prod_UJr23nuMNZY80s"
        price_id: "price_1TLDKDFaoK5IPzNoG5MetuoU"
      live:
        product_id: null
        price_id: null
    env_vars:
      price: "STRIPE_PRICE_VOICE_SETUP_FEE"
    pricing:
      one_time: 49.95
    trial:
      enabled: false
    billing_notes: "Charged on first invoice for monthly voice/bundle plans. Waived for annual billing."

  custom_domain_setup_fee:
    name: "Custom Domain Setup Fee"
    description: "One-time setup fee for Pro Website bundled-tier customers who add a custom domain (DNS CNAME instructions + Vercel domain add + SSL provisioning + support). Added 2026-04-22 per Session 3 founder interview on cwa-pro-website.md acceptance spec."
    category: "churchwiseai"
    stripe:
      test:
        product_id: "prod_UNwdHg3cOM9q2e"
        price_id: "price_1TPAksFaoK5IPzNofvyGvjh8"
      live:
        product_id: "prod_UNwkix0Fnk7uAA"
        price_id: "price_1TPAr4FaoK5IPzNouIdwlcaD"
        created: "2026-04-22 with explicit founder approval"
    env_vars:
      price: "STRIPE_PRICE_CUSTOM_DOMAIN_SETUP_FEE"
    pricing:
      one_time: 49.95
    trial:
      enabled: false
    applies_to_plans:
      - "cwa_pro_website"   # bundled tier only ($19.95/mo) — NOT cwa_pro_website_site_only ($14.95)
    billing_notes: "Added as a one-time invoice line item the first time a customer adds a custom domain to their Pro Website. Waived on annual bundled subscriptions (100% coupon applied at invoice generation — customer sees the waiver as $0 on the invoice, not a silent skip). Setup fee applies whenever custom domain is first added — including existing annual customers who later request a custom domain (annual discount covers the base product only, not future add-ons)."

# ═══════════════════════════════════════════════════════════════════
# Billing Rules
# ═══════════════════════════════════════════════════════════════════

billing_rules:
  annual_discount_chat: "~17% savings on chat plans (pay for 10 months, get 12)"
  annual_discount_voice: "~8-11% savings on voice/bundle plans (see per-product pricing)"
  annual_formula_chat: "monthly * 10"
  annual_eligible:
    - "starter_chat"
    - "pro_chat"
    - "suite_chat"
    - "itw_premium"
    - "sermonwise_pro"
    - "starter_voice"
    - "pro_voice"
    - "starter_both"
    - "pro_both"
    - "suite_both"
  annual_not_eligible:
    products:
      - "pewsearch_premium"
      - "social_pro"
      - "social_business"
      - "social_agency"
      - "ai_starter_kit"
      - "voice_setup_fee"
      - "custom_domain_setup_fee"
    reason: "Directory/social plans not eligible for annual pricing. One-time products not applicable."

  setup_fee:
    amount: 49.95
    applies_to:
      - "starter_voice"
      - "pro_voice"
      - "starter_both"
      - "pro_both"
      - "suite_both"
    waived_for: "All annual billing plans (voice/bundle)"
    description: "One-time provisioning fee charged on first invoice for monthly voice/bundle subscriptions. Covers phone number setup, SIP configuration, and knowledge base initialization."

  chat_trials: "14-day free trial on all chat plans (Starter, Pro, Suite — both monthly and annual)"
  voice_trials: "No trials — requires phone provisioning. Setup fee applies on monthly; waived on annual."
  bundle_trials: "No trials — includes voice component. Setup fee applies on monthly; waived on annual."
  pewsearch_trials: "No trials — preview mode serves this purpose"
  itw_trials: "No trials"
  sermonwise_trials: "No trials"
  social_trials: "No trials (TBD at launch)"

  cancellation:
    policy: "Cancel anytime, no contract"
    service_continuation: "Service continues until end of current billing period"
    refunds: "No refunds on current period"

  founder_rates:
    description: "First 500 churches lock in current rates permanently"
    threshold: 500
    post_threshold: "Prices will increase after 500 signups"
    badge: "Founder rate badge shown on pricing page"

# ═══════════════════════════════════════════════════════════════════
# Stripe Account
# ═══════════════════════════════════════════════════════════════════

stripe_account:
  email: "churchwiseai@gmail.com"
  live_account_id: "acct_1SSPz2FaoK5IPzNo"
  test_account_id: "acct_1SSPzDF8WTm3d6SH"
  note: >
    ONE Stripe account, TWO modes. Test-mode price IDs from the test account
    contain F8WTm3d6SH in the ID; live-mode price IDs contain FaoK5IPzNo.
    A second set of test-mode prices also exists on the live account (FaoK5IPzNo
    with livemode=false) — these are the mirror products (prod_UBib* series).
    The .env.local files should use F8WTm3d6SH test price IDs.
    Vercel env vars should use FaoK5IPzNo live price IDs.
  live_product_id_note: >
    Live mode has SPLIT products for some tiers where monthly and annual billing
    are on separate Stripe products (e.g., CWA Chat Starter vs CWA Chat Starter Annual).
    This is documented per-product above. Test mode consolidates both intervals
    under one product per tier. Backlog item to consolidate live products exists.

# ═══════════════════════════════════════════════════════════════════
# Checkout Flows
# ═══════════════════════════════════════════════════════════════════

checkout_flows:
  churchwiseai:
    onboard: "/onboard -> Monthly/Annual toggle + plan dropdown -> /api/onboard -> /api/stripe/church-checkout"
    direct: "/api/stripe/checkout?price=<priceKey>"
    webhook: "/api/stripe/webhook — handles activation, cancellation, trial ending, payment failure"
    trial_auto_applied: "14-day trial auto-applied for chat plans"
  pewsearch:
    claim: "/claim/[slug] -> /api/stripe/pre-checkout -> /api/stripe/checkout"
    webhook: "/api/stripe/webhook — activates premium_churches, sends welcome email with 3x retry"
  illustratetheword:
    checkout: "/api/stripe/checkout (POST, requires Supabase auth)"
    webhook: "/api/stripe/webhook — updates user_subscriptions table"
  sermonwise:
    note: "Uses churchwiseai-web checkout flows (same codebase)"
  sharewiseai:
    note: "Coming Soon — will use churchwiseai-web checkout flows (same codebase)"

# ═══════════════════════════════════════════════════════════════════
# Cross-Reference: Test ↔ Live Price ID Mapping (from PRICING.md)
# ═══════════════════════════════════════════════════════════════════
# This duplicates per-product data above but provides a quick lookup table
# matching PRICING.md's "Test ↔ Live Price ID Mapping" section exactly.

env_var_mapping:
  STRIPE_PRICE_STARTER_CHAT:
    test: "price_1TDLKaF8WTm3d6SHPhaI4pdV"
    live: "price_1T99CsFaoK5IPzNormWHeao6"
  STRIPE_PRICE_STARTER_CHAT_ANNUAL:
    test: "price_1TDLKaF8WTm3d6SHPIbFmi0S"
    live: "price_1TM4lTFaoK5IPzNoQ5mn8sW7"  # consolidated 2026-04-14 (was price_1T99FcFaoK5IPzNoWnhh0HxF — pending archival in Phase 2)
  STRIPE_PRICE_PRO_CHAT:
    test: "price_1TDLKbF8WTm3d6SHSfhk7DJU"
    live: "price_1T99GjFaoK5IPzNogFqCiQjS"
  STRIPE_PRICE_PRO_CHAT_ANNUAL:
    test: "price_1TDLKcF8WTm3d6SHBwxhP53O"
    live: "price_1TDKuZFaoK5IPzNoS1u6ULoR"
  STRIPE_PRICE_SUITE_CHAT:
    test: "price_1TDLKdF8WTm3d6SHrd8VqCWW"
    live: "price_1T99IDFaoK5IPzNoRmcX7Rnu"
  STRIPE_PRICE_SUITE_CHAT_ANNUAL:
    test: "price_1TDLKdF8WTm3d6SHNeFPSG7N"
    live: "price_1TDKyNFaoK5IPzNoFqKjxIab"
  STRIPE_PRICE_STARTER_VOICE:
    test: "price_1TLDKaFaoK5IPzNods52nLYe"
    live: "price_1TLDXOFaoK5IPzNoJamtgXcb"  # 2026-05-19 fix: was price_1T99JLFaoK5IPzNodFvihZb3 ($39.95 pre-overhaul price)
    legacy_test: "price_1TDLLFF8WTm3d6SH67ehhiq7"
  STRIPE_PRICE_STARTER_VOICE_ANNUAL:
    test: "price_1TLDLBFaoK5IPzNoFDb5560J"
    live: null  # Not yet created in live mode
  STRIPE_PRICE_PRO_VOICE:
    test: "price_1TLDKkFaoK5IPzNoXwFx1bPE"
    live: "price_1TLDXPFaoK5IPzNopP1DLQXh"  # 2026-05-19 fix: was price_1T99KZFaoK5IPzNoNZ8pYgy5 ($69.95 pre-overhaul price)
    legacy_test: "price_1TDLLGF8WTm3d6SHhQb19bgB"
  STRIPE_PRICE_PRO_VOICE_ANNUAL:
    test: "price_1TLDLCFaoK5IPzNoMA1sKkko"
    live: null  # Not yet created in live mode
  STRIPE_PRICE_STARTER_BOTH:
    test: "price_1TLDKxFaoK5IPzNoz849SUCr"
    live: "price_1TLDXPFaoK5IPzNopifICciu"  # 2026-05-19 fix: was price_1T99LMFaoK5IPzNoSdtRWTfg ($49.95 pre-overhaul price)
    legacy_test: "price_1TDLLHF8WTm3d6SHIfFfbApO"
  STRIPE_PRICE_STARTER_BOTH_ANNUAL:
    test: "price_1TLDLCFaoK5IPzNoMkDRwbn5"
    live: null  # Not yet created in live mode
  STRIPE_PRICE_PRO_BOTH:
    test: "price_1TLDKyFaoK5IPzNoENFO70jf"
    live: "price_1TLDXPFaoK5IPzNo4xaZKglE"  # 2026-05-19 fix: was price_1T99MHFaoK5IPzNogsndtolX ($79.95 pre-overhaul price)
    legacy_test: "price_1TDLLIF8WTm3d6SHaT4GJRHZ"
  STRIPE_PRICE_PRO_BOTH_ANNUAL:
    test: "price_1TLDLDFaoK5IPzNog7W0Qc3r"
    live: null  # Not yet created in live mode
  STRIPE_PRICE_SUITE_BOTH:
    test: "price_1TLDKyFaoK5IPzNoeeSp41ra"
    live: "price_1TLDXQFaoK5IPzNoCO8VBxgb"  # 2026-05-19 fix: was price_1T99N2FaoK5IPzNoNY197kWK ($99.95 pre-overhaul price)
    legacy_test: "price_1TDLLJF8WTm3d6SHgQoAjYOy"
  STRIPE_PRICE_SUITE_BOTH_ANNUAL:
    test: "price_1TLDLDFaoK5IPzNoJNKFlLZ9"
    live: null  # Not yet created in live mode
  STRIPE_PRICE_VOICE_SETUP_FEE:
    test: "price_1TLDKDFaoK5IPzNoG5MetuoU"
    live: null  # Not yet created in live mode
  STRIPE_PRICE_AI_STARTER_KIT:
    test: "price_1TDLLKF8WTm3d6SHy4vZIHna"
    live: "price_1T99NvFaoK5IPzNoZSGvefI6"
  STRIPE_PREMIUM_MONTHLY_PRICE_ID:
    test: "price_1TDLLKF8WTm3d6SHcRZH8WDg"
    live: "price_1T99QpFaoK5IPzNovuApvVUa"
  STRIPE_SERMON_PRO_MONTHLY:
    test: "price_1TDLLNF8WTm3d6SHfS86tgyk"
    live: "price_1T99RtFaoK5IPzNoDWkdDMnA"
  STRIPE_SERMON_PRO_ANNUAL:
    test: "price_1TDLLNF8WTm3d6SHA042eWiX"
    live: "price_1TM4lUFaoK5IPzNoCXxFPUnr"  # consolidated 2026-04-14 (split-product price price_1T99SiFaoK5IPzNoWXDIJVsE archived 2026-05-12)
  STRIPE_SOCIAL_PRO:
    test: "price_1TDLLOF8WTm3d6SHHa34EnNA"
    live: null  # Not yet created in live mode. PRICING.MD listed price_1TAfvVFaoK5IPzNoA2g5nWK6 but that is test-mode on live account.
  STRIPE_SOCIAL_BUSINESS:
    test: "price_1TDLLPF8WTm3d6SH8KduBZCm"
    live: null  # Not yet created in live mode. PRICING.MD listed price_1TAfvlFaoK5IPzNowHHIGKEy but that is test-mode on live account.
  STRIPE_SOCIAL_AGENCY:
    test: "price_1TDLLQF8WTm3d6SHTRb4U9hW"
    live: null  # Not yet created in live mode. PRICING.MD listed price_1TAfvzFaoK5IPzNoSmaZwJrN but that is test-mode on live account.
  ITW_PREMIUM_MONTHLY:
    test: "price_1TDLLLF8WTm3d6SHDBHvO5Pv"
    live: "price_1T99TPFaoK5IPzNoCqX8hEik"
  ITW_PREMIUM_ANNUAL:
    test: "price_1TDLLMF8WTm3d6SHin6nUTlR"
    live: "price_1TM4lTFaoK5IPzNoTbothyxa"  # consolidated 2026-04-14 (split-product price price_1T99U5FaoK5IPzNobdKJhCyJ archived 2026-05-12)

# ═══════════════════════════════════════════════════════════════
# CAD Stripe Prices — added 2026-04-27 (decision doc:
# knowledge/decisions/2026-04-27-cad-pricing.md)
#
# Each entry pairs a USD live price with its newly-created CAD live price.
# Display layer is wired (USD/CAD toggle on /wiseaiagency/pricing and
# /funeralwiseai/pricing, defaulting by Vercel geo-IP). Application code
# wiring (passing currency to Stripe Checkout) is held until the in-flight
# FA-082 Stripe refactor lands; at that point a follow-up PR will fold
# these IDs into the per-product `stripe.live.*_cad` fields above.
#
# All IDs created in live mode via scripts/stripe-create-cad-prices.mjs
# in churchwiseai-web. See scripts/stripe-cad-prices.json (worktree-local
# audit log) for the run record.
# ═══════════════════════════════════════════════════════════════
cad_prices:
  # ── FuneralWiseAI (new products created same run) ──────────────
  funeralwiseai_setup:
    product_id: "prod_UPiJXweJzvHN1V"
    # Phase B Stripe ops completed 2026-05-02:
    #   - Old USD $949 price (price_1TQssTFaoK5IPzNookD1Gzgv) archived (active=false)
    #   - Old CAD $1,295 price (price_1TQssTFaoK5IPzNoRLkcP4qk) archived (active=false)
    #   - New USD $745 price + new CAD $995 price created on same product, active.
    # Per decisions/2026-05-02-vertical-setup-pricing-revision.md.
    usd_price_id: "price_1TSlPDFaoK5IPzNo2xfDPbjZ"
    cad_price_id: "price_1TSlPUFaoK5IPzNok79rADnp"
    usd_amount: 745
    cad_amount: 995
    interval: "one-time"
  funeralwiseai_monthly:
    product_id: "prod_UPiJmrmNg6JKiP"
    usd_price_id: "price_1TQssUFaoK5IPzNomEAL0zzw"
    cad_price_id: "price_1TQssUFaoK5IPzNoI0iN99ky"
    usd_amount: 199
    cad_amount: 249
    interval: "month"

  # ── VetWiseAI (created 2026-05-02 per decisions/2026-05-02-vertical-setup-pricing-revision.md) ─
  # 4 products + 8 prices created in one Stripe live run with founder authorization.
  # Tier ladder: Starter ($745+$199) and Pro ($745+$299) both with USD + CAD.
  vwa_starter_setup:
    product_id: "prod_URiRlazRWaJWlc"
    usd_price_id: "price_1TSp13FaoK5IPzNoKJffH9bJ"
    cad_price_id: "price_1TSp13FaoK5IPzNoV3TwTuJ8"
    usd_amount: 745
    cad_amount: 995
    interval: "one-time"
  vwa_starter_monthly:
    product_id: "prod_URiS8R9aKu5N43"
    usd_price_id: "price_1TSp1SFaoK5IPzNoxEeUYozm"
    cad_price_id: "price_1TSp1TFaoK5IPzNo1QRCLWQk"
    usd_amount: 199
    cad_amount: 249
    interval: "month"
  vwa_pro_setup:
    product_id: "prod_URiSvj3clfFN2O"
    usd_price_id: "price_1TSp1xFaoK5IPzNoKeCZa0bb"
    cad_price_id: "price_1TSp1yFaoK5IPzNoIJ0d8CSH"
    usd_amount: 745
    cad_amount: 995
    interval: "one-time"
  vwa_pro_monthly:
    product_id: "prod_URiSXu3iRfirnM"
    usd_price_id: "price_1TSp2DFaoK5IPzNoQO4LWl2n"
    cad_price_id: "price_1TSp2EFaoK5IPzNo5T86DGKv"
    usd_amount: 299
    cad_amount: 379
    interval: "month"

  # ── ChurchWiseAI Chat ──────────────────────────────────────────
  starter_chat_monthly:
    usd_price_id: "price_1T99CsFaoK5IPzNormWHeao6"
    cad_price_id: "price_1TQssVFaoK5IPzNo1i7pIPxi"
    usd_amount: 14.95
    cad_amount: 19.95
    interval: "month"
  starter_chat_annual:
    usd_price_id: "price_1TM4lTFaoK5IPzNoQ5mn8sW7"
    cad_price_id: "price_1TQssWFaoK5IPzNo8I8CXiA6"
    usd_amount: 149.50
    cad_amount: 199
    interval: "year"
  pro_chat_monthly:
    usd_price_id: "price_1T99GjFaoK5IPzNogFqCiQjS"
    cad_price_id: "price_1TQssVFaoK5IPzNo7MhzptkJ"
    usd_amount: 34.95
    cad_amount: 44.95
    interval: "month"
  pro_chat_annual:
    usd_price_id: "price_1TDKuZFaoK5IPzNoS1u6ULoR"
    cad_price_id: "price_1TQssWFaoK5IPzNosZqq3Ugl"
    usd_amount: 349.50
    cad_amount: 449
    interval: "year"
  suite_chat_monthly:
    usd_price_id: "price_1T99IDFaoK5IPzNoRmcX7Rnu"
    cad_price_id: "price_1TQssWFaoK5IPzNomplevWLu"
    usd_amount: 59.95
    cad_amount: 79.95
    interval: "month"
  suite_chat_annual:
    usd_price_id: "price_1TDKyNFaoK5IPzNoFqKjxIab"
    cad_price_id: "price_1TQssXFaoK5IPzNoIVRsFYtb"
    usd_amount: 599.50
    cad_amount: 799
    interval: "year"

  # ── ChurchWiseAI Voice ─────────────────────────────────────────
  starter_voice_monthly:
    usd_price_id: "price_1TLDXOFaoK5IPzNoJamtgXcb"
    cad_price_id: "price_1TQssXFaoK5IPzNoaieHW2dI"
    usd_amount: 49.95
    cad_amount: 64.95
    interval: "month"
  starter_voice_annual:
    usd_price_id: "price_1TM5BFFaoK5IPzNoOvtpJUPr"
    cad_price_id: "price_1TQssYFaoK5IPzNoZX4CAl96"
    usd_amount: 549
    cad_amount: 699
    interval: "year"
  pro_voice_monthly:
    usd_price_id: "price_1TLDXPFaoK5IPzNopP1DLQXh"
    cad_price_id: "price_1TQssYFaoK5IPzNofslIVCWF"
    usd_amount: 99.95
    cad_amount: 129.95
    interval: "month"
  pro_voice_annual:
    usd_price_id: "price_1TM5BGFaoK5IPzNoqajLS34I"
    cad_price_id: "price_1TQssYFaoK5IPzNoKnfVsmBI"
    usd_amount: 1099
    cad_amount: 1399
    interval: "year"

  # ── ChurchWiseAI Voice + Chat Bundle ───────────────────────────
  starter_both_monthly:
    usd_price_id: "price_1TLDXPFaoK5IPzNopifICciu"
    cad_price_id: "price_1TQssZFaoK5IPzNo5Vv6sGuR"
    usd_amount: 54.95
    cad_amount: 69.95
    interval: "month"
  starter_both_annual:
    usd_price_id: "price_1TM5BGFaoK5IPzNo1O0YynYU"
    cad_price_id: "price_1TQssaFaoK5IPzNokz58X5Za"
    usd_amount: 599
    cad_amount: 749
    interval: "year"
  pro_both_monthly:
    usd_price_id: "price_1TLDXPFaoK5IPzNo4xaZKglE"
    cad_price_id: "price_1TQssZFaoK5IPzNof8TgCkEz"
    usd_amount: 119.95
    cad_amount: 149.95
    interval: "month"
  pro_both_annual:
    usd_price_id: "price_1TM5BHFaoK5IPzNoIAeIC1BI"
    cad_price_id: "price_1TQssaFaoK5IPzNob9a9UzKT"
    usd_amount: 1299
    cad_amount: 1649
    interval: "year"
  suite_both_monthly:
    usd_price_id: "price_1TLDXQFaoK5IPzNoCO8VBxgb"
    cad_price_id: "price_1TQssaFaoK5IPzNoPRoAkj1d"
    usd_amount: 139.95
    cad_amount: 179.95
    interval: "month"
  suite_both_annual:
    usd_price_id: "price_1TM5BHFaoK5IPzNoflkxNRCn"
    cad_price_id: "price_1TQssbFaoK5IPzNo8StEofoq"
    usd_amount: 1499
    cad_amount: 1899
    interval: "year"

  # ── ChurchWiseAI add-ons ───────────────────────────────────────
  pro_website_bundled_monthly:
    usd_price_id: "price_1TEJh4FaoK5IPzNojyaDlegM"
    cad_price_id: "price_1TQssbFaoK5IPzNoEUCH96WA"
    usd_amount: 19.95
    cad_amount: 24.95
    interval: "month"
  pro_website_hosting_monthly:
    usd_price_id: "price_1TOkeMFaoK5IPzNoDDtpQGor"
    cad_price_id: "price_1TQsscFaoK5IPzNoPV213CHq"
    usd_amount: 14.95
    cad_amount: 19.95
    interval: "month"
  voice_setup_fee:
    usd_price_id: "price_1TLDXOFaoK5IPzNolx1PrM63"
    cad_price_id: "price_1TQsscFaoK5IPzNoVfg6WKzR"
    usd_amount: 49.95
    cad_amount: 64.95
    interval: "one-time"
  pro_website_custom_domain_setup:
    usd_price_id: "price_1TPAr4FaoK5IPzNouIdwlcaD"
    cad_price_id: "price_1TQsscFaoK5IPzNotIFep35Z"
    usd_amount: 49.95
    cad_amount: 64.95
    interval: "one-time"

  # ── SermonWise ─────────────────────────────────────────────────
  sermonwise_pro_monthly:
    usd_price_id: "price_1T99RtFaoK5IPzNoDWkdDMnA"
    cad_price_id: "price_1TQssdFaoK5IPzNoSe7Wy6yY"
    usd_amount: 19.95
    cad_amount: 24.95
    interval: "month"
  sermonwise_pro_annual:
    usd_price_id: "price_1TM4lUFaoK5IPzNoCXxFPUnr"  # consolidated 2026-04-14 (was price_1T99SiFaoK5IPzNoWXDIJVsE — archived 2026-05-12)
    cad_price_id: "price_1TWJiKFaoK5IPzNowVp6FyJF"  # consolidated 2026-05-12 onto canonical product (was price_1TQssdFaoK5IPzNoMGWkTVQ5 on archived split product prod_U7OF3hRQYrSpar)
    usd_amount: 199.50
    cad_amount: 249
    interval: "year"

  # ── ITW Premium ────────────────────────────────────────────────
  itw_premium_monthly:
    usd_price_id: "price_1T99TPFaoK5IPzNoCqX8hEik"
    cad_price_id: "price_1TQsseFaoK5IPzNooqOJSdqZ"
    usd_amount: 9.95
    cad_amount: 12.95
    interval: "month"
  itw_premium_annual:
    usd_price_id: "price_1TM4lTFaoK5IPzNoTbothyxa"  # consolidated 2026-04-14 (was price_1T99U5FaoK5IPzNobdKJhCyJ — archived 2026-05-12)
    cad_price_id: "price_1TWJiFFaoK5IPzNoepcX1HGr"  # consolidated 2026-05-12 onto canonical product (was price_1TQsseFaoK5IPzNo2pqzy73H on archived split product prod_U7OGpFN8OR2LST)
    usd_amount: 99.50
    cad_amount: 129
    interval: "year"

  # ── PewSearch ──────────────────────────────────────────────────
  pewsearch_premium_monthly:
    usd_price_id: "price_1T99QpFaoK5IPzNovuApvVUa"
    cad_price_id: "price_1TQssfFaoK5IPzNoXqdVdToN"
    usd_amount: 9.95
    cad_amount: 12.95
    interval: "month"
