Quickstart

Quickstart: embed a product picker with the public API

A product picker is the simplest high-value embed: fetch the catalogue, render options, link to apply. Because the product list needs no auth, the whole widget is a self-contained snippet you can drop into any page, with every option linking to the real application flow.

2 min read

client-sideNo backend needed
links outEvery option → apply
a11ySemantic, keyboard-friendly

The embeddable snippet

<div id="cc-picker"></div>
<script>
(async () => {
  const base = 'https://api.credicorp.co.uk/public/v1';
  const { data } = await (await fetch(base + '/products')).json();
  const el = document.getElementById('cc-picker');
  el.innerHTML = data.map(p =>
    `<a class="cc-card" href="https://clients.credicorp.co.uk/register?product=${p.id}">` +
    `<strong>${p.name}</strong>` +
    `<span>\u00a3${p.min_amount.toLocaleString()}\u2013\u00a3${p.max_amount.toLocaleString()}</span></a>`
  ).join('');
})();
</script>

The widget lists live products and links each one to apply with the product pre-selected. Style .cc-card to match your site.

Make it robust

Wrap the fetch in a try/catch and render a plain link to business loans on failure, so a transient API blip never leaves an empty box on your page.

Frequently asked questions

Does the widget need a backend?

No. The product list is public and CORS-enabled, so the whole picker runs client-side. Add a backend only if you want caching or to shape the data.

How do I pre-select a product on apply?

Pass the product id as a query parameter on the register link, as the snippet does. The application flow reads it to pre-select the product.

Funding for UK limited companies

Credicorp lends to your company, not to you personally — short-term working capital with no personal guarantee. See what your business could access.