Credit-Based Billing क्या है?
Credit-Based Billing आपको अपने products के हिस्से के रूप में ग्राहकों को credit entitlements जारी करने की flexible system देता है। प्रति उपयोग charge करने या feature flags के माध्यम से access सीमित करने के बजाय, आप credits का एक pool allocate करते हैं, जिसका उपयोग ग्राहक आपकी service इस्तेमाल करते समय करते हैं। Credits इनके लिए आदर्श हैं:- AI और LLM platforms: प्रत्येक plan tier के लिए tokens या generation credits दें
- API services: overage pricing के साथ API call credits allocate करें
- Infrastructure platforms: compute hours या storage credits जारी करें
- Communication services: प्रत्येक subscription के लिए message या minute credits दें
- Consumption tiers वाले SaaS: शामिल usage को credit pools में bundle करें

Credits appear as entitlements on your products and show in checkout, customer portal, and subscription details.
मुख्य अवधारणाएँ
Credit Types
Credit बनाते समय, आप दो types में से एक चुनते हैं:- Custom Unit
- Fiat Credits
Credit Lifecycle
Credits जारी होने से लेकर उपयोग होने तक एक स्पष्ट lifecycle का पालन करते हैं:Credits Issued
Credits Consumed
Credits Expire or Roll Over
Overage Handling
Grant Sources
Credits कई sources से दिए जा सकते हैं:Credits बनाना
अपने dashboard के Products → Credits section में credit entitlements बनाएं। प्रत्येक credit में unit, precision, expiry rules और lifecycle behavior define होता है।
The Credits tab under Products shows all your credit entitlements.
Navigate to Credits
Configure Basic Information

The credit creation form with all configuration sections.
Set General Settings
- Custom Unit - अपना metric (tokens, API calls, compute hours) define करें। इसके लिए Unit Name (जैसे “Platform tokens”) और Precision setting आवश्यक है।
- Fiat Credits - Credits वास्तविक currency value दर्शाते हैं। इसके लिए Unit Currency selection (USD, EUR, GBP, INR आदि) आवश्यक है।
0 से 10 तक:0- पूर्ण संख्याएं (API calls जैसी countable items के लिए सर्वोत्तम)1- एक decimal (0.0)2- दो decimals (0.00) - default3- तीन decimals (0.000)10तक - high-precision units के लिए (जैसे fractional tokens या micro-usage)
- 7 days, 30 days (default), 60 days, 90 days, Custom, या Never
Configure Subscription Settings (Optional)
- Max Rollover Percentage (0–100%) - Carry over होने वाली मात्रा सीमित करें
- Rollover Timeframe - Rolled-over credits कितने समय तक valid रहें (जैसे, 1 Month)
- Max Rollover Count - Credits forfeited होने से पहले अधिकतम लगातार rollovers
- Overage Limit - Customers अपने balance से अधिकतम कितने credits consume कर सकते हैं
- Price Per Unit - Overage enabled होने पर प्रत्येक अतिरिक्त credit की cost (currency selector के साथ)
- Forgive overage at reset (default) - Credit limit से अधिक usage track किया जाता है, लेकिन bill नहीं किया जाता। प्रत्येक cycle में balance reset होता है।
- Bill overage at billing - Credit limit से अधिक usage अगले invoice में charge किया जाता है, फिर balance reset होता है।
- Carry over deficit - Credit limit से अधिक usage अगले cycle में negative balance के रूप में carry forward होता है।
- Carry over deficit (auto-repay) - Deficit carry forward होता है और अगले cycle में नए credits से automatically repay किया जाता है।
Create Credit
Products से Credits Attach करना
Product creation या editing flow में credits को entitlements के रूप में products से attach किया जाता है। आप प्रत्येक product में अधिकतम 5 credits attach कर सकते हैं। Credits सभी तीन pricing types के साथ काम करते हैं।Subscription Products
Subscriptions के लिए credits प्रत्येक billing cycle में जारी किए जाते हैं और proration, trial credits तथा cycle-specific settings के साथ configure किए जा सकते हैं।Create or Edit a Subscription Product
Open Entitlements Section

The Entitlements section in the product form with Credits, License Key, and Digital Product Delivery options.
Select Credits to Attach

