Quickstart

Quickstart: Test your integration against the sandbox

The sandbox returns deterministic data, so you can assert on exact values in CI without your tests flaking. This recipe shows the exact code, uses only the unauthenticated public ring, and links out to the endpoints and the application flow so the reader always has a next step.

2 min read

deterministicSame input, same output
CI-safeLooser limits
no side effectsHammer freely

Point tests at sandbox

BASE = 'https://sandbox.credicorp.co.uk/public/v1'

def test_products_have_amount_range():
    data = requests.get(f'{BASE}/products').json()['data']
    assert data, 'catalogue should not be empty'
    for p in data:
        assert p['min_amount'] < p['max_amount']

Snapshot with confidence

Because sandbox fixtures are stable, you can snapshot a full response and assert it byte-for-byte. If a snapshot changes unexpectedly, the API contract changed — exactly what you want a test to catch.

Never test against production

Production data moves and its limits are tighter. Keep CI on the sandbox so a test run never submits a real enquiry or trips a live rate limit.

Frequently asked questions

Is sandbox data realistic?

It mirrors the shape and ranges of production while staying fixed, so it is realistic enough to test structure and edge cases without moving underneath you.

Can I run these tests in CI?

Yes — that is the point. Sandbox has looser limits and no side effects, so it is safe to run on every commit.

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.