SDK Overview

One consistent purchase API. Available today for iOS, macOS and Android; other platforms are on the roadmap.

CashSDK wraps the platform store (StoreKit 2 on Apple, Play Billing on Android) behind a single, consistent API. Every SDK does the same three things: run a purchase, read entitlements, and keep a customer in sync across devices with identify. Transactions are verified server-side, so your client never has to trust the store on its own.

Pick your platform#

Platforms at a glance#

PlatformPackageNative layerStatus
iOSgithub.com/cashsdk/cashsdk-ios (SPM)StoreKit 2Available
macOS / Catalystgithub.com/cashsdk/cashsdk-ios (SPM)StoreKit 2Available
Androidcom.cashsdk:cashsdk-android (Gradle, Maven Central)Play Billing v9Available
React Nativecashsdk-react-nativeStoreKit 2 + Play BillingRoadmap
FluttercashsdkStoreKit 2 + Play BillingRoadmap
Unitycom.cashsdk.unity (UPM)StoreKit 2 + Play BillingRoadmap
Cordovacashsdk-cordovaStoreKit 2 + Play BillingRoadmap
Capacitorcashsdk-capacitorStoreKit 2 + Play BillingRoadmap
Webcashsdk-webStripe (and other web processors)Roadmap

The shared API#

The same calls power every integration. Configure once with your publishable key, then work with purchases and entitlements.

swift
import CashSDK

CashSDK.configure(publishableKey: "csk_pk_…")
CashSDK.shared.identify(userId: "8841", userToken: tokenFromYourBackend)

switch try await CashSDK.shared.purchase("pro_monthly") {
case .success(let entitlements):
  if entitlements.isActive("pro") { unlockPro() }
case .pending, .userCancelled:
  break
}

try await CashSDK.shared.restore()
kotlin
import com.cashsdk.CashSDK

CashSDK.configure(context = this, publishableKey = "csk_pk_…")
CashSDK.shared.identify(userId = "8841", userToken = tokenFromYourBackend)

val entitlements = CashSDK.shared.purchase(activity, "pro_monthly")
if (entitlements.isActive("pro")) unlockPro()

CashSDK.shared.restore()

The building blocks#

  • Configure: call once on launch with your csk_pk_… publishable key. Secret keys (csk_sk_…) are backend-only and must never ship in a client app.
  • Purchase: takes a product identifier, runs the native store flow, and verifies the transaction server-side before returning the customer's updated entitlements.
  • Paywalls: register(placement:) resolves and presents the paywall your team configured in the dashboard, so pricing and copy change without a release.
  • Entitlements: the access a customer has right now (pro, premium). Check isActive to gate features.
  • Identify: link the SDK to your own app_user_id so entitlements follow a customer across devices and platforms.

Billing backends#

Store purchases are only half the picture. CashSDK also reconciles revenue from web and merchant-of-record billing providers (Stripe, Paddle, Lemon Squeezy, and more) into the same entitlement and analytics model. See Billing overview to connect one.

Next steps#