Repository navigation
AshBilling v0.7.0
Highlights
- Subscription Quantity & Item Synchronization: Added protected nullable
quantity(:integer,min: 0) andprovider_subscription_item_id(:string) attributes toAshBilling.Subscription.WebhookSyncandAshBilling.reconcile_subscription/2extract, persist, compare, and CAS-guard both attributes for single-item subscriptions with fail-closed validation (nilpreserved when absent/null,0preserved as zero seats, negative/malformed values fail closed with{:error, :invalid_quantity}). - Diagnostics Engine & Doctor CLI (
AshBilling.Diagnostics,mix ash_billing.doctor): ExtendedAshBilling.check_configuration/1(backwards-compatible) with layered structural, read-only PostgreSQL schema/migration/index checks (0.6.0&0.7.0),WebhookEventprivacy verification, multitenancy/Repo checks, HTTP timeout guidance, optional read-only Stripe probes, and explicitconfiguration_validvsproduction_readyreporting in text and--json. - Reconciliation CLI (
AshBilling.Reconciler,mix ash_billing.reconcile): Read-only--dry-rundefault, mandatory--execute --confirmfor writes, fail-closed selection filter validation, stable keyset streaming batch pagination, bounded concurrency, global cross-worker rate limiting, and strict Ash actor/policy, multitenant, and database-level Stripe Connect isolation. - Low-Cardinality Telemetry & Dashboard Guide: Instrumented
[:ash_billing, :reconcile, ...],[:ash_billing, :reverify, ...],[:ash_billing, :deduplication, :acquire | :complete | :release],[:ash_billing, :postgres, :contention], and[:ash_billing, :reconciler, :batch]with low-cardinality metadata and drift detection, plus aTelemetry.Metricsdashboard guide. - Runnable SaaS Reference Application (
examples/saas_example): Full runnable Phoenix + Ash + AshPostgres SaaS app with Docker Compose (PostgreSQL 16), migrations, guarded demo seeds, PBKDF2 auth + actor freshness, Stripe Checkout/Portal/plan swap/quantity update/cancel/resume/reconciliation, transactionalFOR UPDATEseat enforcement,Subscribed&HasPricepolicies, HMAC-verified webhooks with PostgreSQL deduplication,mix ash_billing.doctor/mix ash_billing.reconcile, and CI test coverage.
Upgrading from 0.6.0
Requires adding nullable quantity and provider_subscription_item_id columns to your subscription table. See Upgrading to 0.7 and Diagnostics, Recovery CLI & Observability.