Skip to content

Plan ​

What it is ​

Plan is the "product" template a user can subscribe to. After checkout, the system creates a Subscription instance from one Plan.

Where to find it ​

  • Admin → Plans: list, add, publish / unpublish
  • Public → Subscribe: only published plans are visible
  • Admin → Plan Settings: global upgrade / expiry policy

Operator-relevant fields ​

FieldMeaningEffect
NameShown to the userUpdating it updates everywhere.
Price¥The amount the user is charged.
QuotaInternal unitsTotal allowance for the period; after exhaustion the plan's discount no longer applies.
ValidityDaysAfter expiry → "plan expired" status, but calls still work until quota runs out.
Discount multiplierNumberMultiplies the deduction while the plan is active.
DescriptionRich textShown on the subscribe page.
StatusPublished / unpublishedUnpublished stops new subscriptions; existing ones are unaffected.
RecommendedToggleShows the "Recommended" badge on the public card.

Plan vs Subscription ​

  • Plan: the template — name, price, quota, validity.
  • Subscription: an instance — a user subscribing to a Plan at a specific moment. One user can hold multiple over time.

Upgrades and differentials ​

When switching from Plan A to a higher-priced Plan B:

  • If B.price > A.price, a differential order is created (prefix UP)
  • Remaining days / quota are pro-rated into the new plan

Upgrade rules are maintained in Plan Settings.

  • GET /api/plan/ — list (admin)
  • GET /api/plan/list — list (public)
  • POST /api/plan/ — add
  • PUT /api/plan/ — update
  • DELETE /api/plan/:id — delete