Skip to main content
Credit-Based Billing आपको ग्राहकों को credits का balance देने की सुविधा देता है—जैसे API calls, tokens, compute units या कोई भी custom metric—और आपकी service का उपयोग करने पर उस balance से credits घटाता है। Credits सभी product types के साथ काम करते हैं: subscriptions, one-time purchases और usage-based billing।

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 करें
Checkout showing included credits with the product purchase

Credits appear as entitlements on your products and show in checkout, customer portal, and subscription details.

मुख्य अवधारणाएँ

Credit Types

Credit बनाते समय, आप दो types में से एक चुनते हैं:
Credits को अपनी पसंद की unit में define करें—tokens, API calls, compute hours या आपके product के लिए meaningful कोई भी metric। Custom units आपके द्वारा सेट की गई precision (0 से 10 decimal places) का उपयोग करती हैं।इनके लिए सर्वोत्तम: API calls, AI tokens, compute hours, storage units, messages

Credit Lifecycle

Credits जारी होने से लेकर उपयोग होने तक एक स्पष्ट lifecycle का पालन करते हैं:
1

Credits Issued

Credits तब दिए जाते हैं जब कोई ग्राहक attached credit entitlements वाले product (subscription या one-time) को खरीदता है। Subscriptions के लिए credits प्रत्येक billing cycle में फिर से जारी किए जाते हैं।
2

Credits Consumed

ग्राहक आपकी service का उपयोग करने पर credits खर्च करते हैं। Usage-based products के लिए meters real-time events के आधार पर credits अपने-आप घटाते हैं। आप dashboard या API के माध्यम से credits manually भी घटा सकते हैं।
3

Credits Expire or Roll Over

Billing cycle के अंत में (या configured expiry period के बाद), unused credits आपकी settings के आधार पर expire हो जाते हैं या अगले period में rollover हो जाते हैं।
4

Overage Handling

यदि credits cycle के बीच में समाप्त हो जाते हैं, तो आप overage की अनुमति दे सकते हैं (balance से अधिक continued usage) और चुन सकते हैं कि overage को कैसे संभालना है—माफ़ करना, bill करना या deficit को आगे ले जाना।

Grant Sources

Credits कई sources से दिए जा सकते हैं:

Credits बनाना

अपने dashboard के Products → Credits section में credit entitlements बनाएं। प्रत्येक credit में unit, precision, expiry rules और lifecycle behavior define होता है।
Credits listing page showing created credit entitlements

The Credits tab under Products shows all your credit entitlements.

1

Navigate to Credits

अपने dashboard में Products पर जाएं और Credits tab चुनें। शुरू करने के लिए Create Credit पर क्लिक करें।
2

Configure Basic Information

Credit Name दर्ज करें—यह credit के लिए आपका internal identifier है।
Credit creation form showing basic info, general settings, and subscription settings

The credit creation form with all configuration sections.

3

Set General Settings

Credit type और display properties configure करें:
string
आवश्यक
Custom Unit या Fiat Credits चुनें।
  • 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 आदि) आवश्यक है।
string
केवल Custom Unit credits के लिए। ग्राहक इस credit के लिए जो label देखते हैं (जैसे “AI Tokens”, “API Calls”)। यह checkout और customer portal में दिखाई देता है।
number
केवल Custom Unit credits के लिए। अनुमत decimal places की संख्या, 0 से 10 तक:
  • 0 - पूर्ण संख्याएं (API calls जैसी countable items के लिए सर्वोत्तम)
  • 1 - एक decimal (0.0)
  • 2 - दो decimals (0.00) - default
  • 3 - तीन decimals (0.000)
  • 10 तक - high-precision units के लिए (जैसे fractional tokens या micro-usage)
Credit बनने के बाद precision बदली नहीं जा सकती।
string
जारी होने के बाद credits कितने समय तक valid रहते हैं:
  • 7 days, 30 days (default), 60 days, 90 days, Custom, या Never
Custom दिनों की संख्या (न्यूनतम 1) निर्दिष्ट करने के लिए Custom चुनें।
4

Configure Subscription Settings (Optional)

