Skip to main content
Connect your Play Console first (service account, real-time developer notifications and catalog sync): see Google Play Setup. ZeroSettle works alongside Google Play Billing. You can use web checkout as your primary payment method and Play Billing as a fallback, or offer both options side-by-side.

How It Works

When syncPlayPurchases is enabled (the default), the SDK automatically:
  1. Installs a PurchasesUpdatedListener and connects to Google Play Billing
  2. Forwards every completed Play purchase to your ZeroSettle backend (POST /v1/iap/play-store-transactions/)
  3. Merges Play Store entitlements with web checkout entitlements
  4. Acknowledges purchases per the acknowledgement model described below, retrying failed syncs via a persistent sync queue
This means a user who purchases via the Play Store will have their entitlements available via ZeroSettle.entitlements — alongside their web checkout purchases.

Configuration

Play purchase sync is enabled by default:
If RevenueCat owns native billing and you do not want native purchases in ZeroSettle’s numbers, set syncPlayPurchases = false. Leaving it on is also supported. See the RevenueCat page for the full comparison. See RevenueCat Integration.

User Choice Billing

If your app and market are enrolled in Google’s User Choice Billing (UCB), the SDK exposes a StateFlow you can use to adapt your purchase UI:
isUcbEnabled is tenant- and market-scoped — it resets on configure(), not on logout(), and starts false until identify() completes bootstrap.

Purchasing via Play Billing

Use purchaseViaPlayBilling() to trigger a native Play Billing purchase. Like purchase(), it is awaitable and returns a Result<CheckoutTransaction>. Requires syncPlayPurchases = true.

Hybrid Purchase Flow

A common pattern is to offer web checkout as the primary option with Play Billing as a fallback:
The Product model carries Play-specific fields (all nullable, populated when the product is configured in Google Play Console):
  • product.playProductId — the Play Console product id
  • product.playBasePlanId — the Play base plan id (subscriptions)
  • product.playStorePrice — the Google Play price from your synced Play catalog, null until the product is linked to a Play product with a price

Sync Events

When syncPlayPurchases is enabled, the SDK syncs Play purchases automatically. Observe sync outcomes via ZeroSettle.events — there is no delegate interface on Android:
Sync failures don’t affect the Play purchase itself. The user still gets their purchase through Google. The sync is retried automatically via the SDK’s persistent sync queue.

Entitlement Sources

Entitlements track where each purchase came from:
Both sources are merged into a single entitlements list. Your app doesn’t need to treat them differently.

Cross-account ownership conflicts

If a Play purchase is already owned by a different ZeroSettle account, the SDK does not silently transfer it. It surfaces a PendingClaim on ZeroSettle.pendingClaims; the host app resolves it explicitly with ZeroSettle.transferPlayOwnershipToCurrentUser(productId).

Account tokens and obfuscatedAccountId

When a user is signed in, the Android SDK sets obfuscatedAccountId on the Play purchase to an account token derived from that user. If the purchase is later synced under a different signed-in user, ZeroSettle re-attributes it to the token’s user only when that user has synced before and the purchase has no owner yet. Otherwise the usual claim flow applies. Do not set your own obfuscatedAccountId when you use the ZeroSettle Android SDK.

One-time products you haven’t linked yet

If a customer buys a Google Play one-time product that isn’t linked to a product in your ZeroSettle catalog, ZeroSettle can’t tell whether it’s a consumable or a non-consumable. It records the purchase and its revenue but grants no lasting access, so a consumable pack never turns into permanent access by mistake. The sync call answers owned: true with no entitlementId, and the SDK acknowledges the purchase as usual. The dashboard’s catalog sheet shows how many purchases are waiting on each unlinked product. When you link it, ZeroSettle finishes those purchases: a non-consumable grants access to each buyer, and a consumable needs nothing more.

Acknowledgement model

Google Play refunds a purchase that is not acknowledged within 3 days, so the order in which the SDK finalizes a purchase matters. The SDK acknowledges non-consumables and subscriptions, and consumes consumables so the buyer can purchase them again. Set strictAck = true in ZeroSettleConfig only if you would rather risk an auto-refund than ever acknowledge an unvalidated purchase.

Requirements

Next Steps

Quickstart (Android)

Full Android setup guide

User Identity

How to identify users across purchases