Skip to content

v0.7.0

Latest

Choose a tag to compare

@sfelixalejandro sfelixalejandro released this 20 Nov 19:48
· 2 commits to main since this release
ed7179b

AshBilling v0.7.0

Highlights

  • Subscription Quantity & Item Synchronization: Added protected nullable quantity (:integer, min: 0) and provider_subscription_item_id (:string) attributes to AshBilling.Subscription. WebhookSync and AshBilling.reconcile_subscription/2 extract, persist, compare, and CAS-guard both attributes for single-item subscriptions with fail-closed validation (nil preserved when absent/null, 0 preserved as zero seats, negative/malformed values fail closed with {:error, :invalid_quantity}).
  • Diagnostics Engine & Doctor CLI (AshBilling.Diagnostics, mix ash_billing.doctor): Extended AshBilling.check_configuration/1 (backwards-compatible) with layered structural, read-only PostgreSQL schema/migration/index checks (0.6.0 & 0.7.0), WebhookEvent privacy verification, multitenancy/Repo checks, HTTP timeout guidance, optional read-only Stripe probes, and explicit configuration_valid vs production_ready reporting in text and --json.
  • Reconciliation CLI (AshBilling.Reconciler, mix ash_billing.reconcile): Read-only --dry-run default, mandatory --execute --confirm for 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 a Telemetry.Metrics dashboard 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, transactional FOR UPDATE seat enforcement, Subscribed & HasPrice policies, 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.