Available today: iOS (and macOS / Catalyst), Android, the web SDK (cashsdk-web,
cashsdk-react, cashsdk-node), Chrome extensions, and direct Mac apps that sell with
your own Stripe account. The React Native, Flutter, Unity, Cordova and Capacitor SDKs are
on the roadmap and are not published yet. Their pages describe the intended API, not a
package you can install.
SDK Overview
One consistent purchase API for iOS, macOS, Android, the web, Chrome extensions and direct Mac apps, with other platforms 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#
Swift and SwiftUI, built on StoreKit 2.
Kotlin coroutines over Play Billing v9.
Roadmap: one TypeScript API for iOS and Android.
Roadmap: a single Dart package for every target.
Roadmap: C# for games on iOS, Android, and desktop.
Roadmap: a plugin for Apache Cordova hybrid apps.
Roadmap: a native Capacitor plugin for Ionic and web apps.
Native macOS and Mac Catalyst on StoreKit 2.
Browser, React and Node.js packages, with the same entitlements.
Native Swift customer sessions and hosted Stripe checkout.
Manifest V3 pages and service workers, with the same customer access.
Keep your Stripe checkout. Read access from your backend without a client SDK.
Configure your store and verify a sandbox purchase.
Platforms at a glance#
| Platform | Package | Native layer | Status |
|---|---|---|---|
| iOS | github.com/cashsdk/cashsdk-ios (SPM) | StoreKit 2 | Available |
| macOS / Catalyst | github.com/cashsdk/cashsdk-ios (SPM) | StoreKit 2 | Available |
| Android | com.cashsdk:cashsdk-android (Gradle; 1.4.0 from GitHub until Maven Central carries it) | Play Billing v9 | Available |
| React Native | cashsdk-react-native | StoreKit 2 + Play Billing | Roadmap |
| Flutter | cashsdk | StoreKit 2 + Play Billing | Roadmap |
| Unity | com.cashsdk.unity (UPM) | StoreKit 2 + Play Billing | Roadmap |
| Cordova | cashsdk-cordova | StoreKit 2 + Play Billing | Roadmap |
| Capacitor | cashsdk-capacitor | StoreKit 2 + Play Billing | Roadmap |
| Web | cashsdk-web, cashsdk-react, cashsdk-node (npm) | Stripe and other web billing providers | Available |
| macOS with Stripe | CashSDKCommerce product of cashsdk-ios (SPM, 2.6.0 or later) | URLSession and the system browser | Available |
| Chrome extension | cashsdk-web/extension (npm) | Manifest V3 | Available |
| Stripe only | Server REST API, optional cashsdk-node | Your Stripe account | Available |
See Choose your platform for dashboard and MCP setup, and Go live with Stripe before you sell on the web, in an extension or in a direct Mac app.
The shared API#
The same calls power every integration. Configure once with your publishable key, then work with purchases and entitlements.
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()
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()
import { createCashSDK } from "cashsdk-web";
// The customer comes from a session your backend issues after its own sign-in.
const cashsdk = createCashSDK({ publishableKey: "csk_pk_…", environment: "production", getSessionToken });
await cashsdk.initialize();
const { entitlements } = await cashsdk.getEntitlements();
if (entitlements.some((e) => e.identifier === "pro" && e.active)) unlockPro();
On the web, purchases come from your payment provider rather than an app store. See Getting paid on the web.
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). CheckisActiveto gate features. - Identify: link the SDK to your own
app_user_idso entitlements follow a customer across devices and platforms.
New to the model? Read Concepts for how products, entitlements, offerings, paywalls, and customers fit together.
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.