定价
定价(Pricing) 把一个或多个 计划 组合在一起,用户注册应用时可以在不同价位中选择。

定价属性
| Property | Description |
|---|---|
| Organization | Owning organization. |
| Name | Pricing identifier. |
| CreatedTime | Creation time. |
| DisplayName | Display name. |
| Description | Optional description. |
| Plans | List of plans in this pricing. |
| IsEnabled | Whether the pricing is active. |
| Application | Application this pricing applies to. |
| Is invite only | Limits the pricing to invited users. Off by default. |
| Invited users | Users of the pricing's organization who may use an invite-only pricing. Shown only when Is invite only is on. |

仅限邀请的定价
开启 Is invite only 以仅向部分用户提供定价,例如为合作伙伴提供折扣计划。随后 Casdoor 将决定谁可以使用该定价:
| Invited users | Who may use the pricing |
|---|---|
| Empty | Every user of the pricing's organization |
| One or more users | Only the listed users |
其他组织的用户以及未登录的访客永远无法使用仅限邀请的定价。对于所有不可使用该定价的用户:
GET /api/get-pricingreturns the errorThe pricing: <pricing-name> is invite-only, only invited users can use it. Global administrators and organization administrators can always read the pricing.- 使用此定价的计划下单失败。
- 当没有活跃订阅的付费用户登录时,Casdoor 会提供该用户可使用的第一个启用的应用定价,并跳过其他定价。
- 带有
pricing和plan参数的注册链接永远不会接受仅限邀请的定价,因为新用户尚不存在。
关闭 Is invite only 的定价对所有人开放。