Requires iOS 17.0+, Swift 5.9+, and Xcode 15.0+. See Installation if you haven’t added the package yet.
Configuration
Configure the SDK early in your app’s lifecycle.configure() is synchronous. Then call bootstrap() to fetch products and restore entitlements:
bootstrap() to automatically:
- Fetches your product catalog
- Warms up the first product’s
PaymentIntentfor instant sheet opens - Restores entitlements
Configuration Options
| Parameter | Default | Description |
|---|---|---|
publishableKey | Required | Your publishable key from the dashboard |
syncStoreKitTransactions | true | Set to false if using RevenueCat |
Sandbox vs Live Mode
Your publishable key prefix determines the mode:- Sandbox (
zs_pk_test_): Use for development. No real charges. - Live (
zs_pk_live_): Real payments processed.
Manual Product Fetch
If you need to refresh products later, you can fetch them manually:fetchProducts() returns a ProductCatalog containing both the product list and remote configuration. Products are also cached in ZeroSettle.shared.products for convenience.
Make a Purchase
Payment Sheet
Present a checkout sheet with Apple Pay and card support. The checkout mode (embedded webview, Safari VC, or external Safari) is controlled by your remote config on the dashboard —checkoutSheet handles all modes automatically.
checkoutSheet, including preloading, custom headers, and UIKit usage.
Handle Universal Link Callback
For Safari-based checkout modes, the result comes back via universal link. Add the.zeroSettleHandler() modifier to your root view:
onOpenURL and onContinueUserActivity automatically.
For UIKit apps, handle it manually in your SceneDelegate:

