Sell with Stripe, unlock every app.
Keep your Stripe checkout. CashSDK reads your Stripe account's signed events and turns each subscription and payment into the same entitlements your web, iOS and Android apps already check.
Your existing Checkout
const session = await stripe.checkout.sessions.create({
mode: "subscription",
line_items: [{ price: "price_…", quantity: 1 }],
subscription_data: {
metadata: { cashsdk_user_id: user.id },
},
success_url: "https://app.example.com/billing/return",
cancel_url: "https://app.example.com/pricing",
});How it works
Four steps, no new checkout.
Your server keeps creating Stripe sessions. CashSDK listens and keeps each customer's access in step with what they paid for.
Connect Stripe
Paste a restricted key in the Marketplace and add the webhook URL CashSDK shows you to your Stripe account.
Import your prices
Pick your Stripe prices in the dashboard. CashSDK creates the products and attaches the entitlement you choose.
Name the customer
Put your user id in the subscription metadata as cashsdk_user_id, or as client_reference_id on a one-time Checkout Session.
Read access anywhere
The web, iOS and Android SDKs and your server see the same entitlements for that user id.
On the return page
Wait for access, not for a reload.
Stripe sends its events a few seconds after the payment. The web SDK waits for the entitlement to arrive, so the customer lands on a page that already shows what they bought.
- Returning from Checkout never grants access by itself
- Every event is signature checked and applied once
- A late or repeated event cannot shorten a paid period
billing/return
const { active } = await cashsdk.waitForEntitlement("pro", {
timeoutMs: 60000,
});
if (active) showWelcome();
else showStillProcessing(); // the event has not arrived yetSelf-serve billing
Send customers to Stripe's portal.
Customers update their card, switch plans or cancel in Stripe's hosted Customer Portal. CashSDK only ever opens the portal for the signed-in customer's own Stripe account, and the change comes back as a signed event.
- From the browser with a session scoped to billing
- Or from your server with cashsdk-node
- In React, useBillingPortal does it from a click
Manage billing
const { url } = await cashsdk.openBillingPortal({
returnUrl: "https://app.example.com/account",
});
location.assign(url);What it handles
The parts of Stripe that decide access.
One customer everywhere
Use the same user id on the web and in your apps, and a Stripe subscriber is Pro on every platform.
The whole subscription life
Trials, renewals, cancel at period end, failed renewals with a retry grace, and refunds.
One-time purchases
A paid one-time Checkout Session unlocks lifetime products, one purchase per line item.
Plans with add-ons
Each item on a subscription grants its own product, and a full refund ends all of them.
Revenue in one place
Stripe revenue and refunds land in the same charts as App Store and Google Play. Trials stay out of paid MRR.
Native apps included
The iOS and Android SDKs read Stripe access for the same user, and never show a Stripe price as an in-app product.
Questions
Before you connect Stripe.
Yes. Choose Stripe only in onboarding, connect your account and keep your Checkout. Your backend reads verified customer entitlements over REST. No store credentials, browser origins or client SDK installation is required.
No. Keep your Checkout or Billing setup. Connect Stripe to CashSDK, add the product with its Price ID, and put your user id on the purchase: cashsdk_user_id in the subscription's metadata, or client_reference_id on a one-time Checkout Session. A Payment Link cannot put your user id on a subscription, so link that Stripe customer to your user in the dashboard. Stripe's signed events do the rest.
Subscription created, updated and deleted events grant, renew and end access. Paid one-time Checkout Sessions unlock lifetime products. A full refund ends what it paid for. A partial refund only adjusts revenue.
While Stripe retries the card, the customer keeps access for one week from the start of the unpaid period. A successful retry restores the new period. If Stripe gives up, access ends.
Yes, when your apps identify the customer with the same user id. The native SDKs read the same entitlements, so a subscription bought on your website unlocks the app.
Yes. The web SDK, the Chrome extension adapter and the Mac client create a hosted Stripe Checkout for a package in your offering: subscriptions and one-time products, with free trials from your intro offers. Your own Checkout keeps working too.
Add your live restricted key as the Production connection, next to the Sandbox one. Register its own webhook URL in Stripe's live mode, import your live prices and switch your server to a live CashSDK key. Sandbox keeps working for tests.
Connect your Stripe account.
Create an app, connect Stripe in the Marketplace and import your prices.