Stripe subscriptions
Adds plans (each linked to a Stripe price) and subscriptions. A Plans and billing page lets people pick a plan and pay on Stripe's secure checkout. Stripe then tells the app what happened through a signed webhook (checkout completed, invoice paid or failed, subscription changed or cancelled), and only the server marks a subscription active. Manage billing opens Stripe's customer portal to change card, switch plan or cancel. Rules stop anyone marking their own subscription paid. Staff manage plans and see every subscriber.
What it adds to your app
Tables plan and subscription (two starter plans). BillingPanel component on a Plans and billing page. A Stripe-signed webhook that applies checkout, invoice and subscription events. Server functions: checkout, billing settings and a manual check with Stripe. A staff page for plans and subscribers.
Tables
planname, description, price, currency, interval, stripe_price_id, features, active, …subscriptionsubscriber_id, plan_id, status, sync, stripe_session_id, stripe_subscription_id, stripe_customer_id, current_period_end
Pages
/billingPlans and billing (‹subscriber_role›)/subscriptions-adminSubscriptions (@staff)
Components
BillingPanelPlans to choose from, the current subscription and Stripe billing settings
Rules on every write
subscriptionA new subscription starts as pending until Stripe confirms it.subscriptionOnly Stripe can change a subscription.
How its workflows run
Each one is a server workflow in your project: it runs on its trigger, with retries, and its runs show in the builder's log.
- Start a Stripe Checkout for a plan
When the app calls it:
server function (‹subscriber_role›). Then: Look up plan, then Call api.stripe.com, then Create subscription. - Apply Stripe's subscription events
When a webhook arrives:
webhook stripe-subscription-events. Then: Look up subscription, then Update subscription. - Check a subscription with Stripe (fallback)
When the app calls it:
server function (‹subscriber_role›, @staff). Then: Look up subscription, then Call api.stripe.com, then Update subscription. - Apply what Stripe said about a subscription
When a row changes:
subscription updated, when sync is requested. Then: Update subscription. - Open Stripe's billing settings for a subscriber
When the app calls it:
server function (‹subscriber_role›). Then: Look up subscription, then Call api.stripe.com. - Tell the subscriber their plan is active
When a row changes:
subscription updated, when status is active. Then: Notify.
Set it up
It merges into the contract of an app you already have. Nothing is overwritten: a name you already use is refused until you pass a prefix.
- Pick the project
Use the button above, or ask your coding agent with the Appbricx MCP server connected (quickstart).
- Point it at your tables and roles
Leave out the ones with defaults; a wrong one is refused with the options your app has.
Param What it is Example subscriber_roleThe role whose people buy a plan (their own table is the subscriber). Optional. member - Connect what it calls
add the STRIPE_SECRET_KEY secret (project settings); add the STRIPE_WEBHOOK_SECRET secret (project settings). A Stripe account with a recurring price for each plan (paste each price id into the plan). A Stripe webhook endpoint at the URL get_contract lists for stripe-subscription-events (Backend, API in the builder), with its signing secret in STRIPE_WEBHOOK_SECRET.
- Preview, then apply to dev
A dry run shows the diff and the check report; applying it changes your dev environment only.
- Deploy
When dev looks right, deploy. Production gets a snapshot first, so you can roll back.
Use it with your coding agent
The agent reads the template, runs a dry run, shows you the diff and applies it.
Add the Stripe subscriptions template (slug "stripe-subscriptions") to my Appbricx project. Read it with get_template, run use_template with dry_run first and show me the diff, then apply it. Ask me where it attaches if you can't tell from my contract (subscriber_role: who subscribes).{
"tool": "use_template",
"arguments": {
"slug": "stripe-subscriptions",
"project_id": "<your project id>",
"params": {
"subscriber_role": "member"
},
"dry_run": true
}
}appbricx templates use stripe-subscriptions --param subscriber_role=member --dry-runWorks with
The services this template calls. Each page lists every action and what connecting it takes.
Goes well with

One-off payments
Take a card payment for any record (a booking, an order, an invoice) through Stripe Checkout, confirmed by the server.

Razorpay payments
Take a payment in INR for any record (a booking, an order, an invoice) through a Razorpay Payment Link: UPI, cards, netbanking and wallets, confirmed by Razorpay's signed webhook.

SaaS starter (Stripe)
B2B SaaS starter with a public landing page, sign-up, workspaces and teams, plan limits and Stripe subscription billing confirmed by signed webhooks.


