Skip to main content

Payments with Stripe

Stripe is how your Instroc app takes money: one-time checkouts, subscriptions, and custom payment flows. This page walks through connecting Stripe, what your app can do once it is connected, how payments are recorded, and how to gate features behind a purchase. Stripe is available on every plan, including Free, so you can build and test a payment flow before you ever upgrade.

Connecting Stripe

Open your project's Workspace view, go to Integrations, and press Connect Stripe on the Stripe card. You will first choose your business country. Pick carefully, because the business country cannot be changed on a connected account; the only way to switch is to disconnect Stripe and connect again. From there you continue into Stripe's own hosted onboarding, where you provide your business details directly to Stripe.

There are no API keys to find or paste. When onboarding completes you will see the toast "Stripe connected. Your app can now accept payments." If Stripe still needs to verify your details, the card shows a pending state ("Stripe is finishing verification...") until verification finishes. You can keep building in the meantime.

You are the merchant of record

Payments go straight to your own Stripe account. Instroc never touches your funds and never sits in the flow of money; the platform only wires your app to your account. That also means the business side of payments lives in your Stripe dashboard: refunds are issued there, payout schedules are set there, and the payment methods your checkout accepts come from your Stripe dashboard settings.

What your app can do

Once Stripe is connected, ask Roc for the payment flow you want. Your app can offer:

  • One-time checkout for a single purchase, like a product, a booking deposit, or a lifetime plan.
  • Subscriptions for recurring billing, like a monthly membership.
  • Custom payment flows when you need finer control than a standard checkout page.

Checkout opens in a new tab. That is by design, so the payment page always runs full screen rather than inside the app preview.

Example prompts that work well:

Add a $29 checkout for the premium plan. After payment, unlock the templates page.
Add a monthly subscription at $12/month for members. Members get access to the workouts library.

Payments land in your database automatically

When a payment is confirmed, the platform records it in your app's own private payments table. You never build webhook handlers for Stripe, and you should not try to; the platform already listens for Stripe's confirmations and writes the row for you. Your app just reads the table.

caution

Do not ask Roc to build custom Stripe webhook handling. Confirmed payments arrive in the payments table automatically, and a hand-rolled handler would only duplicate or conflict with that.

Gating features behind a purchase

The payments table is private, which means each signed-in user can only read their own rows, and the buyer's user id is stamped server-side when the payment is recorded. That makes the access check simple: query the table, and if a matching payment comes back, the user has paid.

import { useQuery } from '@instroc/data';

function PremiumGate({ children }: { children: React.ReactNode }) {
const { data: payments, loading } = useQuery('payments');

if (loading) return <p>Checking your access...</p>;
if (payments.length === 0) return <p>Upgrade to premium to see this.</p>;
return <>{children}</>;
}

Because the check depends on knowing who the user is, users must sign in before they check out. Roc sets flows up this way by default, and it is worth keeping: an anonymous purchase cannot be tied back to an account later. See Authentication for how sign-in works, and Security rules for how private tables behave.

Billing and rates

Calls your app makes through the Stripe integration count as integration calls and bill to your Instroc Cloud usage, not your AI credits. Payment actions also run under tighter rate limits than other integration calls. Rates are on the Cloud billing page. Stripe's own processing fees are separate and are set by Stripe on your Stripe account.

Managing the connection

The Stripe card in the Integrations panel shows your connection status and lets you disconnect. For everything money-related after that, refunds, disputes, payouts, and accepted payment methods, head to your Stripe dashboard. For an overview of all available integrations, see the Integrations overview.