Count what a plan charges by use

Add a paid plan's counted prices (storage above what it includes) to a person's subscription on this service's Stripe account, and send each day's count of what they keep above it

Runs only on this service's operator account. A paid checkout or renewal starts it to add the plan's counted prices to the subscription (src/payment.mjs startPlanUsage); each paying account's store starts it once a day with that day's count (src/plan-usage.mjs). Uses the operator's Stripe connection; nothing is counted while the subscription is in its free trial or after it ends, and each day's count carries its own identifier so it is counted once.

What it asks for

  • subscription_id (Needed, words): The subscription the counted prices are on
  • attach (Optional, list): Counted prices to add to the subscription when it does not carry them yet
  • report (Optional, list): One day's counts
  • allocation_offer_id (Optional, words):

Use it from your AI

Connect the AI you already use to Trillion once. Then ask in your own words; your AI finds this tool by what it does and runs it.

Say to your AI: “Use Trillion to add a paid plan's counted prices (storage above what it includes) to a person's subscription on this service's Stripe account, and send each day's count of what they keep above it”

What your AI calls: run_tool {"tool_id":"tool:meter-plan-usage"}