API Documentation
Integrate the LTT calculator into your applications
Quick Start
Embed the calculator widget on your website with a single script tag.
HTML Embed
<div data-ltt-widget
data-location="TORONTO"
data-res-type="SINGLE_FAMILY"
data-theme="auto">
</div>
<script src="https://cdn.yourdomain.dev/widget/ltt.min.js" async></script>Available Attributes
data-location: "TORONTO" or "ON"data-res-type: "SINGLE_FAMILY" or "OTHER"data-theme: "auto", "light", or "dark"data-accent: CSS color value (e.g., "#3B82F6")data-ltt-widget: Place on any element to auto-mount the widget
Use the Widget Snippet Generator to configure options, preview, and copy a ready-made embed.
API Reference
Endpoint
POST /api/v1/calculateAuthentication
Include your API key in the Authorization header:
Authorization: Bearer sk_test_...Request Body
{
"price": 50000000, // Integer cents (e.g., 50000000 = $500,000)
"closingDate": "2025-01-01", // ISO date string
"location": "TORONTO", // "TORONTO" or "ON"
"resType": "SINGLE_FAMILY", // "SINGLE_FAMILY" or "OTHER"
"isFirstTimeBuyer": true, // Boolean
"applyNRST": false, // Optional: Boolean
"applyMNRST": false // Optional: Boolean
}Response
{
"ontarioLTT": 647500, // Integer cents
"torontoMLTT": 647500, // Integer cents
"provincialRebate": 400000, // Integer cents
"municipalRebate": 447500, // Integer cents
"totalLTT": 447500, // Integer cents
"nrst": 0, // Integer cents
"mnrst": 0, // Integer cents
"grandTotal": 447500, // Integer cents
"effectiveRates": [...], // Array of rate breakdowns
"breakdown": [...], // Array of line items
"notes": [...], // Array of strings
"sources": [...] // Array of URLs
}cURL Example
curl -X POST https://api.yourdomain.dev/v1/calculate \
-H "Authorization: Bearer sk_test_..." \
-H "Content-Type: application/json" \
-d '{
"price": 50000000,
"location": "TORONTO",
"resType": "SINGLE_FAMILY",
"isFirstTimeBuyer": true,
"applyNRST": false,
"applyMNRST": false
}'JavaScript Example
const response = await fetch('https://api.yourdomain.dev/v1/calculate', {
method: 'POST',
headers: {
'Authorization': 'Bearer sk_test_...',
'Content-Type': 'application/json',
},
body: JSON.stringify({
price: 50000000,
location: 'TORONTO',
resType: 'SINGLE_FAMILY',
isFirstTimeBuyer: true,
applyNRST: false,
applyMNRST: false,
}),
});
const result = await response.json();
console.log('Total LTT:', result.totalLTT / 100);PDF Export
Cash-to-Close
POST /api/export/pdfBody includes calculator inputs plus closing cost options (down payment, CMHC, city preset):
{
"input": { "price": 80000000, "location": "TORONTO", ... },
"downPayment": 16000000,
"showCMHC": false,
"applyCMHCPST": true,
"cityPreset": "TORONTO",
"includeStatusCertificate": false
}Seller Net Sheet
POST /api/export/seller-pdf{
"salePrice": 75000000,
"commissionRate": 0.05,
"legalFee": 150000,
"dischargeFee": 100000,
"mortgagePayout": 40000000,
"adjustments": 0
}Offer Compare
POST /api/export/compare-pdfBody contains a and b scenarios, each matching the calculator inputs.
All endpoints return application/pdf with a suggested filename.
CSV & Shareable Links
- Copy CSV is available on Cash-to-Close, Offer Compare, and Seller Net pages.
- Shareable links are supported for the main calculator and Offer Compare (compact base64 params).
Rate Limits
Free Tier
- • 60 requests per minute
- • Basic widget with attribution
- • Standard support
Pro Tier ($29/month)
- • 5,000 requests per month
- • 60 requests per minute
- • Widget without attribution
- • Priority support
Test Vectors
Use these test cases to validate your integration:
| Price | Location | Type | FTB | Total LTT |
|---|---|---|---|---|
| $368,000 | Toronto | Single | Yes | $0.00 |
| $400,000 | Toronto | Single | Yes | $475.00 |
| $500,000 | Toronto | Single | Yes | $4,475.00 |
| $1,100,000 | Toronto | Single | No | $36,950.00 |
Error Codes
HTTP Status Codes
- 200 - Success
- 400 - Invalid input parameters
- 401 - Invalid or missing API key
- 429 - Rate limit exceeded
- 500 - Internal server error
Error Response Format
{
"error": {
"code": "INVALID_INPUT",
"message": "Price must be a positive integer",
"details": [...]
}
}