getOfferByBasePlanId

open fun getOfferByBasePlanId(productId: String, basePlanId: String): OfferInfo

Looks up a subscription offer by its Play Console base plan id.

Use this to pin a paywall row to a specific base plan (e.g. "monthly" vs "yearly") rather than relying on list order. When several offers share the base plan, the first is returned — prefer the base plan's own offer by checking isBaseOffer.

Return

The matching offer, or null.

Since

4.4.0

Parameters

productId

Subscription product id.

basePlanId

Base plan id configured in Play Console.