ये settings recurring subscriptions के भीतर credit behavior नियंत्रित करती हैं:
boolean
Unused credits को अगले billing cycle में carry forward करने की अनुमति दें। सक्षम होने पर configure करें:
  • Max Rollover Percentage (0–100%) - Carry over होने वाली मात्रा सीमित करें
  • Rollover Timeframe - Rolled-over credits कितने समय तक valid रहें (जैसे, 1 Month)
  • Max Rollover Count - Credits forfeited होने से पहले अधिकतम लगातार rollovers
जब Credits समाप्त हो जाएं या Subscription expire हो जाए:
boolean
Customers को credit balance शून्य होने के बाद भी आपकी service का उपयोग जारी रखने दें। सक्षम होने पर configure करें:
  • Overage Limit - Customers अपने balance से अधिकतम कितने credits consume कर सकते हैं
  • Price Per Unit - Overage enabled होने पर प्रत्येक अतिरिक्त credit की cost (currency selector के साथ)
string
आवश्यक
Billing cycle के अंत में overage को कैसे संभालना है, यह नियंत्रित करता है:
  • 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 किया जाता है।
5

Create Credit

Save करने के लिए Create Credit पर क्लिक करें। अब यह credit किसी भी product से attach करने के लिए उपलब्ध है।
आपका credit entitlement तैयार है। Customers को credits जारी करना शुरू करने के लिए इसे products से attach करें।
सरल settings से शुरू करें—न rollover, न overage—और customers के credits उपयोग करने के तरीके को समझने के साथ complexity बढ़ाएं। अधिकांश settings को existing grants को प्रभावित किए बिना किसी भी समय update किया जा सकता है। ध्यान दें कि credit बनने के बाद precision बदली नहीं जा सकती

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 किए जा सकते हैं।
1

Create or Edit a Subscription Product

Products → Create Product पर जाएं या किसी existing product को edit करें। Pricing type के रूप में Subscription चुनें और अपनी recurring price configure करें।
2

Open Entitlements Section

Entitlements section को expand करें और Credits के पास मौजूद Attach button पर क्लिक करें।
Product entitlements section showing Credits attach button

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

3

Select Credits to Attach

एक Add Credits panel खुलता है। आप dropdown से existing credit चुन सकते हैं या वहीं नया credit define करने के लिए Create new credit पर क्लिक कर सकते हैं।
Add Credits panel with credit selection dropdown

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

आप प्रत्येक product में अधिकतम 5 credits attach कर सकते हैं। प्रत्येक credit का अपना configuration हो सकता है।
4

Configure Credit Settings

प्रत्येक attached credit के लिए configure करें:
number
आवश्यक
प्रत्येक billing period में customer को दिए जाने वाले credits की संख्या।
number
जब credits इस amount से कम हो जाएं तो notify करें। Customers के credits समाप्त होने से पहले alert करने के लिए उपयोगी।
number
Trial periods के लिए अलग credit amount सेट करें। Trial के paid subscription में convert होने पर unused trial credits revoke करने के लिए Expire trial credits after trial ends सक्षम करें।
boolean
Customer द्वारा subscription plan upgrade या downgrade करने पर remaining credits को prorate करें।
boolean
Credit entitlement की default rollover, overage और expiry settings का उपयोग करें। इसे बंद करके विशेष रूप से इस product के लिए settings customize करें।
Credit configuration form with billing cycle, trial, and proration settings

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

5

Review and Add

Attached credit का name, amount और expiration review करें। पुष्टि करने के लिए Add to Subscription पर क्लिक करें।
Add Credits panel showing selected credit with details

Review attached credits before adding them to the subscription.

One-Time Payment Products

One-time payments के लिए credits खरीदारी के समय एक बार जारी किए जाते हैं।
1

Create a One-Time Product

Single Payment pricing type वाला product बनाएं।
Product pricing section with Single Payment selected

Single Payment pricing selected for a one-time credit product.

2

Attach Credits

Entitlements section खोलें और credits attach करें। खरीदारी पर जारी किए जाने वाले credits की number of credits issued (कुल one-time grant) configure करें।
One-time credit products credit top-up packs, promotional bundles या prepaid credit purchases के लिए आदर्श हैं।

Usage-Based Billing Products

Usage-based products के लिए credits meters से linked होते हैं और real-time consumption events के आधार पर automatically deduct किए जाते हैं।
1

Create a Usage-Based Product

