sitebay_account_create_checkout
Generate a Stripe checkout session to purchase SiteBay hosting plans for teams, specifying plan type, billing interval, and optional team ID.
Instructions
Create a Stripe checkout session for team billing.
Args: plan_name: Plan type ("starter", "business", "micro") interval: Billing interval ("month", "year") team_id: Optional team ID to purchase for
Returns: Stripe checkout URL
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| plan_name | No | starter | |
| interval | No | month | |
| team_id | No |
Implementation Reference
- src/sitebay_mcp/server.py:642-682 (handler)The handler function for the 'sitebay_account_create_checkout' MCP tool. Decorated with @mcp.tool for automatic registration. It initializes the SiteBayClient and calls create_checkout_session to generate a Stripe checkout URL based on the provided plan and interval.@mcp.tool async def sitebay_account_create_checkout( ctx: Context, plan_name: str = "starter", interval: str = "month", team_id: Optional[str] = None ) -> str: """ Create a Stripe checkout session for team billing. Args: plan_name: Plan type ("starter", "business", "micro") interval: Billing interval ("month", "year") team_id: Optional team ID to purchase for Returns: Stripe checkout URL """ try: await ctx.info(f"Creating checkout session for {plan_name} plan") client = await initialize_client() checkout_data = { "plan_name": plan_name, "interval": interval } if team_id: checkout_data["for_team_id"] = team_id result = await client.create_checkout_session(checkout_data) await ctx.info("Successfully created checkout session") return f"✅ **Checkout Session Created**\n\nPlan: {plan_name} ({interval}ly)\nCheckout URL: {result.get('url', 'URL not provided')}" except SiteBayError as e: await ctx.error(f"Error creating checkout: {str(e)}") return f"❌ Checkout Error: {str(e)}" except Exception as e: await ctx.error(f"Unexpected checkout error: {str(e)}") return f"❌ Unexpected error: {str(e)}"