The Add Credits panel lets you select existing credits or create new ones.
Configure Credit Settings

Credit configuration showing per-cycle amount, trial credits, proration, and custom settings.
Review and Add

Review attached credits before adding them to the subscription.
One-Time Payment Products
One-time payments के लिए credits खरीदारी के समय एक बार जारी किए जाते हैं।Create a One-Time Product

Single Payment pricing selected for a one-time credit product.
Attach Credits
Usage-Based Billing Products
Usage-based products के लिए credits meters से linked होते हैं और real-time consumption events के आधार पर automatically deduct किए जाते हैं।Create a Usage-Based Product

Usage Based Billing pricing type with meter configuration.
Add a Meter

The Select Meter panel with meter configuration and credit toggle.
Enable Credit Billing on the Meter
1000 पर सेट किया गया है, तो 1,000 API calls से 1 credit consume होगा।
Credit attached to a meter with per-unit conversion rate.
Configure Credit Issuance

Configure how many credits to issue and whether to use default settings.
Verify Attachment

Meter with credit attached showing price, threshold, and credit name.
Credit Settings
Rollover
Rollover unused credits को expire होने के बजाय अगले billing cycle में carry forward करता है।Overage
Overage नियंत्रित करता है कि cycle के बीच में customer का credit balance शून्य होने पर क्या होता है।Expiration
CreditExpired ledger entry बनाते हैं। यदि rollover enabled है, तो expiration से पहले rollover percentage लागू किया जाता है और केवल शेष amount expire होता है।Credits के साथ Usage Billing
जब credits usage meters से linked होते हैं, तो system एक powerful consumption-based billing model बनाता है। Customers को credit allocation मिलता है और usage events उनके balance से credits automatically deduct करते हैं।
The Usage Billing dashboard shows meter events with units consumed, credits consumed, and customer details.
Meter-Based Credit Deduction कैसे काम करता है
- आपका application usage events भेजता है - प्रत्येक event में customer ID, event name और metadata शामिल होते हैं
- Meters events aggregate करते हैं - Count, Sum, Max या Last aggregation का उपयोग करके
- Credits automatically deduct होते हैं - Background worker हर मिनट events process करता है, configured rate से meter units को credits में convert करता है और FIFO ordering (सबसे पुराने grants पहले) का उपयोग करके customer के balance से deduct करता है
- Overage track किया जाता है - यदि credit balance शून्य हो जाता है और overage enabled है, तो system cycle के अंत में billing के लिए overage usage track करता है
Meters Panel
Usage Billing dashboard में एक Meters panel है, जिसमें सभी defined meters और उनके aggregation types सूचीबद्ध हैं:Customer Experience
Checkout
जब कोई customer attached credits वाला product खरीदता है, तो checkout page product offering के हिस्से के रूप में included credits दिखाता है।
Checkout shows included credits with the product, making the value proposition clear.
Customer Portal
Customers Credits section के अंतर्गत Customer Portal में अपने credit balances देख और manage कर सकते हैं।
The Customer Portal shows available balance and full transaction history.
- Available Balance - Current credit balance prominently displayed
- Credit Tabs - अलग-अलग credit types के बीच switch करें (जैसे, “OpenAI Credits”, “Usage Tokens”)
- Recent Transactions - Date, transaction ID, type, amount और running balance के साथ पूरी history
Subscription Details
Subscription detail page अन्य plan information के साथ credit entitlements दिखाता है।
Subscription details show credit allocation, remaining balance, and renewal date.
- प्रत्येक billing cycle के लिए Credit allocation (जैसे, “1000 credits each cycle”)
- Remaining balance (जैसे, “7500 credits remaining”)
- अगली credit issuance की Renewal date
- Meter-level breakdown वाला Usage History tab, जिसमें consumed units, thresholds, unit prices और total costs दिखते हैं
Transaction Details
Payment transaction pages में Entitlements section होता है, जिसमें payment के साथ delivered सभी entitlements, credits सहित, दिखाए जाते हैं।
Transaction details show credits alongside other entitlements like license keys and digital downloads.
Credits Manage करना
Dashboard Views
Credit Entitlements List
अपने सभी credit entitlements Products → Credits में देखें। Table में credit name और expiry settings दिखती हैं तथा editing या archiving के लिए quick actions मिलते हैं।
Credits listing with total count, creation button, and management actions.
Customer Credit Details
किसी specific customer के credit balances और transaction history को Customers → [Customer Name] → Credits से देखें।
Customer detail page showing credit balance and full transaction ledger.
- Credit Selector - अलग-अलग credit entitlements के बीच switch करें
- Available Balance - बड़े, prominent display में current balance
- Apply Credit/Debit - Customer के balance को manually adjust करने के लिए button
- Recent Transactions - Date, transaction ID, type, amount और running balance वाला पूरा ledger
Manual Adjustments
आप dashboard से सीधे customer के balance को manually credit या debit कर सकते हैं:Navigate to Customer
Open Credits Tab
Apply Credit or Debit
Confirm
ManualAdjustment ledger entry बनाते हैं।Credit Ledger
प्रत्येक credit operation credit ledger में record होता है, जिससे complete audit trail मिलता है:Webhooks
Credit-Based Billing प्रत्येक credit lifecycle change के लिए webhook events fire करता है। इनका उपयोग अपने application को credit balances के साथ sync रखने, notifications trigger करने या custom billing workflows बनाने के लिए करें।credit.added से credit.manual_adjustment तक) में पूरा CreditLedgerEntry payload शामिल होता है, जिसमें balance before/after, overage before/after, source reference और grant के source subscription या payment का metadata शामिल है (API के माध्यम से सीधे बनाए गए grants के लिए empty)। credit.balance_low event में threshold configuration और current balance शामिल होते हैं।
Credit Webhook Payloads
API Management
Create Credit Entitlements
Create Credit Entitlements
Create Credit Entitlement
List Credit Entitlements
Manage Credit Entitlements
Manage Credit Entitlements
Get Credit Entitlement
Update Credit Entitlement
Delete Credit Entitlement
Undelete Credit Entitlement
Grant and Adjust Credits
Grant and Adjust Credits
Create Ledger Entry
Query Balances and Ledger
Query Balances and Ledger
List Balances
Get Customer Balance
List Customer Grants
List Customer Ledger
Integration Example
Dodo Payments client initialize करें:Real-World Examples
AI SaaS Platform
AI SaaS Platform
- Credit Type: Custom Unit (“AI Tokens”)
- Precision: 0 (whole tokens)
- Rollover: 25% max, 1-month timeframe
- Overage: Enabled, bill overage at billing
- Meter:
ai.generationwith Sum aggregation ontokensfield
API Gateway
API Gateway
- Credit Type: Custom Unit (“API Calls”)
- Precision: 0 (whole calls)
- Rollover: Disabled
- Overage: Developer+ plans allow overage (forgive at reset), Free plan disables overage
- Meter:
api.requestwith Count aggregation
Cloud Storage Service
Cloud Storage Service
- Credit Type: Custom Unit (“GB-hours”)
- Precision: 2 (two decimal places)
- Rollover: 50% max, carries over once
- Overage: Enabled with 200% limit
- Meter:
storage.usagewith Sum aggregation
Best Practices
- सरल शुरुआत करें: एक ही credit type और बिना rollover के शुरू करें। Customer feedback और usage patterns के आधार पर complexity बढ़ाएं।
- स्पष्ट expectations सेट करें: अपने product pages और customer portal में credit allocations, remaining balances और overage pricing प्रमुखता से दिखाएं।
- Meaningful units का उपयोग करें: Generic terms के बजाय credits का नाम उस चीज़ के आधार पर रखें जिसे वे दर्शाते हैं (जैसे, “API Calls”, “AI Tokens”)। इससे customers को value समझने में मदद मिलती है।
- Expiry सोच-समझकर configure करें: छोटी expiry windows (7 days) urgency बढ़ाती हैं, लेकिन customers को निराश कर सकती हैं। अधिकांश SaaS products के लिए लंबी windows (30–90 days) customer-friendly होती हैं।
- Low balances monitor करें: Customers के credits समाप्त होने से पहले alert करने के लिए low balance thresholds सेट करें, जिससे unexpected overage charges कम हों।
- Test mode में test करें: Live होने से पहले credits बनाएं, उन्हें test products से attach करें और पूरे purchase → usage → deduction → expiration cycle को simulate करें।