fetchAndCacheCustomProducts

suspend fun fetchAndCacheCustomProducts(candidateIds: Set<String>, required: Boolean)(source)

Fetches custom (store == CUSTOM) products from the Superwall /products endpoint and caches them so downstream lookups resolve them from cache instead of Google Play Billing. Ids that are already cached, empty, or absent from /products are left untouched (the latter fall through to billing).

Parameters

candidateIds

The product identifiers that may be custom products.

required

When true — a paywall declared these ids as custom products — a /products failure is rethrown so the caller can surface a product-load failure. When false — a best-effort probe where the ids may well be Play products — the failure is logged and swallowed so the ids fall through to billing.