Vehicle calculator
Complete calculator on a vehicle detail page including finance request flow.
Use the examples below for vehicle detail pages, monthly price cards and general finance pages. The layout and width now match the latest manual style.
With one integration ID you can place three iframe display types. Choose the right type for each page and fill the vehicle details dynamically from your website.
Complete calculator on a vehicle detail page including finance request flow.
Compact monthly amount on a stock card or next to the sale price.
General calculator where the visitor enters the vehicle details.
Replace all three: integration_id (the ID only, without “API-key ends in …”), origin (the exact embedding website address, including scheme and port, without a path) and dealer_id (an active customer in your portal). Example.nl and LO-00002 are placeholders, not automatically valid values.
Iframe testing on localhost and 127.0.0.1 is automatically allowed for active integrations, over HTTP or HTTPS on any port. Use a local web server, not file://. The integration, product and dealer must remain active. External websites must be registered. Keep the dealer’s registered website as the real customer website.
This example assumes http://localhost:3000. Replace both IDs and adjust the port:
<iframe src="https://leasemodule.nl/api/embed/?integration_id=JOUW_INTEGRATIE_ID&origin=http%3A%2F%2Flocalhost%3A3000&type=standalone&dealer_id=JOUW_DEALER_ID" title="Leasecalculator" width="100%" height="650" style="border:0;width:100%"></iframe>For production, replace origin with the registered website address, URL-encoded, for example using encodeURIComponent(window.location.origin). Never include an API key in the iframe.
This local exception applies to iframes. Backend REST API requests still require an API key. Test applications are processed normally and may send emails.
You receive this from your lease provider. The integration ID may be visible in the iframe URL.
Use the dealer ID from your dealer overview, for example LO-00002.
Show the full calculator on the vehicle detail page next to or below the selected vehicle.
Illustrative view of the calculator next to a vehicle detail.
<iframe id="lm-vehicle" src="https://leasemodule.nl/api/embed/?integration_id=JOUW_INTEGRATIE_ID&origin=https%3A%2F%2Fvoorbeeld.nl&type=vehicle&dealer_id=LO-00002&reference=VWE12345&aanschafprijs=24950&voertuigsoort=Personenauto&merk=Volkswagen&model=Golf&bouwjaar=2022&kenteken=G123AB&brandstof=Benzine&btwmarge=btw&dealernaam=Voorbeeld+Autobedrijf&dealerwebsite=https%3A%2F%2Fvoorbeeld.nl&voertuigurl=https%3A%2F%2Fvoorbeeld.nl%2Faanbod%2Fgolf" title="LeaseModule vehicle" width="100%" height="450" style="border:0;width:100%" loading="lazy"></iframe>
<script>
(function () {
var frame = document.getElementById('lm-vehicle');
if (!frame) return;
window.addEventListener('message', function (event) {
if (event.origin !== 'https://leasemodule.nl' ||
event.source !== frame.contentWindow ||
!event.data || event.data.type !== 'leasemodule:height') return;
var height = Number(event.data.height);
if (isFinite(height) && height >= 100 && height <= 10000) {
frame.style.height = Math.ceil(height) + 'px';
}
});
frame.addEventListener('load', function () {
frame.contentWindow.postMessage({type:'leasemodule:hello'}, 'https://leasemodule.nl');
});
})();
</script>Use this compact variation on stock cards, next to the selling price or inside a vehicle list.
<iframe id="lm-monthly" src="https://leasemodule.nl/api/embed/?integration_id=JOUW_INTEGRATIE_ID&origin=https%3A%2F%2Fvoorbeeld.nl&type=monthly&dealer_id=LO-00002&reference=VWE12345&aanschafprijs=24950&voertuigsoort=Personenauto&merk=Volkswagen&model=Golf&bouwjaar=2022&kenteken=G123AB&brandstof=Benzine&btwmarge=btw&dealernaam=Voorbeeld+Autobedrijf&dealerwebsite=https%3A%2F%2Fvoorbeeld.nl&voertuigurl=https%3A%2F%2Fvoorbeeld.nl%2Faanbod%2Fgolf" title="LeaseModule monthly" width="100%" height="140" style="border:0;width:100%" loading="lazy"></iframe>
<script>
(function () {
var frame = document.getElementById('lm-monthly');
if (!frame) return;
window.addEventListener('message', function (event) {
if (event.origin !== 'https://leasemodule.nl' ||
event.source !== frame.contentWindow ||
!event.data || event.data.type !== 'leasemodule:height') return;
var height = Number(event.data.height);
if (isFinite(height) && height >= 100 && height <= 10000) {
frame.style.height = Math.ceil(height) + 'px';
}
});
frame.addEventListener('load', function () {
frame.contentWindow.postMessage({type:'leasemodule:hello'}, 'https://leasemodule.nl');
});
})();
</script>For a general finance page without a preselected vehicle.
<iframe id="lm-standalone" src="https://leasemodule.nl/api/embed/?integration_id=JOUW_INTEGRATIE_ID&origin=https%3A%2F%2Fvoorbeeld.nl&type=standalone&dealer_id=LO-00002" title="LeaseModule standalone" width="100%" height="450" style="border:0;width:100%" loading="lazy"></iframe>
<script>
(function () {
var frame = document.getElementById('lm-standalone');
if (!frame) return;
window.addEventListener('message', function (event) {
if (event.origin !== 'https://leasemodule.nl' ||
event.source !== frame.contentWindow ||
!event.data || event.data.type !== 'leasemodule:height') return;
var height = Number(event.data.height);
if (isFinite(height) && height >= 100 && height <= 10000) {
frame.style.height = Math.ceil(height) + 'px';
}
});
frame.addEventListener('load', function () {
frame.contentWindow.postMessage({type:'leasemodule:hello'}, 'https://leasemodule.nl');
});
})();
</script>For vehicle and monthly, you pass vehicle data. The standalone calculator only needs the integration ID and dealer ID.
| Parameter | Required | Description |
|---|---|---|
integration_id | Ja | The integration ID from your email. |
type | Ja | vehicle, monthly of standalone. |
dealer_id | Ja | Dealer-ID uit jouw dealer-overzicht, bijvoorbeeld LO-00002. |
aanschafprijs | Ja* | Vehicle selling price as a number, for example 24950. |
merk | Ja* | Make name, for example Volkswagen. |
model | Ja* | Model name, for example Golf. |
kenteken | Optioneel | Registration plate of the vehicle. |
bouwjaar | Optioneel | Four-digit year of manufacture. |
brandstof | Optioneel | For example Benzine. |
btwmarge | Optioneel | btw of marge. |
voertuigsoort | Optioneel | For example Personenauto or Bedrijfswagen. |
term | Optioneel** | Term in months; default 72. |
product | Optioneel** | business of consumer. |
down_payment | Optioneel** | Deposit; default 0. |
final_payment | Optioneel** | Final payment; default 0. |
* Alleen verplicht voor vehicle en monthly. ** Alleen beschikbaar voor de maandprijsweergave.
frame-ancestors or X-Frame-Options. Never place a secret API key in browser-side code.