Billing Automation
wshobson/agents
Covers building subscription billing: billing cycles, subscription states, invoice generation, proration, tax handling and dunning for failed payments.
Dodo Payments credit-based billing with credit entitlements, grants, balances, ledger deductions, rollover, expiry, low-balance alerts, and overage.
$ npx skills add hashgraph-online/awesome-codex-plugins --skill credit-based-billing -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install hashgraph-online/awesome-codex-plugins credit-based-billing --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ git clone --depth 1 https://github.com/hashgraph-online/awesome-codex-plugins.git skills-src && mkdir -p .claude/skills && cp -r skills-src/plugins/dodopayments/dodo-agent-plugin/skills/credit-based-billing .claude/skills/credit-based-billing && rm -rf skills-srcUse ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.
Claude Code skills documentation · loads skills from .claude/skills/
Install the "credit-based-billing" agent skill from https://github.com/hashgraph-online/awesome-codex-plugins/tree/main/plugins/dodopayments/dodo-agent-plugin/skills/credit-based-billing into .claude/skills/credit-based-billing/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "credit-based-billing", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/hashgraph-online/awesome-codex-plugins/tree/main/plugins/dodopayments/dodo-agent-plugin/skills/credit-based-billingType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add hashgraph-online/awesome-codex-plugins --skill credit-based-billing -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install hashgraph-online/awesome-codex-plugins credit-based-billing --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/hashgraph-online/awesome-codex-plugins.git skills-src && mkdir -p .agents/skills && cp -r skills-src/plugins/dodopayments/dodo-agent-plugin/skills/credit-based-billing .agents/skills/credit-based-billing && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "credit-based-billing" agent skill from https://github.com/hashgraph-online/awesome-codex-plugins/tree/main/plugins/dodopayments/dodo-agent-plugin/skills/credit-based-billing into .agents/skills/credit-based-billing/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "credit-based-billing", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add hashgraph-online/awesome-codex-plugins --skill credit-based-billing -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install hashgraph-online/awesome-codex-plugins credit-based-billing --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/hashgraph-online/awesome-codex-plugins.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/plugins/dodopayments/dodo-agent-plugin/skills/credit-based-billing .cursor/skills/credit-based-billing && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "credit-based-billing" agent skill from https://github.com/hashgraph-online/awesome-codex-plugins/tree/main/plugins/dodopayments/dodo-agent-plugin/skills/credit-based-billing into .cursor/skills/credit-based-billing/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "credit-based-billing", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/hashgraph-online/awesome-codex-plugins.git --path plugins/dodopayments/dodo-agent-plugin/skills/credit-based-billing--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add hashgraph-online/awesome-codex-plugins --skill credit-based-billing -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install hashgraph-online/awesome-codex-plugins credit-based-billing --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/hashgraph-online/awesome-codex-plugins.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/plugins/dodopayments/dodo-agent-plugin/skills/credit-based-billing .gemini/skills/credit-based-billing && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "credit-based-billing" agent skill from https://github.com/hashgraph-online/awesome-codex-plugins/tree/main/plugins/dodopayments/dodo-agent-plugin/skills/credit-based-billing into .gemini/skills/credit-based-billing/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "credit-based-billing", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install hashgraph-online/awesome-codex-plugins credit-based-billingInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add hashgraph-online/awesome-codex-plugins --skill credit-based-billing -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/hashgraph-online/awesome-codex-plugins.git skills-src && mkdir -p .github/skills && cp -r skills-src/plugins/dodopayments/dodo-agent-plugin/skills/credit-based-billing .github/skills/credit-based-billing && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "credit-based-billing" agent skill from https://github.com/hashgraph-online/awesome-codex-plugins/tree/main/plugins/dodopayments/dodo-agent-plugin/skills/credit-based-billing into .github/skills/credit-based-billing/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "credit-based-billing", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add hashgraph-online/awesome-codex-plugins --skill credit-based-billing -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install hashgraph-online/awesome-codex-plugins credit-based-billing --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/hashgraph-online/awesome-codex-plugins.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/plugins/dodopayments/dodo-agent-plugin/skills/credit-based-billing .opencode/skills/credit-based-billing && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "credit-based-billing" agent skill from https://github.com/hashgraph-online/awesome-codex-plugins/tree/main/plugins/dodopayments/dodo-agent-plugin/skills/credit-based-billing into .opencode/skills/credit-based-billing/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "credit-based-billing", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
credit-based-billingDodo Payments credit-based billing with credit entitlements, grants, balances, ledger deductions, rollover, expiry, low-balance alerts, and overage.
Credit Based Billing is an agent skill from hashgraph-online/awesome-codex-plugins. Dodo Payments credit-based billing with credit entitlements, grants, balances, ledger deductions, rollover, expiry, low-balance alerts, and overage. Use when selling prepaid or top-up credit packs, including credits in a plan, deducting AI token or API credits via meters, or granting promo credits; use usage-based-billing for direct per-unit charges.
Its SKILL.md is about 6.2k tokens, which your agent loads only when the skill is triggered. The skill folder holds 3 other files, including reference files (for example `references/ai-token-example.md` and `references/credit-webhooks.md`).
It sits in Backend & APIs, covering Payments and billing. The repository describes itself as: A curated list of awesome OpenAI Codex / ChatGPT plugins, skills, and resources. The 1 Codex Marketplace. See live plugins at: https://hol.org/plugins/best-codex-plugins. The licence is Apache-2.0.
4 steps, taken from the first numbered list in SKILL.md.
Read from SKILL.md and the folder at commit 9e7b281. It shows what the files ask for, not the result of running them.
Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.
From allowed-tools in the SKILL.md frontmatter.
No scripts in the folder and no shell commands in SKILL.md (its code samples are typescript).
From the folder's file list and the shell code blocks in SKILL.md.
Hosts in commands or code, which the agent is likely to contact:
test.dodopayments.comlive.dodopayments.comAlso links to:
docs.dodopayments.comFrom URLs in SKILL.md, links to its own repository left out.
Names these keys or tokens, usually read from environment variables:
DODO_PAYMENTS_API_KEYFrom names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
Credit Based Billing loads about 6.2k tokens when it runs, and up to ~7.7k if it reads all its reference files. Until then it costs about 93 tokens; SKILL.md has 2,513 words of instructions outside code blocks.
Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.
The automated check found no risky patterns in SKILL.md.
Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.
The full file from hashgraph-online/awesome-codex-plugins at commit 9e7b281, republished under its Apache-2.0 licence (© hashgraph-online). 2,513 words, ~6,155 tokens.
.claude/skills/credit-based-billing/SKILL.md (or your agent's skills folder). This skill also uses 2 other files; get the full folder from GitHub.Use this skill to build prepaid or included-credit billing for tokens, API calls, compute, storage, or currency-denominated value, with auditable grants and deductions.
| Requirement | Choose | Why |
|---|---|---|
| A fixed product with no tracked consumption | Plain subscription or one-time payment | No balance or usage pipeline is needed. |
| Bill each measured unit directly in money | Pure usage-based billing | A meter rates usage with price_per_unit; no prepaid pool is needed. |
| Include or pre-sell a consumable allowance | Credit-based billing | Grants create a balance that usage can consume. |
| Include credits, then charge beyond the allowance | Credits with overage | The credit pool is consumed first; configured overage handles the deficit. |
| Combine a base fee, included credits, and metered use | Usage-based product linked to a credit entitlement | The meter converts usage units into credit deductions. |
Credit-based and usage-based billing are complementary. Define and test meters with the usage-based-billing skill; this skill covers the credit side and the meter-to-credit link.
A credit entitlement is the reusable definition of a credit unit and its lifecycle: name, unit, precision, expiry, rollover, and overage. A grant is an issuance of that credit to one customer. Grants can originate from:
Credits gate how much a customer can consume. The separate entitlements resource gates fulfillment such as feature access, files, or license delivery. Do not confuse these SDK namespaces:
client.creditEntitlements credit definitions and balances
client.creditEntitlements.balances customer credit balances and ledger
client.entitlements feature/file/license entitlements
client.entitlements.files entitlement files
client.entitlements.grants fulfillment grantsUse client.customers.listCreditEntitlements(customerID) for the customer-level credit-entitlement view. Do not substitute client.customers.listEntitlements(...), which reads the other entitlement system.
| Credit model | Representation | Example |
|---|---|---|
| Custom unit | Application-defined units | tokens, calls, compute hours, GB-hours |
| Fiat | Currency value | USD or EUR prepaid balance |
Custom-unit precision is configurable from 0 through 10; the dashboard default is 2. Precision cannot be changed after creation, so choose it before issuing grants. Use 0 for indivisible units such as whole requests. Use decimal precision only when fractional credits are meaningful.
Fiat examples use currency minor units: 5,000 credits represents USD 50 in the documented OpenAI example. Do not infer a universal fiat precision rule beyond the documented minor-unit model. All monetary amounts are in the currency's smallest unit (for example, cents for USD).
A product can carry up to five credit entitlements. Each can have independent issuance and lifecycle settings.
The balance response includes balance, overage, last_transaction_at, identifiers, and timestamps. Treat credit amounts as decimal strings; do not pass them through binary floating-point arithmetic.
Every transaction has a ledger record with:
balance_before and balance_after;overage_before and overage_after;This ledger is the audit trail and provides transaction-level balance snapshots. There is no separately documented historical balance-snapshots endpoint.
Keep API keys server-side. Dodo Payments keys use dodo_test_... and dodo_live_... prefixes.
import DodoPayments from 'dodopayments';
const client = new DodoPayments({
bearerToken: process.env['DODO_PAYMENTS_API_KEY'],
environment: 'test_mode',
});The SDK defaults to live_mode when environment is omitted. Use test_mode explicitly during development.
The confirmed TypeScript method is client.creditEntitlements.create(...).
import DodoPayments from 'dodopayments';
const client = new DodoPayments({
bearerToken: process.env['DODO_PAYMENTS_API_KEY'],
environment: 'test_mode',
});
const tokenCredits = await client.creditEntitlements.create({
name: 'AI Token Credits',
description: 'Credits consumed by model token usage',
unit: 'token credit',
precision: 0,
expires_after_days: 30,
rollover_enabled: true,
rollover_percentage: 25,
rollover_timeframe_count: 1,
rollover_timeframe_interval: 'Month',
max_rollover_count: 2,
overage_enabled: true,
overage_behavior: 'invoice_at_billing',
overage_limit: 100000,
price_per_unit: '1',
currency: 'USD',
});
console.log(tokenCredits.id);price_per_unit is a decimal string in the configured currency; monetary values use the currency's smallest unit. In this example, '1' is one cent per overage credit for USD.
| Field | Required | Meaning and constraints |
|---|---|---|
name | Yes | Display name for the credit entitlement. |
unit | Yes | Unit label such as API Calls, Tokens, or Credits. |
precision | Yes | Decimal places, 0–10; immutable after creation. |
description | No | Optional description. |
expires_after_days | No | Nullable number of days after issuance before expiry. |
rollover_enabled | Yes | Enables or disables carry-forward. |
rollover_percentage | No | Percentage carried forward, 0–100. |
rollover_timeframe_count | No | Number of rollover-validity intervals. |
rollover_timeframe_interval | No | Day, Week, Month, or Year. |
max_rollover_count | No | Maximum consecutive rollovers before forfeiture. |
overage_enabled | Yes | Allows deficit handling after credits are exhausted. |
overage_behavior | No | End-of-cycle behavior from the exact enum below. |
overage_limit | No | Maximum allowed overage units. |
price_per_unit | Conditional | Decimal string; required when overage is enabled. |
currency | Conditional | Required when a price is present. Monetary values use the smallest currency unit. |
Rollover carries eligible unused credits into a new grant. Configure:
rollover_enabled: true.rollover_percentage as the carry-forward cap from 0 through 100.rollover_timeframe_count and rollover_timeframe_interval; neither should be supplied alone.max_rollover_count if credits may roll only a limited number of consecutive times.Rollover is applied before expiry; only the remainder expires.
The API represents expiry as nullable expires_after_days. The dashboard offers 7, 30, 60, 90, custom days, or never; its default is 30 days, and custom expiry has a one-day minimum. Use null for no API-configured expiry only where the current API form permits it.
Exact overage_behavior value | Result at billing-cycle end |
|---|---|
forgive_at_reset | Do not charge and do not preserve the deficit. This is the default. |
invoice_at_billing | Charge the overage at billing, then reset it. |
carry_deficit | Preserve the negative balance. |
carry_deficit_auto_repay | Preserve the deficit and repay it from newly issued credits. |
When overage_enabled is true, price_per_unit is required; when a price is present, currency is required. Use overage_limit to cap allowed overage units.
When overage is disabled, Dodo stops deducting after the balance reaches zero. Meter processing is asynchronous, so this is not synchronous authorization for your application requests. Implement application-side enforcement when requests must be rejected immediately.
Credits are attached to products as credit entitlements in the product creation or edit flow. Do not use client.entitlements.grants to attach or issue credit balances.
In Products → Create Product or an existing product:
The customer receives a fresh grant each billing cycle.
Attach the credit entitlement to a single-payment product or add-on and configure the one-time amount. The purchase issues one grant. This is the supported shape for prepaid packs, top-ups, and promotional bundles.
Attach the credit entitlement to the same usage-based product as the meter. The confirmed meter attachment fields are:
| Field | Purpose |
|---|---|
meter_id | Meter to aggregate usage. |
free_threshold | Free usage excluded before rating - applies only when the meter bills in money. It is ignored for credit-billed meters: every unit is deducted from the credit balance. |
credit_entitlement_id | Credit pool consumed by this meter. |
meter_units_per_credit | Usage units required to deduct one credit; required when credit_entitlement_id is set. |
price_per_unit | Direct per-unit monetary price when using pure usage pricing; decimal string. |
Product attachment request shapes can evolve. Configure them in the dashboard or copy the current schema from the Create Product API; do not invent an entitlements, credits, or grants payload.
Product purchase creates the customer grant; checkout does not accept an ad hoc credit amount.
const session = await client.checkoutSessions.create({
product_cart: [
{
product_id: 'pdt_ai_pro_plan',
quantity: 1,
},
],
customer: { email: 'customer@example.com' },
return_url: 'https://app.example.com/billing/success',
});
console.log(session);Use checkoutSessions.create, not the deprecated payments.create or subscriptions.create methods.
Use the customer resource when the application needs to discover all credit entitlements associated with a customer:
const customerCredits = await client.customers.listCreditEntitlements(
'cus_TV52uJWWXt2yIoBBxpjaa',
);
console.log(customerCredits);Use the balance resource below when the credit entitlement ID is already known and an exact balance is required.
The confirmed method takes the customer ID first and the credit entitlement ID inside the options object:
const customerCreditBalance = await client.creditEntitlements.balances.retrieve(
'cus_TV52uJWWXt2yIoBBxpjaa',
{ credit_entitlement_id: 'cde_ztxm5XJsKxWucRWA3rjdM' },
);
console.log({
balance: customerCreditBalance.balance,
overage: customerCreditBalance.overage,
lastTransactionAt: customerCreditBalance.last_transaction_at,
});balance and overage are decimal strings in the entitlement's credit unit. They are not currency amounts unless the entitlement itself represents fiat value.
Manual credits are appropriate for promotions, migrations, refunds implemented as credit, and support gestures. Use a stable idempotency key derived from the business operation so a retry cannot grant twice.
async function grantSupportCredits(
customerId: string,
creditEntitlementId: string,
supportCaseId: string,
): Promise<string> {
const entry = await client.creditEntitlements.balances.createLedgerEntry(
customerId,
{
credit_entitlement_id: creditEntitlementId,
amount: '500',
entry_type: 'credit',
expires_at: '2027-01-31T23:59:59Z',
idempotency_key: `support-credit:${supportCaseId}`,
reason: `Support gesture for case ${supportCaseId}`,
metadata: { support_case_id: supportCaseId },
},
);
return entry.id;
}amount is a decimal string backed by NUMERIC(38,28); its integer part must be below 10^10. expires_at applies to credits. Keep the amount within the entitlement's configured precision.
If the same idempotency_key already exists, the API can return 409. Treat that as a signal to reconcile the original operation, not as permission to generate a new key and retry the grant.
Use the same method with entry_type: 'debit'. Debits consume the earliest-expiring grants first and can return 400 when the balance is insufficient.
async function deductJobCredits(
customerId: string,
creditEntitlementId: string,
jobId: string,
amount: string,
): Promise<{ balanceAfter: string; overageAfter: string }> {
const entry = await client.creditEntitlements.balances.createLedgerEntry(
customerId,
{
credit_entitlement_id: creditEntitlementId,
amount,
entry_type: 'debit',
idempotency_key: `job-debit:${jobId}`,
reason: `Credit deduction for job ${jobId}`,
metadata: { job_id: jobId },
},
);
return {
balanceAfter: entry.balance_after,
overageAfter: entry.overage_after,
};
}Do not manually debit usage that is also connected to automatic meter-to-credit deduction; that charges the same consumption twice.
The SDK returns an auto-paginating iterable:
for await (const entry of client.creditEntitlements.balances.listLedger(
'cus_TV52uJWWXt2yIoBBxpjaa',
{ credit_entitlement_id: 'cde_ztxm5XJsKxWucRWA3rjdM' },
)) {
console.log({
id: entry.id,
amount: entry.amount,
balanceBefore: entry.balance_before,
balanceAfter: entry.balance_after,
overageBefore: entry.overage_before,
overageAfter: entry.overage_after,
createdAt: entry.created_at,
});
}Persist the Dodo ledger entry ID with internal order, support-case, or job IDs. Reconciliation should compare ledger entries and source references rather than overwrite history from a cached balance.
credit_entitlement_id and meter_units_per_credit.event_name matches the meter.A background worker processes new usage approximately every minute, aggregates it according to the meter, converts meter units using meter_units_per_credit, and deducts from non-expired grants with the earliest-expiring grants consumed first. There is no free threshold on a credit-billed meter. Multiple meters can consume one shared credit pool at different conversion rates.
This delay is material: an accepted usage event does not imply that a balance read immediately afterward includes its deduction.
Use the usage-based-billing skill to create the meter, choose count, sum, max, or last, define its filter, and validate event batching and metadata.
Full guide: references/ai-token-example.md.
Full guide: references/credit-webhooks.md.
Covers:
For a precision-0 entitlement, a server can perform a coarse pre-check with integer-safe parsing:
async function hasAtLeastWholeCredits(
customerId: string,
creditEntitlementId: string,
required: bigint,
): Promise<boolean> {
const response = await client.creditEntitlements.balances.retrieve(
customerId,
{ credit_entitlement_id: creditEntitlementId },
);
return BigInt(response.balance) >= required;
}Use this only for precision 0. For fractional credits, use an arbitrary-precision decimal implementation that preserves the entitlement's configured precision.
This read is not a reservation. Two concurrent requests can both observe enough balance, and automatic meter deductions may not yet be reflected.
Choose one of these patterns:
400 as denial. If work fails after debit, issue a separately idempotent compensating credit with a linked reason. Do not also meter the same usage.balance > 0.Return an application-level payment/credit-required response with a top-up or upgrade path when authorization fails. Do not expose Dodo API errors or secrets to the client.
event_id or idempotency_key after a timeout can duplicate usage or adjustments.creditEntitlements and entitlements are different. Credit balances do not live under client.entitlements.grants.balances.retrieve(customerId, { credit_entitlement_id }), not balances.get(creditId, customerId).createLedgerEntry receives customerId first; credit_entitlement_id belongs in the request object.type or description for adjustments. Confirmed fields are entry_type and reason.creditEntitlements.balances.listGrants(customerID, params) does exist and takes the customer id first, with the entitlement supplied in the params object. It returns a paginated page, so read .items rather than treating the result as an array. Use customers.listCreditEntitlements(customerID) when you want the customer-level summary instead.available_balance as the balance API field. The confirmed balance response uses balance and overage; available_balance belongs to the dedicated low-balance webhook payload.0–10 for custom units and cannot be changed after creation.NUMERIC(38,28), and the integer part must be below 10^10.400 for insufficient balance; route the customer to top-up or your overage policy.event_name matching is case-sensitive.event_id values in the same ingestion request reject the entire request. Previously ingested IDs are ignored on retry.meter_units_per_credit is usage units required for one credit, and is required when credit_entitlement_id is set.free_threshold applies only to meters billed in money. When Bill usage in Credits is on, every unit deducts credits; model included usage as granted credits instead.rollover_timeframe_count and rollover_timeframe_interval must be supplied together.Day, Week, Month, and Year.forgive_at_reset, invoice_at_billing, carry_deficit, or carry_deficit_auto_repay.price_per_unit; a price requires currency.credit.overage_reset and credit.rollover_forfeited, not only added, deducted, and low-balance events.client.webhooks.unwrap() as covered in webhook-integration; never hand-roll HMAC or trust re-serialized JSON.balance_before and balance_after for transaction-level history.client.checkoutSessions.create(...), not payments.create(...) or subscriptions.create(...).https://test.dodopayments.com and https://live.dodopayments.com; keys start with dodo_test_ or dodo_live_.© hashgraph-online, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
SKILL.md and 2 other files (references) in plugins/dodopayments/dodo-agent-plugin/skills/credit-based-billing of hashgraph-online/awesome-codex-plugins.
Open the folder on GitHubat commit 9e7b281
Credit Based Billing next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| Credit Based Billing this skillhashgraph-online/awesome-codex-plugins | 1.3k | — | ~6.2k | Automated safety check: Pass | Apache-2.0 | |
| Billing Automationwshobson/agents | 40k | 13 repos | ~473 | Automated safety check: Pass | MIT | |
| Stripe Best Practicesfossasia/eventyay | 1.7k | 1 repos | ~1.7k | Automated safety check: Pass | Apache-2.0 | |
| Pinme Uniwebpayglitternetwork/pinme | 3.7k | — | ~7.3k | Automated safety check: Pass | MIT | |
| PayRam Payment AnalyticsPayRam/payram-mcp | 158 | — | ~4.1k | Automated safety check: Pass | None | |
| Test Convt Serveropencoredev/convt | 258 | — | ~1.6k | Automated safety check: Pass | AGPL-3.0 |
wshobson/agents
Covers building subscription billing: billing cycles, subscription states, invoice generation, proration, tax handling and dunning for failed payments.
fossasia/eventyay
Guides Stripe integration decisions across development and test environment planning (separate sandboxes vs the shared test mode sandbox), API selection (Checkout Sessions vs PaymentIntents)…
glitternetwork/pinme
A skill your agent uses when generating, modifying, or reviewing PinMe Worker (Cloudflare Worker TypeScript) code that accepts payments through UniwebPay — payment links, products/prices, checkout…
PayRam/payram-mcp
Queries a PayRam server's dashboard data through its REST APIs with a Bearer token: payment search, daily volume, unswept balances, sweep history and on-ramp metrics.
opencoredev/convt
Run and verify the convt jobs API, Postgres queue, object storage, sandbox worker and metering locally.
aws/agent-toolkit-for-aws
Deploys, queries, and debugs AWS Marketplace usage-based (PAYG) metering — the pipeline (ResolveCustomer, BatchMeterUsage, EventBridge via SAM) and querying/debugging metering records, statuses…
hashgraph-online/awesome-codex-plugins
Create original anime-style reaction stickers as looping GIFs and MP4 previews, using generated character pose sheets and timed key poses.
hashgraph-online/awesome-codex-plugins
Manage and query Calibre libraries with the calibredb CLI (local paths or Calibre Content server URLs).
hashgraph-online/awesome-codex-plugins
A skill your agent uses when adding, changing, testing, or debugging Rust HTTP APIs and services, especially when Codex needs black-box integration tests, random-port app startup, real database test…
hashgraph-online/awesome-codex-plugins
Make a studio's game look like something at build time — a cover from a real frame of the game (free), painted covers, backdrops, textures and character plates from image models through the…
hashgraph-online/awesome-codex-plugins
Use CALL-E from Codex through the calle CLI. An agent skill from hashgraph-online/awesome-codex-plugins.
hashgraph-online/awesome-codex-plugins
Balance game difficulty, resources, rewards, probability, progression, economies, and dominant strategies.
Categories
Dodo Payments credit-based billing with credit entitlements, grants, balances, ledger deductions, rollover, expiry, low-balance alerts, and overage. Credit Based Billing is an agent skill from hashgraph-online/awesome-codex-plugins. Dodo Payments credit-based billing with credit entitlements, grants, balances, ledger deductions, rollover, expiry, low-balance alerts, and overage.
Credit Based Billing fits situations like: selling prepaid; top-up credit packs; including credits in a plan; deducting AI token.
Run `npx skills add hashgraph-online/awesome-codex-plugins --skill credit-based-billing -a claude-code`. Or copy the skill folder (plugins/dodopayments/dodo-agent-plugin/skills/credit-based-billing in hashgraph-online/awesome-codex-plugins) into .claude/skills/credit-based-billing in your project. Claude Code loads it when a task matches its description.
Run `npx skills add hashgraph-online/awesome-codex-plugins --skill credit-based-billing -a codex`. Or copy the skill folder (plugins/dodopayments/dodo-agent-plugin/skills/credit-based-billing in hashgraph-online/awesome-codex-plugins) into .agents/skills/credit-based-billing in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add hashgraph-online/awesome-codex-plugins --skill credit-based-billing -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/credit-based-billing, .gemini/skills/credit-based-billing, .github/skills/credit-based-billing and .opencode/skills/credit-based-billing in your project.
Going by SKILL.md and its folder, Credit Based Billing needs credentials named DODO_PAYMENTS_API_KEY. Our summary lists: A credential in DODO_PAYMENTS_API_KEY.
SKILL.md names 3 domains. In commands or code: test.dodopayments.com and live.dodopayments.com; the agent is likely to contact these when it follows the instructions. As links in the text: docs.dodopayments.com. This is read from the text; nothing was executed.
Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.
Credit Based Billing is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.
About 6.2k tokens (SKILL.md is roughly 25k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 1.6k tokens, read only when the agent opens those files.
Skills that share tags, products or a category with Credit Based Billing: Billing Automation (wshobson/agents, 40k stars), Stripe Best Practices (fossasia/eventyay, 1.7k stars), Pinme Uniwebpay (glitternetwork/pinme, 3.7k stars) and PayRam Payment Analytics (PayRam/payram-mcp, 158 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
hashgraph-online (a GitHub organization) maintains it in hashgraph-online/awesome-codex-plugins, which has 1,255 GitHub stars. The repository holds 714 skills in this directory. The repository was last updated on October 9, 2026.
Source: hashgraph-online/awesome-codex-plugins on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.