Displaying Monthly Cost

This document describe a set of best practices when using Wasa Kredit APIs to display leasing/rental monthly cost on an e-commerce site.

Variables of monthly cost

The monthly cost is a function dependent on financed amount, financial service fees, type of offering (leasing or rental), if insurance is included, contract length configuration. The financed amount should be set on to the price of the product or cart value being displayed excluding VAT. All other mentioned parameters are stored and managed for each partner by Wasa Kredit.

API-documentation

Read more about how to use API methods described in this document on https://developer.wasakredit.se/api-documentation.

Product listing page

The simplest way to retrieve and display monthly cost on pages with multiple products is to use the Calculate Monthly Cost API-method. Use one request with multiple product prices and it will return a list of all the monthly costs for each one, which will avoid multiple round trip times and reduce load to Wasa Kredits servers.

Product listing page example

Product listing page example

Product detail page or checkout page

On a product detail page or checkout page a customer might be interested about the leasing option but wants to know more about the benefits and terms. For these reasons we have a Leasing Monthly Cost Widget API-method which returns an embeddable html-code for displaying a stylized monthly cost information plus a popup that have detailed information about how leasing works and the benefits and costs.

This widget is intended to be used on a single product detail page or checkout page as it’s fairly large amount of html, CSS and JavaScript to load if you have multiple products on a page. Not all the information displayed is accessible through public API methods in json-format, for instance the range of valid financed amount and residual value (Swedish: restvärde) and other information is only provided through the widget html. We don’t recommend that you parse (or scrape) the widget html for information as it’s subject to change.

The widget can be displayed in a variety of size formats using the format parameter. Below are examples of them:

large

large

small

small

large-no-icon

large-no-icon

small-no-icon

small-no-icon

Displaying monthly cost for multiple contract lengths

If you want to display monthly costs for multiple contract lengths (not just the default option) you can use Leasing Payment Options API-method, this is sometimes used by our existing partners on checkout pages for the payment option selection.

Bild7.png

Caching

Generally you can cache the API-methods described in this document per partner and financed amount. Parameters that could invalidate the cache are administered by Wasa Kredit for each partner and include financial service fee, default contract length, change in contract lengths available or if insurance included. These managed parameters are usually set once per partner and in rare circumstances change. It’s recommended to have an absolute cache expiration after a maximum of one day.

Error handling

Set a propriate timeout to avoid long loading time on your store pages and silently fail without showing monthly cost if a timeout or other unexpected error occurs.