2 min read
Why flags exist
The platform ships features behind flags so they can be turned on carefully and turned off instantly if needed. A flagged endpoint is always deployed, but its data is only exposed when the flag is on. This is why the Slice billers endpoint can be live yet return no billers — the flag governs availability, not the route.
The graceful-off contract
A flag-gated public endpoint returns a clean, well-formed response when off — not a 500, not a hang. For billers that means an empty list with a clear signal. Your job is to treat "no data" as a normal state: hide the biller picker, skip the section, and move on. Never assume a gated endpoint will always return content.
Writing tolerant integrations
Call flag-gated endpoints unconditionally and branch on the presence of data, not on the HTTP status alone. This keeps your UI correct whether the feature is on or off, and means a flag flip on our side needs no change on yours.
Frequently asked questions
Why did the billers endpoint return no billers?
Because Slice billing is currently flag-gated off. The endpoint is live but exposes data only when the flag is on. Treat an empty list as a normal state and render nothing.
Will a gated endpoint ever return an error when off?
No. The contract is a clean, well-formed unavailable response — never a 500 or a hang. Branch on the presence of data.
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.