Code RouterCode Router
User GuideAPI ReferenceAI ApplicationsHelp & SupportBusiness Cooperation
Admin Guide

Subscription Plan Management

Create and manage Code Router subscription plans, control their visibility, and manually activate subscriptions for users

Subscription plans let you package access to Code Router as recurring offerings: each plan bundles a quota allowance with a billing duration, and users can subscribe to gain that allowance against the model groups and token groups you've configured.

This page covers the admin-side management of plans. Log in with an admin account and open the subscription management page (/console/subscription) directly. The admin view differs from the user-facing purchase view: it lets you create, edit, publish, and manually assign plans.

Code Router is a brand-new demo. No prices, currencies, payment methods, or billing amounts are finalized yet — every monetary value shown here is a placeholder marked (pricing TBD / 价格待补). Do not treat any number or payment option as real until it has been configured for your own deployment.

The plan list shows all created subscription plans along with their name, price, duration, and status (published / unpublished).

How a plan works conceptually

A subscription plan is just a template that maps a price to a quota allowance over a duration:

  • Quota allowance — the amount of usage credit a subscriber receives. In Code Router, usage is metered as quota that is drawn down as requests consume input/output tokens. The exact per-token rates and conversion are configured elsewhere in your deployment and are not finalized for this demo (费率/价格待补).
  • Duration — how long the allowance is valid (for example daily, weekly, monthly, or a custom number of days).
  • Visibility — whether end users can see and purchase the plan.

Create a Plan

  1. Click the Create Plan button on the subscription management page — a creation dialog appears.
  2. Fill in the following fields:
    • Plan Name — the name users see when purchasing.
    • Price — the plan's selling price. (amount/currency TBD — 价格待补;本演示未确定具体金额与币种)
    • Duration Type — choose daily / weekly / monthly / custom days.
    • Included Quota — the quota allowance included in the plan. (quota value TBD — 额度待补)
  3. Click Submit. The plan is created and defaults to unpublished status, so it is not yet visible to users.

Leave a plan unpublished while you finalize its price and quota. Because nothing in this demo's pricing is fixed yet, treat draft plans as the safe default until amounts are confirmed.

Publish / Unpublish a Plan

  1. Find the target plan in the list and click the Publish or Unpublish button on the right.
  2. Published plans are visible and available for users to subscribe to. Unpublished plans are hidden from users, but any existing active subscriptions on that plan continue unaffected.

Manually Activate a Subscription for a User

Use this when you want to grant a subscription without going through the user purchase flow — for example to comp an account or correct a billing issue.

  1. Click the Manual Bind button on the subscription management page.
  2. Enter the target user's username or email, then select the plan to activate.
  3. Click Confirm. The system creates a subscription record for that user, effective immediately.

Payment and billing

Payment collection is not configured in this demo. No payment provider, gateway, balance top-up flow, or currency has been finalized (payment methods TBD — 支付方式待补). Until you wire up your own billing integration, manual activation is the only reliable way to assign a subscription.

When you do connect billing in your own deployment, the published plans become the catalog users purchase from, and the included quota is credited to a subscriber's account for the plan's duration. The mapping between price, quota, and per-token rates is entirely up to your configuration — none of it is predetermined by Code Router.

Feedback

Found an issue with subscription management, or want to suggest an improvement? Open an issue on the source repository: github.com/ssgzy/Router-new-api.

How is this guide?

Last updated on