credit-based-billing

credit-based-billing is a skill for Claude Code, Codex from dodopayments/dodo-agent-plugin. It costs 40 tokens per session (6,727 once invoked), scanned A, a copy of credit-based-billing, MIT.

A guide for billing customers with credits that are granted, prepaid, promotional, or bought as top-ups. Credits are a tracked allowance that can be spent on measured usage such as API calls, storage, or compute.

In plain words
What is it for?
Adding credits to subscriptions, selling top-up packs, deducting credits from usage, granting promotional credits, handling overage charges, and reconciling balances with an audit trail.
Why use it?
It provides a record of how credits are added and spent, while supporting expiry, rollover, low-balance alerts, and charges after the allowance runs out.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Part of the dodopayments plugin — 17 skills, 2 MCP servers shipped together

Good fit Adding credits to subscriptions, selling top-up packs, deducting credits from usage, granting promotional credits, handling overage charges, and reconciling balances with an audit trail.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/dodopayments/dodo-agent-plugin/credit-based-billing
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add dodopayments/dodo-agent-plugin --skill credit-based-billing
Clone the repo
git clone --depth 1 https://github.com/dodopayments/dodo-agent-plugin

Made for: Claude Code, Codex.

Or install dodopayments, the plugin that ships this one along with the rest of its 17 skills, 2 MCP servers.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for credit-based-billing

README.md
[![agentmods](https://agentmods.dev/badge/skills/dodopayments/dodo-agent-plugin/credit-based-billing.svg)](https://agentmods.dev/skills/dodopayments/dodo-agent-plugin/credit-based-billing)
Your own site
<a href="https://agentmods.dev/skills/dodopayments/dodo-agent-plugin/credit-based-billing"><img src="https://agentmods.dev/badge/skills/dodopayments/dodo-agent-plugin/credit-based-billing.svg" alt="Measured on agentmods" height="20"></a>
Per session 40 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 6,727 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin 100% copy Near-identical to another mod in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00040 $0.06727
Opus 5 $0.00020 $0.03363
Sonnet 5 $0.00008 $0.01345
Haiku 4.5 $0.00004 $0.00673

Measured 8d ago against content hash d98cc82e3633, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-07, from the pricing page.

Security

Grade A, and why

credit-based-billing scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 8d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

Origin

This is a copy

100% identical to credit-based-billing — 0 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

plugins/dodopayments/skills/credit-based-billing/SKILL.md · 616 lines

How it starts

The opening of the file, as written. The whole thing — 616 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Dodo Payments Credit-Based Billing

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.

When to use this skill

  • Include a recurring credit allowance in a subscription.
  • Sell one-time top-up packs or prepaid usage.
  • Deduct credits from metered AI, API, or compute consumption.
  • Grant promotional or support credits and record a reason.
  • Configure expiry, rollover, low-balance alerts, or overage.
  • Reconcile a customer's balance against an immutable ledger trail.

Choose the billing model

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.

Core concepts

Credit entitlements and grants

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:

  • a subscription, reissued each billing cycle;
  • a one-time product or add-on;
  • a direct API ledger credit;
  • rollover from an earlier grant.

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:

Read the full file on GitHub · 616 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 8d ago First seen · 616 lines · 40 tokens per session scan A d98cc82e3633

Subscribe to this mod's changes

credit-based-billing is a skill published in the GitHub repository dodopayments/dodo-agent-plugin (6 stars, last pushed today), licensed MIT. It adds 40 tokens to every session and 6,727 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. It is 100% identical to credit-based-billing, differing in 0 lines, and is treated as a copy.

Related

Other skills, from other repositories

bilt

Search Bilt Rewards travel portal for cash and Bilt Points pricing on hotels and flights. Public REST API, no auth required. Includes Home Away From Home (HaFH) properties with $300+ benefits.

borski/travel-hacking-toolkit · 44 tokens

amex-travel

Search Amex travel portal for cash prices, MR points pricing, IAP discounts, and FHR/THC hotel benefits via Patchright. Use when comparing pay-with-points portal pricing to award alternatives.

borski/travel-hacking-toolkit · 47 tokens

compare-flights

Unified flight comparison across cash (Duffel, Ignav), award (seats.aero), and portal (Chase, Amex) sources in parallel. Outputs one table with transfer partner optimization and recommendations.

borski/travel-hacking-toolkit · 46 tokens

transfer-partners

Credit card to loyalty program transfer ratios. Cross-references seats.aero award prices with transfer ratios to find the cheapest path from UR, MR, TYP, Capital One, or Bilt to any mileage program.

borski/travel-hacking-toolkit · 47 tokens

award-holds

Per-program rules for placing award flights on hold before transferring points. Covers programs with holds (AA, Lufthansa, Flying Blue, Cathay, Turkish, Virgin Atlantic, ANA, Emirates, EVA Air) and those without. Includes transfer-speed reference.

borski/travel-hacking-toolkit · 53 tokens

chase-travel

Search Chase UR travel portal via Patchright for cash prices, points pricing, Points Boost offers, and Chase Edit hotel benefits. Use for pay-with-points portal comparison on Sapphire Reserve/Preferred.

borski/travel-hacking-toolkit · 44 tokens