Skip to content

Monetization

Butterbase includes built-in Stripe Connect support so you can sell subscriptions and one-time products to your app’s end users. This is separate from your own Butterbase subscription — it’s for monetizing the product you build.

  1. Onboard a Stripe Connect account for your app
  2. Define subscription plans or products with pricing
  3. Your end users subscribe or purchase through Checkout sessions managed by the platform
POST /v1/{app_id}/billing/connect/onboard

Returns accountId and onboardingUrl. Complete the setup in Stripe.

GET /v1/{app_id}/billing/connect/status

Returns whether Connect onboarding is complete and payouts are ready.

MethodPathPurpose
POST/v1/{app_id}/billing/plansCreate a subscription plan
GET/v1/{app_id}/billing/plansList plans (public catalog)
PUT/v1/{app_id}/billing/plans/{plan_id}Update plan fields

Create a plan:

POST /v1/{app_id}/billing/plans
{
"name": "Pro Plan",
"priceCents": 999,
"interval": "month",
"features": ["Unlimited projects", "Priority support", "Custom domain"]
}
MethodPathPurpose
POST/v1/{app_id}/billing/subscribeStart a subscription
GET/v1/{app_id}/billing/subscriptionCurrent subscription
POST/v1/{app_id}/billing/cancelCancel at period end

Subscribe:

POST /v1/{app_id}/billing/subscribe
{
"planId": "uuid-of-plan",
"successUrl": "https://yourapp.com/billing/success",
"cancelUrl": "https://yourapp.com/billing/cancel"
}

Returns a Stripe Checkout url for the user to complete payment.

For selling digital products, physical goods, or one-time access.

MethodPathPurpose
POST/v1/{app_id}/billing/productsCreate a product
GET/v1/{app_id}/billing/productsList products (public catalog)
PUT/v1/{app_id}/billing/products/{product_id}Update product

Create a product:

POST /v1/{app_id}/billing/products
{
"name": "Premium Template Pack",
"priceCents": 2999,
"description": "50+ premium UI templates",
"metadata": { "category": "templates" }
}
MethodPathPurpose
POST/v1/{app_id}/billing/purchasePurchase a product
GET/v1/{app_id}/billing/ordersList all orders
GET/v1/{app_id}/billing/orders/{order_id}Get order details
StatusMeaning
pendingCheckout session created, payment not yet completed
paidPayment successful
failedPayment failed
refundedPayment was refunded

Stripe sends Connect events to POST /webhooks/stripe/connect. Configure the endpoint and signing secret in your Stripe dashboard and set STRIPE_CONNECT_WEBHOOK_SECRET in the control API environment.

The platform handles:

  • checkout.session.completed (subscriptions and payments)
  • customer.subscription.updated / deleted
  • invoice.payment_succeeded / failed
  • payment_intent.payment_failed
  • charge.refunded
  1. Developer creates plan: POST /v1/{app_id}/billing/plans
  2. End user subscribes: POST /v1/{app_id}/billing/subscribe
  3. User completes payment in Stripe Checkout
  4. Webhook fires, subscription activates
  5. User can check status: GET /v1/{app_id}/billing/subscription

If you don’t need Connect, you can build checkout flows yourself using Stripe directly in a serverless function and store purchase state in your app tables.