If your store runs WooCommerce, Shopify, or Magento with the official Float plugin, instalment messaging is already included, so you don’t need to add it yourself. This page is for custom API integrations.
Add the widget
Place a script tag wherever the messaging should render, typically directly below the price:
Two widgets on one page, each calculating from its own price and term.
Parameters
Which terms are shown
Precedence isinstalments, then public_id, then the default of 3:
instalments=3,6 the line reads “Or as low as £100.00 over 6 months interest-free” and the modal’s worked example offers both terms. With public_id, Float looks up the term rule covering the price (your rules can differ by basket size) and uses its terms; the lookup is cached on Float’s CDN, so it adds no load to your page. With public_id the widget never guesses: if Float has no terms for the merchant, no rule covers the price, or the terms cannot be fetched (for example a Content-Security-Policy that blocks widgets.float.co.za), it renders nothing rather than advertise a term you may not offer. Pass instalments if you want the widget to show regardless.
The modal splits the example exactly as checkout splits a real plan: equal instalments with any rounding remainder on the last one.
An embed with neither parameter still renders: the line advertises 3 months, and the modal offers a generic set of terms with a note that options may differ by retailer. See Widget & modal implementation for that fallback, the sandbox and production hosts, and how to open the modal yourself.
Keep the price in sync
If the price can change without a page reload (a variant picker, a quantity stepper, a discount code), callfloatUpdate on the rendered element:
.float-w element, so check for it before calling. With several widgets on the page, scope the lookup to the product you’re updating:
<script> element also works, but floatUpdate avoids the re-fetch. Changing the src attribute on an existing script tag does nothing.
Handle missing or zero price
Don’t render the widget withprice=0 or blank. The script renders nothing at all in that case, rather than advertising £0.00. Suppress the widget for unpriced or out-of-stock items.
Multiple widgets on one page
Category, search, and “related products” pages can safely render as many widgets as they like. Each one is scoped to its own instance and calculates from its ownprice and instalments.
What’s included
The “How it works” link opens a modal that’s already wired up; you don’t need to link to the explainer page yourself or build a lightbox. The modal reflects the actual product price, so a £600 product shows a £600 worked example, and it uses the UK copy and card requirements.
The explainer modal for a £600 product embedded with instalments=2,3,4.
Does this replace the accepting-payments checkout flow?
Does this replace the accepting-payments checkout flow?
No, this widget is purely on-page merchandising. You still create a checkout and redirect the shopper as described in Accepting payments once they choose Float.
Which instalment plan does the explainer describe?
Which instalment plan does the explainer describe?
The first instalment is charged at the time of purchase and the remainder of the purchase amount is reserved on the card, with the remaining instalments charged on the same day each month. If your account is configured differently, render your own messaging from your merchant config instead.
Will it slow down my product pages?
Will it slow down my product pages?
The script is about 13 KB gzipped, served from a CDN with a long cache lifetime, and makes no API calls. The explainer modal is only fetched if a shopper actually opens it.