Inspects financial drift or reconciles one or more subscriptions against the authoritative
billing provider using AshBilling.Reconciler and AshBilling.reconcile_subscription/2.
Read-only by default (--dry-run). Writes to PostgreSQL require --execute together
with explicit confirmation (--confirm or interactive prompt confirmation).
Usage
# Dry-run single subscription
mix ash_billing.reconcile \
--domain MyApp.Billing \
--subscription-resource MyApp.Billing.Subscription \
--subscription-id sub_123 \
--system
# Execute bulk reconciliation for subscriptions not reconciled in 24h
mix ash_billing.reconcile \
--domain MyApp.Billing \
--subscription-resource MyApp.Billing.Subscription \
--older-than-hours 24 \
--concurrency 2 \
--rate-limit-ms 100 \
--system \
--execute \
--confirmOptions
--domain- Ash domain module (required unless configured under:ash_billing).--subscription-resource- Ash subscription resource module (required unless configured).--customer-resource- Optional Ash customer resource module override.--subscription-id- Reconcile a single subscription byprovider_subscription_id.--id- Reconcile a single subscription by local primary key.--older-than-hours- Bulk filter: select records withlast_reconciled_atnilor older thanNhours.--status- Comma-separated status filter (e.g.active,past_due).--missing-quantity- Bulk filter: select subscriptions withquantity IS NULL.--all- Explicit opt-in to scan all subscriptions without a narrower filter.--dry-run- Inspect drift without writing to PostgreSQL (default).--execute- Perform transactional reconciliation writes (requires--confirmor interactive confirmation).--confirm- Explicit confirmation for--executein non-interactive environments.--system- Run withauthorize?: falsefor trusted CLI system maintenance (without--system, Ash authorization remains enabled).--tenant- Scope reads and writes to a specific tenant (required on multitenant resources).--stripe-account- Scope provider requests (and database filtering) to a Stripe Connect account ID.--stripe-account-attribute- Subscription attribute storing the Stripe Connect account ID (auto-detected if:stripe_account_idor:stripe_accountexists).--stripe-account-scope- Passtenantfor bulk Connect runs on multitenant resources with 1:1 tenant-to-account mapping and no per-row Connect column.--reset-event-cursor- Passreset_event_cursor?: trueduring--execute.--page-size- Keyset pagination batch size (1..500, default50).--limit- Maximum subscriptions to process.--concurrency- Max concurrent workers per batch (1..10, default2).--rate-limit-ms- Global minimum interval in milliseconds between provider requests across all workers (default0).--format-text(default) orjson.--json- Shorthand for--format json.--no-start- Do not start the application before running.