Ölçümlü Faturalandırma ve Kullanıma Dayalı Fiyatlandırma
Kullanımı Stripe'a bildirerek, ölçümlü fiyatları yapılandırarak ve yapay zeka SaaS'ınız için kullanıma dayalı kademeler oluşturarak müşterilerden gerçekten kullandıkları kadar ücret alın.
Ölçümlü Faturalandırma ve Kullanıma Dayalı Fiyatlandırma, CoddyKit'te ücretsiz bir AI Powered SaaS: Stripe + Auth + Billing + Deploy dersidir. Bu, 4 dersinin 4. dersidir. Aşağıdan dersin tamamını ücretsiz okuyabilir, sonra tarayıcıda yerleşik kod editörü ve 7/24 yapay zeka koçu ile uygulamalı olarak pratik yapabilirsin. Bu, AI Powered SaaS: Stripe + Auth + Billing + Deploy öğrenme yolunun bir parçasıdır ve ilerlemeniz web ve CoddyKit uygulaması arasında senkronize olur. AI Powered SaaS: Stripe + Auth + Billing + Deploy kursu toplamda 4 dersten oluşur.
Bu dersin bazı bölümleri henüz çevrilmemiş olup İngilizce olarak gösterilmektedir.
Why Usage-Based Pricing?
Flat subscriptions do not fit products where cost scales with consumption — like AI tokens or API calls. Metered billing charges customers for actual usage, aligning revenue with cost.
Licensed vs Metered Prices
Stripe prices come in two usage types:
- Licensed: a fixed quantity (e.g. 5 seats)
- Metered: quantity reported over time and billed at period end
Creating a Metered Price
Define a recurring price with usage_type: metered. Stripe sums reported usage for each billing cycle.
await stripe.prices.create({
product: productId,
currency: 'usd',
recurring: { interval: 'month', usage_type: 'metered' },
unit_amount: 2
});Subscribing Without a Quantity
For metered items you do not set a quantity at subscription time — Stripe learns it from usage reports.
await stripe.subscriptions.create({
customer: customerId,
items: [{ price: meteredPriceId }]
});Reporting Usage
As customers consume the product, report usage against the subscription item. Use action: increment to add to the running total.
await stripe.subscriptionItems.createUsageRecord(itemId, {
quantity: 1000,
timestamp: Math.floor(Date.now() / 1000),
action: 'increment'
});When to Report
Report at the moment usage happens — for example, after each AI completion count its tokens. Buffer high-frequency events and flush periodically to avoid hitting API limits.
async function onAiCall(itemId, tokens) {
await reportUsage(itemId, tokens);
}Idempotent Reporting
Avoid double-counting on retries by sending an idempotency key. Stripe ignores duplicate requests with the same key.
await stripe.subscriptionItems.createUsageRecord(
itemId,
{ quantity: 1000, action: 'increment' },
{ idempotencyKey: 'usage-' + eventId }
);Tiered Pricing
You can combine metering with tiers: the first 10,000 units cost more per unit, additional units less. Stripe computes the blended total automatically.
recurring: { usage_type: 'metered' },
billing_scheme: 'tiered',
tiers_mode: 'graduated'Showing Usage to Customers
Customers want transparency. Fetch the current period's usage and display it in their dashboard so there are no billing surprises.
const summaries = await stripe.subscriptionItems.listUsageRecordSummaries(itemId);Combining Plans
Many SaaS use a hybrid model: a fixed monthly base fee (licensed) plus metered overage. Add both prices as separate items on one subscription.
items: [
{ price: baseFeePriceId },
{ price: meteredPriceId }
]Best Practices
Run metered billing reliably:
- Use metered prices for consumption-based products
- Report usage with increment and idempotency keys
- Consider tiered pricing for volume
- Show usage to customers for transparency
Quick Check
Test your metered billing knowledge.
Recap
You added usage-based billing:
- Create
meteredprices and subscribe without a quantity - Report usage with
incrementand idempotency keys - Use tiered pricing and hybrid base-plus-overage models
- Surface usage to customers for transparency
Your AI SaaS now charges fairly for what users consume.
Sıkça Sorulan Sorular
“Ölçümlü Faturalandırma ve Kullanıma Dayalı Fiyatlandırma” dersi ücretsiz mi?
Evet — “Ölçümlü Faturalandırma ve Kullanıma Dayalı Fiyatlandırma” dersin tüm metni burada web'de ücretsiz olarak okunabilir. Etkileşimli olarak pratik yapmak (yerleşik kod editörü ve 7/24 yapay zeka koçu) ve AI Powered SaaS: Stripe + Auth + Billing + Deploy kursunun geri kalanını açmak için CoddyKit PRO'ya yükselt. AI Powered SaaS: Stripe + Auth + Billing + Deploy kursu toplamda 4 dersten oluşur.
“Ölçümlü Faturalandırma ve Kullanıma Dayalı Fiyatlandırma” dersinde ne öğreneceğim?
Kullanımı Stripe'a bildirerek, ölçümlü fiyatları yapılandırarak ve yapay zeka SaaS'ınız için kullanıma dayalı kademeler oluşturarak müşterilerden gerçekten kullandıkları kadar ücret alın. AI Powered SaaS: Stripe + Auth + Billing + Deploy ile uygulamalı kodu tarayıcıda doğrudan çalıştırarak pratik yaparsın ve 7/24 yapay zeka koçu dersi çalışırken sorularını yanıtlar.
AI Powered SaaS: Stripe + Auth + Billing + Deploy öğrenmeye başlamak için deneyim gerekli mi?
Önceden deneyim gerekmez. CoddyKit'te AI Powered SaaS: Stripe + Auth + Billing + Deploy, başlangıçtan ileri seviyeye kadar yapılandırıldığı için buradan başlayabilir veya başından başlayıp kendi hızında ilerleme yapabilirsin. Bu, 4 dersinin 4. dersidir.
“Ölçümlü Faturalandırma ve Kullanıma Dayalı Fiyatlandırma” dersi ne kadar sürer?
Çoğu CoddyKit dersi yaklaşık 5–10 dakika sürer. Her biri kısa ve etkileşimli olduğu için sabit ilerleme yaparsın ve web ile uygulama arasında tam olarak bıraktığın yerden devam edebilirsin.
Bu AI Powered SaaS: Stripe + Auth + Billing + Deploy dersinde kod yazıp çalıştırabilir miyim?
Evet. Her AI Powered SaaS: Stripe + Auth + Billing + Deploy dersi yerleşik bir kod editörü içerir, bu sayede tarayıcıda gerçek kod yazıp çalıştırabilir ve anlık yapay zeka geri bildirimi alırsın — yerel kurulum gerekli değildir.
Bu kursun tüm dersleri
- Abonelik Yönetimi
- Stripe Web Kancalarını İşleme
- Müşteri Portalı ve Faturalandırma Geçmişi
- Ölçümlü Faturalandırma ve Kullanıma Dayalı Fiyatlandırma