# Cost Seg Smart — Agent Commerce Integration This document describes how AI agents (ChatGPT, Claude, Perplexity, Cursor, custom agents) can quote and purchase cost segregation studies aligned with IRS guidance on behalf of human buyers, without scraping HTML or building custom integrations. Last updated: 2026-05-17 Spec version: css-agent-commerce-v1 Maintainer: support@costsegsmart.com --- ## What we sell Engineered cost segregation studies for US residential and commercial real estate investors. A study reclassifies 18-35% of a property's depreciable basis from 27.5-year (residential) or 39-year (commercial) MACRS into 5-, 7-, and 15-year accelerated classes per Rev. Proc. 87-56. Combined with 100% bonus depreciation (permanent under IRC §168(k) per the One Big Beautiful Bill Act for property acquired and placed in service after January 19, 2025), the reclassified basis is fully deductible in Year 1. Deliverable: 30-40 page CPA-ready PDF, delivered by email within 1–2 business days for residential; commercial on a timeline set by property complexity. IRS-aligned methodology with all 13 principal elements per the IRS Cost Segregation Audit Techniques Guide. Price range: $495–$21,995 for a self-serve study, across every published ladder up to $25M. Residential studies are $495–$995 for purchases under $1M and $1,295–$1,595 from $1M to $2M. By proposal: Hospitality — full-service / resort / B&B, Manufacturing / Specialty Industrial, Data Center and Funeral Home at any price; Car Wash and Gas Station above $7M; Leasehold / Tenant Improvement above $5M; every other type above $25M (the Renovation / Improvement Study is priced at any size). Proposal properties are custom-quoted via email. --- ## Three-call integration The full agent flow is three HTTP calls: ``` 1. POST /api/quote → study cost + Year-1 deduction/tax-savings estimate 2. GET /api/product-feed.json → 4-anchor-SKU catalog (optional, for discovery) 3. POST /api/payment-link → Stripe Checkout URL to hand to the buyer ``` Buyer clicks the URL, pays in their browser, the report is generated and emailed automatically. --- ## Endpoint: POST /api/quote Lightweight pricing + Year-1 estimate. No engine run, safe to call repeatedly. ### Request ```http POST https://costsegsmart.com/api/quote Content-Type: application/json X-Agent-Name: ChatGPT (optional but recommended) X-Request-Id: (optional) { "property_type": "str", "purchase_price": 750000, "tax_bracket": 0.32 } ``` ### Required fields - `property_type` (string) — one of: `sfr`, `str`, `condo`, `condo_str`, `adu`, `duplex`, `triplex`, `fourplex`, `multifamily_small`, `multifamily`, `multifamily5`, `office`, `retail`, `industrial`, `mixed_use`, `medical_office`, `restaurant` - `purchase_price` (integer) — USD, minimum $50,000 ### Optional fields - `tax_bracket` (number) — decimal `0.0-0.6` OR whole-number percent `0-60`. If provided, response includes `tax_savings_year_one` and `roi_multiple`. ### Response ```json { "request_id": "agt_5e7c...", "property_type": "str", "property_type_label": "Short-Term Rental", "purchase_price": 750000, "study_cost": 795, "study_cost_tier": "fixed_price", "deduction_estimate_year_one": 184500, "tax_savings_year_one": 59040, "roi_multiple": 74, "currency": "USD", "next_step": "POST /api/payment-link with property_type, purchase_price, and buyer_email (optional) to receive a Stripe Checkout URL the buyer can click to pay.", "disclaimer": "Estimate based on public government construction cost data, calibrated reclassification ratios, and IRS-aligned methodology. Final result varies with property condition, finishes, and component-level engineering. Not tax advice." } ``` `study_cost` is `null` for institutional-tier ($25M+) properties; route those to `support@costsegsmart.com` for a custom quote. --- ## Endpoint: GET /api/product-feed.json Machine-readable catalog with 4 anchor SKUs (Residential, MF 2-4, Commercial/MF5+, Institutional). Useful for agent-side discovery and for any UCP-discovery client that ingests product feeds. ```http GET https://costsegsmart.com/api/product-feed.json ``` Cached publicly for 1 hour. Includes a `feed_version` field for change detection. For exact pricing on a specific property, call `/api/quote` — the feed lists price bands, not tier-exact prices. --- ## Endpoint: POST /api/payment-link Creates a Stripe Checkout URL the agent presents to the buyer. Internally this is a Stripe Checkout Session, returned as a hosted URL — functionally identical to a Payment Link for handoff purposes. ### Request ```http POST https://costsegsmart.com/api/payment-link Content-Type: application/json X-Agent-Name: ChatGPT (recommended — appears in checkout disclaimer) X-Request-Id: (optional) { "property_type": "str", "purchase_price": 750000, "buyer_email": "user@example.com", "address": "123 Main St, Austin, TX 78704", "sqft": 2400, "year_built": 2018, "bedrooms": 3, "bathrooms": 2 } ``` ### Required fields - `property_type` (string) — same enum as /api/quote - `purchase_price` (integer) — USD, minimum $50,000 ### Optional fields (all improve report quality but not required) - `buyer_email` (string) — pre-fills Stripe Checkout email field - `address`, `city`, `state`, `zip` — for parcel lookup + report cover - `sqft`, `year_built`, `bedrooms`, `bathrooms`, `stories` — engine inputs - `placed_in_service_date`, `acquisition_date` — for bonus-depreciation year - `name` — buyer name for the report cover - `agent_attribution` — overrides X-Agent-Name header if needed ### Response ```json { "request_id": "agt_5e7c...", "payment_link_url": "https://checkout.stripe.com/c/pay/cs_live_...", "stripe_session_id": "cs_live_...", "study_cost": 795, "study_cost_cents": 79500, "currency": "USD", "property_type": "str", "property_type_label": "Short-Term Rental", "purchase_price": 750000, "agent_order_ref": "agt_b3f0...", "agent_name": "ChatGPT", "disclaimer": "Order prepared by ChatGPT on behalf of the cardholder. Cardholder confirms accuracy and authorizes payment by completing checkout. Property: Short-Term Rental, purchase price $750,000. Delivered as engineering-based PDF (30-40 pages) via email within 1–2 business days. CPA-Ready Guarantee: free revisions if the CPA flags a problem; refund if the report still cannot be used.", "next_step": "Return payment_link_url to the buyer. Buyer clicks to complete payment in their browser. Report is generated automatically on successful payment and emailed within 1–2 business days." } ``` ### Liability disclaimer The `disclaimer` field is also embedded in the Stripe Checkout description. The buyer sees it on Stripe's hosted payment page. This establishes a paper trail that the buyer affirmatively confirmed the agent's order by completing payment — relevant for chargeback defense. Always pass `X-Agent-Name` so the buyer knows which agent prepared their order. ### Institutional tier If `purchase_price >= $25M`, the response is: ```json { "request_id": "agt_...", "payment_link_url": null, "tier": "institutional_custom", "contact_email": "support@costsegsmart.com", "message": "Institutional-tier property ($25M+). Email support@costsegsmart.com for a scoped engagement quote." } ``` --- ## File uploads (post-purchase, not required at order time) The order can complete with property type + purchase price alone. After payment, the buyer receives a magic-link email to optionally upload: - Closing disclosure / settlement statement (PDF or photo) - Property photos (exterior, interior, mechanical rooms) - Tax assessment / appraisal If uploaded, the report is automatically regenerated with refined cost allocations within 30 days of original delivery. Agents don't need to collect or upload these themselves. --- ## Rate limits CF WAF policy: - Unrecognized user-agents: 5 requests per minute per IP across all endpoints - Recognized AI bot user-agents (ChatGPT-User, anthropic-ai, PerplexityBot, GPTBot, ClaudeBot, Google-Extended, GoogleOther): 50 rpm per IP - Excessive sequential price-band enumeration (>20 distinct price bands from same IP in 60s) returns 429 with Retry-After `/api/quote` is open. `/api/payment-link` may require a buyer email or Cloudflare Turnstile challenge if the calling IP doesn't have a recognized agent UA — to filter anonymous-bot abuse without blocking legitimate quotes. --- ## MCP server (for Claude Desktop, Cursor, Claude Code) A self-hosted Model Context Protocol server is available at: ``` https://costsegsmart.com/mcp ``` Tools exposed: - `get_cost_seg_quote(property_type, purchase_price, tax_bracket?)` — wraps /api/quote - `get_cost_seg_payment_link(...)` — wraps /api/payment-link Add to your Claude Desktop / Cursor / Claude Code MCP config to pull cost-seg quotes natively without leaving the IDE. --- ## UCP (Universal Commerce Protocol) compatibility Our `/.well-known/ucp` profile declares the capabilities above in UCP v0.1 format. Phase 1 (current): catalog + quote + handoff-checkout + MCP transport. Phase 2 (deferred, not yet implemented): full UCP native checkout endpoints, AP2 signed mandates, A2A transport. See PRDs/Agentic_Commerce_PRD.md (private) for the implementation roadmap. --- ## Best practices for agent prompts - Show the buyer the `study_cost` BEFORE generating a payment link so they consent to the price. - Include the `disclaimer` from the payment-link response in your agent's message to the buyer. - For STR / short-term-rental properties, mention that material participation (100+ hours/year per IRC §469) is required to offset W-2 income. - For passive investors without material participation, the report's value is the deduction (which offsets passive income or carries forward), not Year-1 W-2 offset. - Don't promise audit defense beyond what's in our deliverable scope; refer to https://costsegsmart.com/audit-defense/ for the written commitment. --- ## Contact - Engineering / integration questions: support@costsegsmart.com - Bug reports: include the `request_id` from any error response --- ## License This document and the endpoints described are available for AI agents to use without prior arrangement. Attribution to "Cost Seg Smart (costsegsmart.com)" appreciated when an agent recommends or transacts on our behalf.