深入理解按量与阶梯定价层级
掌握 Stripe 的分层定价模型,了解按量定价层级与阶梯定价层级之间的关键区别,并为随用量增长的产品定价。
深入理解按量与阶梯定价层级 是 CoddyKit 上的免费 Stripe Payments & SaaS Billing Systems 课时。 这是第 4 节课,共 4 节。 你可以在下方免费阅读本课时的完整内容 — 然后在浏览器中使用内置代码编辑器和全天候 AI 导师进行实践。 这是 Stripe Payments & SaaS Billing Systems 学习路径的一部分,你的进度在网页和 CoddyKit 应用中同步。 Stripe Payments & SaaS Billing Systems 课程共包含 4 节课。
本课时的部分内容尚未翻译,以英文显示。
Why Tiered Pricing?
Many SaaS products charge less per unit as customers buy more. Stripe supports this with tiered prices built right into a Price object.
Two Tier Modes
Stripe offers two tier modes that calculate cost very differently:
- Volume - all units at the rate of the reached tier
- Graduated - each unit priced at its own tier rate
Defining Tiers
Each tier has an up_to threshold and a unit price. The last tier uses up_to: inf.
const tiers = [
{ up_to: 10, unit_amount: 100 },
{ up_to: 50, unit_amount: 80 },
{ up_to: 'inf', unit_amount: 50 }
];Volume Pricing Example
With volume, buying 30 units lands in the 11-50 tier, so ALL 30 units cost 80 cents each.
const qty = 30;
const volumeRate = 80; // tier for 11-50
console.log('volume total:', qty * volumeRate);Graduated Pricing Example
With graduated, the same 30 units are split: first 10 at 100, next 20 at 80.
const tier1 = 10 * 100;
const tier2 = 20 * 80;
console.log('graduated total:', tier1 + tier2);Same Tiers, Different Bills
Notice the same quantity and tiers produced different totals. Choosing the wrong mode silently overcharges or undercharges customers.
Flat Amount Per Tier
Tiers can also include a flat_amount base fee in addition to per-unit pricing, useful for platform fees per tier.
Creating a Tiered Price
You set billing_scheme: 'tiered' and the tiers when creating the Price.
const price = await stripe.prices.create({
product: 'prod_123',
currency: 'usd',
billing_scheme: 'tiered',
tiers_mode: 'graduated',
recurring: { interval: 'month' },
tiers
});Tiers with Metered Usage
Tiered pricing pairs naturally with metered billing: report usage, and Stripe applies the tier math at invoice time.
Communicating Pricing Clearly
Tiered bills can confuse customers. Show an estimated-cost calculator so buyers understand what each volume level costs.
Choosing a Mode
Use graduated when you want gradual savings on incremental units, and volume when reaching a threshold should reprice the whole order.
Quick Check
How does volume pricing differ from graduated pricing?
Recap
You learned Stripe's tiered pricing in depth:
- Volume reprices all units; graduated charges each unit at its tier
- Tiers use up_to thresholds and optional flat amounts
- Set billing_scheme tiered with a tiers_mode
- Pairs with metered usage; surface a calculator for clarity
常见问题解答
「深入理解按量与阶梯定价层级」课时是免费的吗?
是的 — 「深入理解按量与阶梯定价层级」的完整文本可在网页上免费阅读。要进行交互式练习(内置代码编辑器和全天候 AI 导师)并解锁 Stripe Payments & SaaS Billing Systems 课程的其余内容,请升级到 CoddyKit PRO。 Stripe Payments & SaaS Billing Systems 课程共包含 4 节课。
「深入理解按量与阶梯定价层级」这节课中我会学到什么?
掌握 Stripe 的分层定价模型,了解按量定价层级与阶梯定价层级之间的关键区别,并为随用量增长的产品定价。 你通过在浏览器中直接运行的动手代码来练习 Stripe Payments & SaaS Billing Systems,全天候 AI 导师会在你学习这节课的过程中回答你的问题。
学习 Stripe Payments & SaaS Billing Systems 需要有经验吗?
无需任何先前经验。CoddyKit 上的 Stripe Payments & SaaS Billing Systems 课程适合初学者到高级学习者,你可以从这里开始或从头开始,按照自己的节奏学习。 这是第 4 节课,共 4 节。
「深入理解按量与阶梯定价层级」课时需要多长时间?
大多数 CoddyKit 课程大约需要 5–10 分钟。每节课都很精短且互动,所以你能稳步进步,并在网页和应用中从离开的地方继续。
我能在这节 Stripe Payments & SaaS Billing Systems 课中编写并运行代码吗?
能。每节 Stripe Payments & SaaS Billing Systems 课都包含内置代码编辑器,你可以在浏览器中直接编写并运行真实代码,并获得即时 AI 反馈 — 无需本地设置。
此课程中的所有课时
- 实现基于用量的计费系统
- 配置按席位和分层定价
- 自定义计费周期与计划
- 深入理解按量与阶梯定价层级