2 min read
List products
The whole call, including error handling, fits on a screen:
import requests
BASE = 'https://api.credicorp.co.uk/public/v1'
def list_products():
r = requests.get(f'{BASE}/products',
headers={'Accept': 'application/json'},
timeout=10)
body = r.json()
if r.status_code >= 400:
err = body.get('error', {})
raise RuntimeError(f"{r.status_code} {err.get('code')}: {err.get('message')}")
return body['data']
for product in list_products():
print(f"{product['name']} \u2014 up to \u00a3{product['max_amount']:,}")
Async with httpx
If your service is async, httpx uses the same interface:
import httpx
async def list_products():
async with httpx.AsyncClient(base_url=BASE, timeout=10) as client:
r = await client.get('/products',
headers={'Accept': 'application/json'})
r.raise_for_status()
return r.json()['data']
Configuration
Read the base host from the environment so the same code runs against sandbox and production:
import os
BASE = os.environ.get('CREDICORP_BASE',
'https://sandbox.credicorp.co.uk/public/v1')
Frequently asked questions
requests or httpx?
Use requests for simple synchronous scripts. Reach for httpx when you need async, HTTP/2 or a shared connection pool inside a FastAPI or asyncio service.
How do I retry safely?
Wrap the call in a retry with exponential back-off that only retries on 429 and 5xx. The rate-limit recipe shows the exact pattern.
Does the response include pagination?
List endpoints that can return many rows include a next_cursor. See paging through list results.
Related reading

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 →
Quickstart: call the Credicorp public API from Node.js
Node 18+ ships a global fetch, so you can call the Credicorp public API with zero dependencies. This…
Read →
Quickstart: call the Credicorp public API from PHP
You can call the Credicorp public API from PHP with the built-in cURL extension and no Composer packages…
Read →
Quickstart: paginate through list results with a cursor
Credicorp list endpoints use cursor pagination: follow next_cursor until it is null. Cursor paging is stable…
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.