Pricing type के रूप में Usage Based Billing चुनें। Base price और billing frequency configure करें।
Usage Based Billing pricing configuration

Usage Based Billing pricing type with meter configuration.

2

Add a Meter

Meter जोड़ने के लिए Select meter section में + button पर क्लिक करें। एक subscription में अधिकतम 3 meters हो सकते हैं।
Select Meter panel showing free threshold and credit toggle

The Select Meter panel with meter configuration and credit toggle.

3

Enable Credit Billing on the Meter

Meter से credit attach करने के लिए Bill usage in Credits toggle करें। Dropdown से credit entitlement चुनें।
number
आवश्यक
Credit deduction शुरू होने से पहले free रहने वाली usage units की संख्या।
boolean
सक्षम होने पर meter usage, per-unit charge करने के बजाय customer के credit balance से deduct होता है।
number
आवश्यक
1 credit deduct करने के लिए आवश्यक usage units की संख्या। उदाहरण के लिए, यदि इसे 1000 पर सेट किया गया है, तो 1,000 API calls से 1 credit consume होगा।
Meter configuration with credit selection and meter units per credit

Credit attached to a meter with per-unit conversion rate.

4

Configure Credit Issuance

जारी किए जाने वाले credits की संख्या सेट करें और चाहें तो इस product के लिए credit settings customize करें।
Credit configuration for UBB product

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

5

Verify Attachment

Configure होने के बाद meter attached credit name, unit price और free threshold दिखाता है।
Configured meter showing credit attachment details

Meter with credit attached showing price, threshold, and credit name.

जब credits meters से linked होते हैं, तो system ingested usage events के आधार पर credits automatically deduct करता है। एक background worker प्रत्येक मिनट events process करता है, उन्हें meter के configuration के अनुसार aggregate करता है और customer के सबसे पुराने non-expired grants से FIFO (first-in, first-out) deduction लागू करता है।

Credit Settings

Rollover

Rollover unused credits को expire होने के बजाय अगले billing cycle में carry forward करता है। उदाहरण: Cycle के अंत में customer के पास 200 unused credits हैं। 75% rollover के साथ 150 credits आगे carry होते हैं और 50 forfeited हो जाते हैं।

Overage

Overage नियंत्रित करता है कि cycle के बीच में customer का credit balance शून्य होने पर क्या होता है। Overage Behavior options:
जब overage disabled होता है, तो credit balance शून्य होने के बाद customers service का उपयोग नहीं कर सकते। अपने billing model के अनुरूप overage behavior चुनें—Forgive at reset default और सबसे सरल option है।

Expiration

Expired credits एक 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 करते हैं।
Usage Billing dashboard showing events table with credits consumed

The Usage Billing dashboard shows meter events with units consumed, credits consumed, and customer details.

Meter-Based Credit Deduction कैसे काम करता है

  1. आपका application usage events भेजता है - प्रत्येक event में customer ID, event name और metadata शामिल होते हैं
  2. Meters events aggregate करते हैं - Count, Sum, Max या Last aggregation का उपयोग करके
  3. Credits automatically deduct होते हैं - Background worker हर मिनट events process करता है, configured rate से meter units को credits में convert करता है और FIFO ordering (सबसे पुराने grants पहले) का उपयोग करके customer के balance से deduct करता है
  4. 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 page showing product with included API call credits

Checkout shows included credits with the product, making the value proposition clear.

Credits product description के नीचे Includes section में दिखाई देते हैं, जिसमें credit amount और type (जैसे, “$1000 API calls”) दिखाया जाता है।

Customer Portal

Customers Credits section के अंतर्गत Customer Portal में अपने credit balances देख और manage कर सकते हैं।
Customer Portal credits view with balance and transaction history

The Customer Portal shows available balance and full transaction history.

Portal दिखाता है:
  • 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
Customers को दिखाए जाने वाले transaction types में शामिल हैं:

Subscription Details

Subscription detail page अन्य plan information के साथ credit entitlements दिखाता है।
Subscription details page showing entitlements and usage history

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 page showing credit entitlements

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 page in the Products section

Credits listing with total count, creation button, and management actions.

Customer Credit Details

किसी specific customer के credit balances और transaction history को Customers → [Customer Name] → Credits से देखें।
Customer details page with Credits tab showing balance and transactions

