Docs / wallet / Monetization

Monetization

typesince 0.2.6not for built apps

Type: a built app's monetization (paywall) config — Stripe and/or AGENT-token payment.

import type { Monetization } from 'flowstack-sdk'

The paywall/pricing shape read by getMonetization and written by setMonetization. enabled false/absent means no paywall. 0.3.0 (P0-162): stripe.subscription (MonetizationSubscriptionConfig) adds a monthly plan — $X/month for N queries/month on the builder's Stripe Connect rails.

Signature

interface Monetization { enabled?: boolean; payment_mode?: 'stripe' | 'agent' | 'both'; stripe?: MonetizationStripeConfig; agent?: MonetizationAgentConfig; revenue_share_bps?: number }

Returns

FieldTypeDescription
enabledboolean?Master switch — false/absent = no paywall.
payment_mode'stripe' | 'agent' | 'both'?Which payment rail(s) the paywall offers.
revenue_share_bpsnumber?Platform fee in basis points (default 2000 = 20%).
stripe.subscriptionMonetizationSubscriptionConfig?Monthly subscription plan (price_cents ≥ 200, label) — pure access since 0.3.3/P0-167, no query allowance. Requires Stripe Connect payouts enabled — the backend rejects with 400 SUBSCRIPTION_REQUIRES_CONNECT otherwise. stripe_price_id is server-managed.

See also

getMonetization · setMonetization · MonetizationSubscriptionConfig

Source: src/types/index.ts (App Monetization, P0-155) · Also available in llms-full.txt and registry.json.