2 min read
List products
{:ok, %{status: status, body: body}} =
Req.get("https://api.credicorp.co.uk/public/v1/products",
headers: [{"accept", "application/json"}],
receive_timeout: 10_000)
if status >= 400, do: raise(body["error"]["code"])
products = body["data"]Use Req (or Finch/Tesla) — it decodes JSON automatically. In a Phoenix app, wrap the call in a context module and cache the catalogue in ETS or Cachex.
Use the sandbox in development
Point the base host at https://sandbox.credicorp.co.uk/public/v1 in development and CI, and at https://api.credicorp.co.uk/public/v1 in production, driven by one environment variable. See choosing a base URL.
Next steps
From here, request a quote, submit an enquiry, and send applicants to apply. Handle errors with the shared error envelope.
Frequently asked questions
Req, Tesla or HTTPoison?
Req is the modern default with JSON decoding built in. Tesla suits middleware-heavy clients; any of them handle these calls fine.
How do I handle errors in Elixir?
Check the status code and read the error object from the body — error.code is the stable machine string to branch on. The pattern is identical across every endpoint.
Related reading

Quickstart: choose the right base URL — sandbox vs production
Every Credicorp API integration should read its base host from configuration, never hard-code it. Development…
Read →
Quickstart: get an indicative loan quote from the public API
POST /public/v1/quote turns an amount and term into an illustrative repayment. Send the requested amount and…
Read →
Quickstart: handle Credicorp API error responses
Every Credicorp API error uses the same envelope: { error: { type, code, message, request_id } }. Branch on…
Read →
Quickstart: your first Credicorp public API call with curl
The fastest way to see the Credicorp public API working is a single curl call to GET /public/v1/products. The…
Read →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.