2 min read
Construct and call
Point the public client at the hub and call the quote method with an amount and term within the engine range:
$credicorp = new Credicorp\\PublicClient();
$quote = $credicorp->quote()->oneTime(amount: 300, term: 30, frequency: 'weekly');
echo $quote->totalRepayable;
Handle the range error
An out-of-range amount or term surfaces as a typed range exception rather than a raw 422 — catch it and clamp:
try {
$quote = $credicorp->quote()->oneTime(amount: $amount, term: $term);
} catch (Credicorp\\RangeException $e) {
// amount 50-500, term 14-84 — clamp and retry
}
When to drop to raw HTTP
For a single public read like this, raw HTTP is also fine — see the quote-widget recipe. The SDK earns its keep on partner flows with token and retry handling. See choosing an SDK.
Frequently asked questions
Does the PHP SDK need a token for quotes?
No. Quotes are on the public ring, so the public client needs no credential. You only authenticate the SDK when you use the partner-ring methods.
How does the SDK surface the 422 range error?
As a typed RangeException rather than a raw HTTP error, so you can catch it and clamp the amount (50-500) or term (14-84) idiomatically.
Related reading

Quote a Business Loan with the Node SDK
The Node SDK exposes the public quote endpoint as a typed async call. Await a quote for an amount and term; a…
Read →
Render a live Business Loan quote widget
Wire a small front-end control to the public quote endpoint so visitors get a live, accurate Business Loan…
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.