Customer detail page showing credit balance and full transaction ledger.

Customer credit view में शामिल हैं:
  • 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 कर सकते हैं:
1

Navigate to Customer

Customers पर जाएं और customer चुनें।
2

Open Credits Tab

Credits tab पर क्लिक करें और wallet selector से उपयुक्त credit entitlement चुनें।
3

Apply Credit or Debit

Adjustment interface खोलने के लिए Apply Credit/Debit पर क्लिक करें।
string
आवश्यक
Credits जोड़ने के लिए Credit या customer के balance से credits हटाने के लिए Debit चुनें।
number
आवश्यक
जोड़ने या हटाने वाले credits की संख्या।
string
Adjustment के लिए optional explanation (जैसे, “Service compensation”, “Promotional bonus”)।
4

Confirm

Adjustment review करके apply करें। यह change customer के balance में तुरंत दिखाई देता है और credit ledger में record हो जाता है।
Manual adjustments full audit trail के साथ एक ManualAdjustment ledger entry बनाते हैं।

Credit Ledger

प्रत्येक credit operation credit ledger में record होता है, जिससे complete audit trail मिलता है: प्रत्येक ledger entry में transaction से पहले और बाद का balance, पहले और बाद का overage, description और source का reference (payment, subscription आदि) record होता है।

Webhooks

Credit-Based Billing प्रत्येक credit lifecycle change के लिए webhook events fire करता है। इनका उपयोग अपने application को credit balances के साथ sync रखने, notifications trigger करने या custom billing workflows बनाने के लिए करें। सभी ledger events (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

सभी credit webhook events के लिए full payload schemas, field descriptions और integration examples देखें।

API Management

Rollover, overage और expiration settings पर full control के साथ programmatically credit entitlements बनाने के लिए API का उपयोग करें।

Create Credit Entitlement

Rollover, overage और expiry configuration के साथ नया credit entitlement बनाएं।

List Credit Entitlements

अपने business के सभी credit entitlements retrieve करें।
Credit entitlements retrieve, update या delete करें। Deleted entitlements restore किए जा सकते हैं।

Get Credit Entitlement

ID द्वारा कोई specific credit entitlement retrieve करें।

Update Credit Entitlement

Rollover, overage, expiry या अन्य settings update करें।

Delete Credit Entitlement

Credit entitlement को soft-delete करें।

Undelete Credit Entitlement

पहले delete किए गए credit entitlement को restore करें।
Purchase की आवश्यकता के बिना सीधे customer के balance में credits दें या billing adjustments के लिए manual debit entries बनाएं।

Create Ledger Entry

Full audit trail और idempotency support के साथ customer के balance को credit या debit करें।
किसी भी credit entitlement के लिए customer का current credit balance, grant history और transactions का पूरा ledger retrieve करें।

List Balances

किसी credit entitlement के लिए सभी customer balances list करें।

Get Customer Balance

किसी specific customer का balance प्राप्त करें।

List Customer Grants

किसी customer के सभी credit grants देखें।

List Customer Ledger

Customer की पूरी transaction history।

Integration Example

Dodo Payments client initialize करें:
Checkout के दौरान subscription product से credits attach करें:
Credits automatically deduct करने वाले usage events भेजें:

Real-World Examples

Pricing Structure:Configuration:
  • Credit Type: Custom Unit (“AI Tokens”)
  • Precision: 0 (whole tokens)
  • Rollover: 25% max, 1-month timeframe
  • Overage: Enabled, bill overage at billing
  • Meter: ai.generation with Sum aggregation on tokens field
Pricing Structure:Configuration:
  • 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.request with Count aggregation
Pricing Structure:Configuration:
  • Credit Type: Custom Unit (“GB-hours”)
  • Precision: 2 (two decimal places)
  • Rollover: 50% max, carries over once
  • Overage: Enabled with 200% limit
  • Meter: storage.usage with 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 करें।
Credit-Based Billing अन्य सभी Dodo Payments features के साथ seamlessly काम करता है—trials वाले subscriptions, proration के साथ plan changes और customer portal। Basic setup से शुरू करें और अपने pricing model के विकसित होने के साथ इसे expand करें।
अंतिम संशोधन 21 जुलाई 2026