Create Plan
create_planCreate a new subscription plan with its first recurring price. Arguments: key (required — stable identifier used in code and billing, e.g. "pro"; flag rules point at the plan's features, not its key), name (required — the display name), amount + interval (the first price; amount 0 for a free or contact-sales tier: a plan with no price can never be assigned to a workspace), currency (ISO code) and trial (true or false), with trialDays when trial is true, and description. Price, interval, currency and trial are the developer's decisions: when one is missing (currency and trial are only needed when amount is above 0) the tool changes nothing and returns DECISION_NEEDED listing the questions to ask. Add more prices (e.g. yearly) with set_plan_price and usage quotas with set_plan_quota, or use apply_plan to create a plan with all its prices and quotas in one call; update_plan changes name, description and trial later. Returns the full plan. Count usage once, where the action happens: ask the developer whether the action calls their server. If it does, the backend decorator (@RequireQuota) counts it. If it does not, the browser reports it (bridge.usage.report / set) with on the button; that is a complete, first-class setup. Never count one metric in both places. Before writing app code that consumes this, call get_integration_guide with topic=billing and the framework the app uses.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| app | No | Id of the Bridge app to act on for this call (see list_apps). Omit to use the current app. | |
| key | Yes | Plan KEY: short, lower-case and permanent, e.g. "pro". Code and tokens use it; flag rules point at the plan's features instead. | |
| name | Yes | Display name customers see, e.g. "Pro". Can change later. | |
| trial | No | Whether the plan has a free trial. Required when amount is above 0; ask the developer. | |
| amount | No | First recurring price amount. 0 for a free or contact-sales tier. Ask the developer. | |
| currency | No | ISO currency code, e.g. "USD". Required when amount is above 0; ask the developer. | |
| interval | No | Billing recurrence interval. | |
| trialDays | No | Trial length in days. Required when trial is true. | |
| description | No | Short description shown with the plan. |