Catalog
stripe/metronome

stripe

metronome

Guides Metronome usage-based billing integration decisions — event ingestion (single and batch, idempotency, billable metrics), contract design (rate cards, overrides, dimensional pricing, products), invoicing lifecycle (grace periods, finalization, Stripe sync), credit and commit management (prepaid, postpaid, thresholds, auto-recharge), and Stripe integration (arrears invoicing, tax providers, line item limits). Use when building, modifying, or reviewing any Metronome integration — including ingesting usage events, creating contracts or rate cards, managing credits and commits, configuring invoicing, or syncing invoices with Stripe Billing.

v1.0LATEST
NewUpdated Sep 19, 2026

Metronome API base: https://api.metronome.com. Authenticate with a Bearer token in the Authorization header. Always use Contracts (not legacy Plans) for new integrations.

Integration routing

Building… Recommended API Details
Ingesting usage events POST /v1/ingest (batch) Send usage events, the API quickstart, the Ingest API reference, and Set ingest aliases
Defining what to measure Billable Metrics API Create billable metrics
Enterprise pricing agreements Contracts + Rate Cards Provision a customer contract, Create and manage rate cards, and the Create a contract and Add rates API references
Mid-term contract changes Contract Edits Edit a contract, Contract edits and overrides, and Manage contract lifecycle
Invoice lifecycle and finalization Invoices API How Metronome invoices work
Prepaid or postpaid commitments and one-off top-ups Commits + Credits Apply credits and commits to contracts and Payment-gated commits
Syncing invoices to Stripe Stripe billing provider config Invoice with Stripe
Prepaid balances, auto-recharge, spend alerts, and thresholds Notifications API Set prepaid balance thresholds, Enforce spend thresholds, and Threshold notifications

Read the linked page before answering any integration question or writing code; the links return plain Markdown. If no row fits, use the documentation index to find the right page, and append .md to the page URL to fetch it as Markdown.

Critical rules

  • Always read the linked documentation page before naming a Metronome endpoint, field, or amount. Endpoint paths, request shapes, and units can be misremembered; the routing table above points to the page for each task.
  • Always use Contracts, not legacy Plans, for new customers. Plans are deprecated and lack rate card overrides, commits, and flexible scheduling. An existing Plans integration keeps working: don’t propose migrating it unless asked, and when migrating move credit balances with POST /v1/credits/migrateToContracts.
  • Always use Edits (POST /v2/contracts/edit), not deprecated Amendments (/v1/contracts/amend), for mid-term changes to a contract (new products, commits, overrides). Edits are the actively invested path and required for v2 subscription features. Create a new contract with transition: {type: "renewal", from_contract_id} only for renewals.
  • Always use batch ingestion (POST /v1/ingest with a bare JSON array of 1 to 100 event objects as the request body, not wrapped in an object) for production workloads. Single-event ingestion is acceptable only for testing. A 200 means the events were accepted, not rated: events whose event_type matches no billable metric are stored but excluded from usage, so create billable metrics before sending.
  • Always include a unique transaction_id on every event, fixed when the event is recorded and re-sent unchanged on every retry: a UUID stored with the event, or a value derived from the source record. This is the idempotency key that prevents double-counting on retries; an ID regenerated per attempt defeats it.
  • Always deliver usage for a billing period before its grace period ends (24 hours after billing_period_end_date by default). A finalized invoice ignores late events and can only be corrected by voiding and regenerating it; if your pipeline’s worst-case lag exceeds the grace period, ask Metronome support to lengthen it (it isn’t configurable through the API).
  • Always set a usage_filter (group_key and group_values) on each contract when a customer has more than one concurrent contract, so usage is rated on one contract instead of all of them. The group key must be a group key on the streaming billable metric (an event property for SQL metrics).
  • Never schedule a contract-level commit or credit access segment past the contract’s ending_before. Usage after the contract ends isn’t rated on it, so balance released after that date is stranded; end the last segment at the contract term and use rollover_fraction to carry a remaining balance into a renewal.
  • Never put applicable_product_ids, applicable_product_tags, or specifiers on a spend_threshold_configuration commit. Spend-threshold commits apply to all usage and take only product_id, name, description, and priority; only prepaid_balance_threshold_configuration commits accept product filters.
  • Never process multiple Metronome invoices for the same Stripe customer simultaneously. Concurrent processing causes race conditions on pending line items.
  • Never hardcode pricing directly in contracts. Define pricing in rate cards and use contract-level overrides for custom rates. This ensures un-overridden pricing stays current when the rate card changes.
  • Always send USD amounts in cents. Metronome’s default USD credit type is denominated in cents (1000 is 10.00 USD) for thresholds, commits, credits, and rate or override prices; other currencies use whole units.
  • Never finalize a Stripe invoice before tax calculation completes. If using Stripe Tax, Avalara, or Anrok, the tax provider must process the invoice before finalization.
  • Never exceed 250 line items per Stripe invoice. Exceeding this limit causes all line items to collapse into a single entry, losing per-product detail. Plan product granularity and use composite products to aggregate high-cardinality metrics.
  • Always reconcile payments against the Stripe invoice total, never the Metronome invoice total. Metronome sends untaxed line items and Stripe adds tax at finalization, so the Metronome total is pre-tax and can differ by sub-cent rounding.
  • Never set NetSuite as both a contract’s billing_provider_configuration and its revenue_system_configuration. Use the billing configuration when NetSuite issues and collects the invoice; use the revenue system configuration only when another provider such as Stripe bills and NetSuite needs the invoice for revenue recognition.

