You'll need a CashSDK workspace. Create one for free — free up to $5,000/mo in tracked revenue.
Quickstart
Install an SDK, model a product, and validate your first purchase.
This guide takes you from zero to a validated purchase. It should take about 15 minutes.
1. Get your API keys#
Every workspace has two kinds of keys:
| Key | Prefix | Used by |
|---|---|---|
| Publishable | pk_live_… / pk_test_… | Client SDKs (safe to ship) |
| Secret | csk_sk_… | Your backend, the CLI, and the MCP server |
Find them under Settings → API keys in the dashboard, or read more in Authentication.
2. Install the SDK#
// In Xcode: File → Add Packages…
// https://github.com/cashsdk/cashsdk-ios
import CashSDK
// build.gradle.kts
dependencies {
implementation("com.cashsdk:cashsdk-android:1.0.0")
}
npm install @cashsdk/react-native
flutter pub add cashsdk
npm install @cashsdk/web
3. Configure on launch#
Initialize CashSDK once, as early as possible, with your publishable key.
import CashSDK
CashSDK.configure(apiKey: "pk_live_...")
import com.cashsdk.CashSDK
CashSDK.configure(apiKey = "pk_live_...")
import { CashSDK } from "@cashsdk/react-native";
CashSDK.configure({ apiKey: "pk_live_..." });
4. Create a product#
Model a subscription in the dashboard, or create one from the terminal with the CLI:
cashsdk catalog add \
--product pro_monthly \
--entitlement pro \
--type subscription
Prefer to let an agent do it? Point Cursor, Claude Code, or Codex at the CashSDK MCP server and ask it to set up your catalog.
5. Show a paywall and purchase#
Fetch offerings, present your paywall, and complete a purchase. CashSDK handles the native store interaction and validates the receipt server-side.
let offering = try await CashSDK.offerings()
let result = try await CashSDK.purchase(offering.monthly)
if result.entitlements["pro"]?.isActive == true {
unlockPro()
}
val offering = CashSDK.offerings()
val result = CashSDK.purchase(offering.monthly)
if (result.entitlements["pro"]?.isActive == true) {
unlockPro()
}
6. Verify server-side (optional)#
Your backend can check entitlements or validate a receipt directly:
curl https://api.cashsdk.com/v1/receipts/validate \
-H "Authorization: Bearer csk_sk_..." \
-H "Content-Type: application/json" \
-d '{ "platform": "apple", "receipt": "MII...", "app_user_id": "u_812" }'