Aurora Meter Pro README

Latest release v0.2.2 · 2026-09-08 · this is the file that ships inside the package

Aurora Meter Pro

Commercial Pro tier for Aurora Meter — Stripe checkout + webhook sync, metered usage reporting, hosted usage dashboards, quota alerts, and historical rollups.

Requires the free aurora_meter core and a valid commercial license.

Install

def deps do
  [
    {:aurora_meter, "~> 0.3"},
    {:aurora_meter_pro, "~> 0.2", organization: "phxtemplates"}
  ]
end

Then configure the Stripe provider:

config :aurora_meter,
  provider: AuroraMeter.Pro.Stripe,
  period_source: AuroraMeter.Pro.Period

config :aurora_meter_pro,
  stripe_prices: %{pro: "price_flat_pro", scale: "price_flat_scale"},
  # usage-based prices on a Billing Meter, attached at checkout so overage is invoiced
  stripe_metered_prices: %{scale: ["price_scale_overage"]},
  stripe_meters: %{ai_generations: "ai_generations"},
  webhook_secret: {:system, "STRIPE_WEBHOOK_SECRET"},
  stripe_portal_configuration: {:system, "STRIPE_PORTAL_CONFIGURATION"}, # optional
  alert_handler: &MyApp.Billing.quota_alert/1

Mount the webhook before Plug.Parsers and schedule the workers with Oban:

# endpoint.ex
plug AuroraMeter.Pro.Webhook  # or forward "/webhooks/stripe" from a raw-body route

# config
config :my_app, Oban,
  queues: [aurora_meter: 5],
  plugins: [{Oban.Plugins.Cron, crontab: [
    {"0 * * * *", AuroraMeter.Pro.UsageReporter},
    {"15 2 * * *", AuroraMeter.Pro.Rollup},
    {"*/10 * * * *", AuroraMeter.Pro.Alerts}
  ]}]

In Stripe, give each metered price a graduated tier with the included allowance at $0 and the overage unit price above it; the reporter sends total usage deltas and Stripe applies the tiers.

What it adds

  • BillingAuroraMeter.Billing.checkout/3 and portal_url/2 via Stripe, plus a webhook plug that keeps subscriptions in sync.
  • Usage reporting — metered overage pushed to Stripe Billing Meters, exactly once, on an Oban schedule.
  • Dashboards — a styled, themeable usage_dashboard/1 component (quota cards, SVG daily charts, monthly history) and a mountable LiveView, both live.
  • Alerts — quota-threshold telemetry and a handler callback, for hard caps and metered allowances.
  • Rollups — daily/monthly historical aggregates and CSV export.

License

Commercial — see LICENSE.commercial. Plans, the free trial and your package key: https://aurorameter.com/pricing. Licence terms and refunds: https://www.phxtemplates.com/licensing. Aurora Meter is built by the team behind PhxTemplates.