Choose your integration method
As a dealership, you have two options: place LeaseModule quickly on your website with an iframe, or build your own interface using the REST API. For most websites, the iframe option is the fastest and safest route.
Iframe option
Use the ready-made calculator on vehicle detail pages, stock cards or a general finance page. Your website loads the calculator securely via LeaseModule.
REST API / custom integration
Use the API if you want to build a fully custom frontend or application flow. Calculations and applications then run server-side through your own environment.
Overview
One LeaseModule integration supports three implementation methods.
Vehicle calculator
Complete business and consumer calculator for a specific vehicle.
Vehicle monthly payment
Compact monthly amount on a vehicle card or next to the selling price.
Standalone calculator
General calculator in which visitors enter the vehicle details themselves.
What does your website developer do?
Give your integration ID and website address to your developer. They install the calculator in the inventory template and populate the data for each vehicle. Use the standalone calculator on a general finance page.
Before launch, check a VAT vehicle and a margin vehicle, mobile layout, recalculation after changing term and down payment, and receipt of an agreed test application by your provider.
Access and unique ID
LeaseModule activates the connection and provides at least one unique integration ID. This ID links the website to the correct dealer settings.
Integration ID Public
Used by the JavaScript widget. It may be visible in HTML and only works on approved domains.
API secret Secret
Only for direct server integrations. Never include it in HTML, JavaScript, a URL or a public repository.
Approved domain
The widget only loads on domains registered by LeaseModule for the integration.
Quick start with iframe
The iframe does not use the JavaScript widget snippets further down this guide. You receive an integration ID by email and place an iframe on your site.
- Use the integration ID from your lease provider email. Confirm your website is registered as an allowed domain.
- Choose the correct variant: vehicle calculator on a detail page, monthly price display on a listing card, or standalone calculator on a finance page.
- Place the full iframe code including automatic height adjustment from the separate dealer iframe guide. For vehicle and monthly views, fill in the vehicle data dynamically.
Alternative: existing JavaScript widget
The HTML examples below using leasemodule-calculator and leasemodule.js belong to a separate JavaScript widget method. This is not iframe code. For iframe integration, use the examples in the iframe guide.
Vehicle calculator – JavaScript widget
The calculator uses the vehicle details and displays the products enabled for this dealer.
<div
class="leasemodule-calculator"
data-type="vehicle"
data-integration-id="YOUR-INTEGRATION-ID"
data-reference="45142389"
data-aanschafprijs="31950"
data-voertuigsoort="Personenauto"
data-merk="Audi"
data-model="Q5"
data-brandstof="Hybride benzine"
data-bouwjaar="2019"
data-kenteken="N635ZB"
data-btwmarge="marge"
data-dealerwebsite="https://www.abcautos.nl/"
data-dealernaam="ABC Auto's"
data-voertuigurl="https://www.abcautos.nl/occasions-kopen/45142389-audi-q5-45-tfsi-quattro-pro-line/">
</div>
<script src="https://leasemodule.nl/api/widget/v1/leasemodule.js?v=1.17.27" async></script>Vehicle monthly payment – JavaScript widget
Use this compact option on a vehicle card or next to the selling price. A click can open the complete calculator.
<div
class="leasemodule-monthly-price"
data-integration-id="YOUR-INTEGRATION-ID"
data-reference="45142389"
data-aanschafprijs="31950"
data-voertuigsoort="Personenauto"
data-merk="Audi"
data-model="Q5"
data-brandstof="Hybride benzine"
data-bouwjaar="2019"
data-kenteken="N635ZB"
data-btwmarge="marge"
data-dealerwebsite="https://www.abcautos.nl/"
data-dealernaam="ABC Auto's"
data-voertuigurl="https://www.abcautos.nl/occasions-kopen/45142389-audi-q5-45-tfsi-quattro-pro-line/">
</div>
<script src="https://leasemodule.nl/api/widget/v1/leasemodule.js?v=1.17.27" async></script>Standalone calculator – JavaScript widget
No vehicle data is required in the HTML for the standalone calculator. Visitors enter it themselves. Dealer settings are loaded through the integration ID.
<div
class="leasemodule-calculator"
data-type="standalone"
data-integration-id="YOUR-INTEGRATION-ID">
</div>
<script src="https://leasemodule.nl/api/widget/v1/leasemodule.js?v=1.17.27" async></script>WordPress plugin
A base plugin is available for WordPress websites. It allows calculators to be added with shortcodes, without manually adding HTML or JavaScript.
Install in WordPress
- Download the ZIP file using the button above.
- In WordPress, open Plugins → Add New Plugin → Upload Plugin.
- Select leasemodule-wordpress.zip, install it and activate the plugin.
- Open Settings → LeaseModule and enter the supplied integration ID and API key.
- Save the settings and click Test connection.
Settings
The integration ID identifies the LeaseModule customer. The API key is stored server-side in WordPress only and is never added to the public page or widget.
Available shortcodes
Vehicle calculator
[leasemodule_calculator
aanschafprijs="31950"
voertuigsoort="Personenauto"
merk="Audi"
model="Q5"
brandstof="Benzine"
bouwjaar="2021"
kenteken="AB123C"
btwmarge="btw"
dealerwebsite="https://www.abcautos.nl/"
dealernaam="ABC Auto's"
voertuigurl="https://www.abcautos.nl/occasions-kopen/45142389-audi-q5-45-tfsi-quattro-pro-line/"]Vehicle monthly payment
[leasemodule_monthly_price
aanschafprijs="31950"
voertuigsoort="Personenauto"
merk="Audi"
model="Q5"
brandstof="Benzine"
bouwjaar="2021"
btwmarge="btw"
dealerwebsite="https://www.abcautos.nl/"
dealernaam="ABC Auto's"
voertuigurl="https://www.abcautos.nl/occasions-kopen/45142389-audi-q5-45-tfsi-quattro-pro-line/"]Standalone calculator
[leasemodule_calculator type="standalone"]Fields and values
| Field | Type | Example | Description |
|---|---|---|---|
aanschafprijsRequired | number | 31950 | Positive amount in euros without a currency symbol or thousands separator. For business finance the supplied price is already excluding VAT; for consumer finance a passenger car includes VAT and 21% VAT is added to a VAT commercial vehicle. |
doelOptional | string | Auto | For the standalone consumer calculator: Auto, Motor, Truck, Motorhome, Caravan or Boat. |
voertuigsoortRequired | string | Personenauto | Use one of the defined vehicle type values. |
merkRequired | string | Audi | Vehicle make. |
modelRequired | string | Q5 | Vehicle model. |
brandstofRequired | string | Hybride benzine | Use one of the defined fuel values. |
bouwjaarRequired | integer | 2019 | Four-digit year of manufacture. |
kentekenOptional | string | N635ZB | Registration number; preferably remove spaces and hyphens in advance. |
btwmargeRequired | string | marge | Fixed value: btw or marge. |
dealerwebsiteRequired | url | https://www.abcautos.nl/ | Full HTTPS URL of the dealer website. |
voertuigurlRequired | url | https://www.abcautos.nl/occasions-kopen/45142389-audi-q5-45-tfsi-quattro-pro-line/ | Full HTTPS URL of the detail page containing the selected vehicle. |
dealernaamOptional | string | ABC Auto's | Dealer name. Centrally configured details remain authoritative. |
dealerplaatsOptional | string | Amsterdam | Dealer location. |
dealeremailOptional | info@abcautos.nl | Preferably linked centrally to the integration ID and not included in public HTML. | |
referenceOptional | string | 45142389 | Unique vehicle reference in the dealer’s system. |
Allowed fixed values
| Field | Allowed fixed values |
|---|---|
voertuigsoort | Personenauto, Bedrijfswagen, Bromfiets, Motorfiets, Vrachtwagen, Camper, Caravan, Brommobiel |
btwmarge | btw, marge |
brandstof | Benzine, CNG, Diesel, Elektrisch, Hybride, Hybride aardgas, Hybride benzine, LPG, LPG-G3, Overig, Waterstof |
For developers: REST API and custom application form
REST API
The REST API is designed for server-to-server integrations and offers complete design freedom. Always use HTTPS and store the API secret exclusively on the server.
Base URL
https://leasemodule.nl/api/v1Authentication headers
Authorization: Bearer YOUR-API-SECRET
X-LeaseModule-Integration: YOUR-INTEGRATION-ID
Content-Type: application/json
Accept: application/json| Endpoint | Purpose |
|---|---|
| POST/calculations | Final calculation for one vehicle. |
| POST/monthly-prices | Compact monthly payment for one vehicle. |
| POST/monthly-prices/batch | Monthly payments for multiple vehicles in one request. |
| POST/applications | Submit a finance application. |
| GET/widget/config | Retrieve widget settings and available products. |
| GET/health | Check API availability. |
POST /v1/calculations — Example request
{
"aanschafprijs": 31950,
"voertuigsoort": "Personenauto",
"merk": "Audi",
"model": "Q5",
"brandstof": "Hybride benzine",
"bouwjaar": 2019,
"kenteken": "N635ZB",
"btwmarge": "marge",
"dealerwebsite": "https://www.abcautos.nl/",
"dealernaam": "ABC Auto's",
"voertuigurl": "https://www.abcautos.nl/occasions-kopen/45142389-audi-q5-45-tfsi-quattro-pro-line/",
"reference": "45142389",
"business": {
"term": 72,
"down_payment": 0,
"final_payment": 0
},
"consumer": {
"term": 72,
"down_payment": 0
}
}Example response
{
"success": true,
"request_id": "req_01K2A4G7M8",
"calculation_id": "calc_8fd329",
"currency": "EUR",
"business": {
"available": true,
"monthly_amount": 523,
"term": 72
},
"consumer": {
"available": true,
"monthly_amount": 574,
"term": 72
},
"valid_until": "2026-07-17T23:59:59+02:00"
}Applications
Always use the calculation_id from the latest calculation when submitting. LeaseModule returns a unique application number that can be used to locate the application.
{
"calculation_id": "calc_8fd329",
"product": "business",
"vehicle_reference": "45142389",
"applicant": {
"first_name": "Jan",
"last_name": "Jansen",
"email": "jan@example.com",
"phone": "+31612345678"
},
"company": {
"name": "Example Mobility B.V.",
"kvk": "12345678"
},
"voertuigurl": "https://www.abcautos.nl/occasions-kopen/45142389-audi-q5-45-tfsi-quattro-pro-line/"
}Security
Checklist for a reliable implementation
- Use HTTPS for the website, widget and API.
- Store the API secret outside the web root, for example in an environment variable.
- Have every production and test domain registered by LeaseModule in advance.
- Validate vehicle fields server-side and do not rely solely on browser input.
- Cache vehicle listing results briefly, but never cache personal data or application requests.
- Use the central honeypot, timing, rate-limit and duplicate checks on application forms.
- Log request IDs and error codes, but not complete personal data or API secrets.
Troubleshooting
If something goes wrong, check the following items first.
| Problem | Possible cause and solution |
|---|---|
| Widget is not visible | Check the integration ID, registered domain, browser console and whether leasemodule.js is being blocked. |
| No monthly payment available | Check selling price, year, vehicle type and VAT/Margin. The vehicle may fall outside the configured acceptance criteria. |
| 401 Unauthorized | The Authorization header is missing or the API secret is invalid. Only renew keys through LeaseModule. |
| 403 Forbidden | The domain or product has not been enabled for this integration ID. |
| 422 Validation error | A required field is missing or contains an unsupported value. Review the errors array in the response. |
| 429 Too Many Requests | Too many requests are being sent. Use caching, the batch endpoint and respect Retry-After. |
Support
Need help? Contact LeaseModule and include the integration ID, relevant domain, page URL, time and request ID.