Quickstart
SDK 0.6.1+Connect Stripe, pick a price, type your app's URL scheme, turn it on. About five minutes, no code deploy.
Everything happens on the dashboard. There is no checkout page to build, no session endpoint to write, and — if your paywall already runs through the Fictura SDK — no app code to change.
Before you start
- Your app running Fictura SDK 0.6.1 or later
- A Stripe account with at least one recurring price (Products → your subscription plan)
- Your app's URL scheme — the
schemefield in yourapp.json, e.g.com.yourcompany.yourapp
Turn it on
Connect Stripe.
Dashboard → Setup → Connections → Stripe. Paste your secret key (sk_live_…, or sk_test_… while testing). The key is verified with a read of your account details, encrypted at rest, and never returned by any endpoint.
Configure the Web Checkout card.
Dashboard → Setup → Web Checkout. Leave the checkout page on Fictura hosts it; your Stripe plans appear in the dropdown as soon as Stripe is connected — pick one; keep countries at US unless you know better; and set the return deep link, e.g. com.yourcompany.yourapp://subscription/return. Saving mints your app's public checkout URL — worth opening in a browser once to see the hand-off work.
Flip the toggle.
Devices pick the change up on their next config refresh — app launch, foreground, or at most five minutes. The toggle stays disabled until Stripe is connected and a price is chosen, so it can never be switched on with nowhere to send anyone. Saving in hosted mode also registers Fictura's billing webhook on your Stripe account for you.
Test it
- On a US device (or simulator with a US region), open your paywall and tap subscribe. The system browser must open — if a payment sheet appears inside your app, stop; that build predates SDK 0.6.1.
- Pay. With a test-mode key, use card
4242 4242 4242 4242. - Return to the app. Within about fifteen seconds the account is premium, without a restart.
Roll it back
Flip the toggle off. Every device is back on the App Store sheet within one config refresh. No release, no review, no stranded users — devices holding an old checkout link see a page that tells them to head back to the app.
What about my paywall code?
Nothing to change for most paywalls. From SDK 0.6.1, the buy buttons in the block, flow, and served-HTML renderers check web checkout first and fall back to the store purchase when it doesn't apply. The one exception: single-screen locked templates (v3 configs) run the store purchase directly — put those users on a flow or served design if web checkout matters to you. A served design that wants explicit control can call window.__FICTURA__.openWebCheckout(); native code can call openWebCheckout() from the SDK.
To show or hide paid features in the UI, ask the SDK (0.7.0+):
import { Growth } from "@fictura/sdk";
if (Growth.isSubscribed()) {
// render the premium experience
}The answer is derived from Stripe's own webhooks, refreshes with the config, and fails closed. It is a rendering hint — a modified client can lie to itself — so anything that costs you money should also check server-side.
Gating server-side
If your backend decides what a user gets — quotas, model tiers, watermarks — it can ask Fictura directly instead of maintaining its own billing table:
curl https://api.fictura.co/api/v1/entitlements/<user_id> \
-H "x-api-key: gk_..."{
"ok": true,
"user_id": "8f14e45f-…",
"is_active": true,
"status": "active",
"product_id": "price_1TmKgS…",
"expires_at": "2026-09-10T18:22:41.000Z",
"will_renew": true,
"environment": "PRODUCTION"
}<user_id> is your own id for the user — the same one that rode the checkout URL. An unknown user answers status: "none" with a 200, so one code path handles everyone. The full contract is in the API reference.
Prefer to keep your own table? Feed it with the billing webhook instead — both stay in sync from the same events.