Recipe

Quote a Business Loan with the Python SDK

The Python SDK wraps the public quote endpoint. Construct the client, call quote.one_time(...) with an amount and term, and catch a RangeError for out-of-range inputs.

2 min read

PythonSDK
PublicNo token
weekly/…Frequency

Construct and call

from credicorp import PublicClient
credicorp = PublicClient()
quote = credicorp.quote.one_time(amount=300, term=30, frequency='weekly')
print(quote.total_repayable)

Handle out-of-range

from credicorp import RangeError
try:
    quote = credicorp.quote.one_time(amount=amount, term=term)
except RangeError:
    ...  # clamp to 50-500 / 14-84 and retry

The valid ranges are £50–£500 and 14–84 days.

Into an agent

Python is a common host for AI agents — pair this with the MCP assistant recipe so your agent quotes real figures and hands off to apply. See choosing an SDK.

Frequently asked questions

Does the Python SDK cover the partner ring?

Yes. Construct the partner client with your credentials and it handles token minting, caching and retries. The public client used here needs no credential for quotes.

What exception does an out-of-range quote raise?

A RangeError, which you catch to clamp the amount to 50-500 and the term to 14-84. The message carries the bound the engine enforced.

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.