Skip to main content
Call POST /v1/quotes/cost/preview with a quote total to get indicative monthly payments and widget URLs. See the API reference for the full request and response schema. Every successful response includes links.loanIndicationWidget with two ready-to-use URLs:
Both URLs have the amount query parameter set to the totalInclTax from the request — the exact total the customer is financing. They are ready to use as-is. Do not hardcode a fixed amount; always use the value returned by the API. When you render representative examples from data.representativeExamples (in custom UI or alongside a widget), display the mandatory text_warning from data.content prominently — for example “Let op! Geld lenen kost geld”.

Screenshot

Use links.loanIndicationWidget.png directly in an <img> tag:
The image is rendered on-demand by Prets. You do not need to generate or host it yourself.

Financing Snapshot

Drop a single <script> tag where you want the widget to appear. Set src to your Prets domain — no CDN setup needed. Use the amount from links.loanIndicationWidget.url.
The script injects an iframe that displays 3 financing cards for the given amount. The iframe resizes automatically to fit its content. Set data-amount to the totalInclTax from the quote.

Financing Explorer

The Financing Explorer adds interactive controls so customers can adjust the loan amount, down payment, and loan duration before clicking through to onboarding.
Set data-amount to the totalInclTax from the quote.

AFM banner

Both widgets paint the mandatory Let op! Geld lenen kost geld warning inside the widget chrome. That is the advertisement — do not rely on a page-level banner above the iframe. The warning is AFM’s own artwork when any official format clears the 10% share, centred at the top of the widget in the image’s original ratio. Its height is at least 10% of the financing-offer cards plus the warning itself (art. 2:2 Nrgfo, inclusief waarschuwing). The share is measured on card height only — not padding, gaps, or other chrome: one card on the snapshot, three on the explorer. It spans the widget’s content column, which on desktop sits inside the card padding. When no official artwork can reach that share, the widget paints the full waarschuwingstekst at the top instead (art. 2:2(6) Nrgfo), scaling the type if body size is too short. When even that cannot be placed, the shortened text appears at the bottom of the advertisement in the same size as the body copy (art. 2:2(7) Nrgfo). At the sizes these widgets render, the image path is the normal case; the text fallbacks are there for unusually tall embeds. Because width and a fixed ratio already decide the height, the widget picks whichever of AFM’s published formats keeps that 10% share at its current size — a short snapshot gets a single-line banner, a tall explorer on a phone gets the stacked one. Expect the banner to change shape with the widget, and do not restyle it: the black border is part of AFM’s file, and the warning may be scaled but never redrawn. Turn the in-widget banner off only when the host page already shows the warning itself:
data-show-afm defaults to on. ?show_afm=false is the equivalent query on the widget URL.

Keeping the amount in sync

The amount query parameter is what drives the monthly cost displayed in the widget. It must always match the total the customer is actually financing.
  • Use the amount from links.loanIndicationWidget.url or links.loanIndicationWidget.png directly — both are already correct.
  • If the quote total changes — for example, the customer adjusts line items — call POST /v1/quotes/cost/preview again and use the new links from the updated response.
  • Do not hardcode an amount. A fixed value will show costs that do not match the customer’s actual quote.