Key documentation

When the user’s request doesn’t clearly fit a single domain above, consult:

Files1
1 files · 1.1 KB

Select a file to preview

Overall Score

82/100

Grade

B

Good

Grades are signals, not a certification. Always review a skill yourself before use.

Safety

88

Quality

82

Clarity

85

Completeness

74

Summary

This skill guides developers on Metronome usage-based billing integration, covering event ingestion, contract and rate card design, invoicing lifecycle, credits/commits, and Stripe synchronization. It provides a routing table mapping tasks to recommended APIs, critical business rules, and links to documentation resources.

Detected Capabilities

http requestapi integrationdocumentation reference

Trigger Keywords

Phrases that agents use to match this skill to user intent.

metronome usage billingcontract rate cardusage-based pricingstripe billing syncbilling event ingestionprepaid creditsinvoice finalizationcustomer contracts

Risk Signals

INFO

Links to external documentation (docs.metronome.com, docs.stripe.com)

SKILL.md: Integration routing table and Key documentation section
INFO

API authentication via Bearer token

SKILL.md: Introductory paragraph (Metronome API base)

Referenced Domains

External domains referenced in skill content, detected by static analysis.

api.metronome.comdocs.metronome.comdocs.stripe.com

Use Cases

  • Ingesting usage events for billing from application events
  • Designing contracts and rate cards for usage-based pricing models
  • Managing prepaid credits and commit balances across customer contracts
  • Syncing Metronome invoices with Stripe Billing
  • Handling mid-contract pricing changes and overrides
  • Configuring billing period grace periods and invoice finalization
  • Setting up spend thresholds and balance notifications

Quality Notes

  • Excellent use of structured routing table mapping tasks to specific APIs and documentation pages — this eliminates ambiguity about which endpoint to use for each use case
  • Comprehensive critical rules section covering idempotency, deprecation guidance, timing constraints, and common pitfalls — these are actionable guardrails that prevent costly integration errors
  • Clear deprecation path (Plans → Contracts, Amendments → Edits) with explicit guidance on when migration is appropriate
  • Strong emphasis on reading documentation before naming endpoints or fields, reducing the risk of API misuse due to stale knowledge
  • Well-defined scope boundaries: the skill is specific to Metronome and Stripe integration, not a generic billing system
  • Rules address non-obvious gotchas: USD in cents, line item limits, tax provider timing, concurrent invoice processing — these would be hard to discover without expert guidance
  • Documentation links are in Markdown format, making them machine-readable for automated retrieval
  • Missing: concrete code examples showing event ingestion, contract creation, or Stripe sync patterns — guidance is conceptual rather than demonstrating syntax
  • Missing: error handling patterns (what to do when ingestion fails, rate limit backoff, webhook retry logic)
  • Missing: troubleshooting section for common integration issues (late events, usage not appearing in invoices, Stripe sync failures)
Model: claude-haiku-4-5-20251001Analyzed: Sep 19, 2026

Reviews

Add this skill to your library to leave a review.

No reviews yet

Be the first to share your experience.

Use stripe/metronome in your dev environment

Command Palette

Search for a command to run...