# accrue v1.5.1 - Table of Contents > Billing state, modeled clearly. ## Pages - [Accrue](readme.md) - v1.59 multi-rail and offline - [Multi-rail and offline release guide (v1.59)](multi-rail-offline-release.md) - Guides - [Analytics and Dunning Recovery](analytics.md) - [Architecture](architecture.md) - [Auth Adapters](auth_adapters.md) - [Building a Local Billing Portal for Braintree](braintree-local-portal.md) - [Braintree metered billing](braintree-metered-billing.md) - [Branding](branding.md) - [Code walkthrough](code-walkthrough.md) - [Configuration](configuration.md) - [Hyperwallet Decision Boundary for Braintree Connect Questions](connect-hyperwallet-decision.md) - [Accrue Connect — Marketplace Platforms Guide](connect.md) - [Custom PDF Adapter](custom_pdf_adapter.md) - [Custom Processors](custom_processors.md) - [Dunning — multi-step email recovery campaigns](dunning.md) - [Email](email.md) - [Entitlements — gate features on what they paid for](entitlements.md) - [Finance handoff: Stripe-native reporting](finance-handoff.md) - [First-adopter iOS bridge contract](first_adopter_ios_bridge.md) - [First Hour](first_hour.md) - [Jobs to Be Done: A Tour of What You Can Actually Build](jobs_to_be_done.md) - [Lifecycle Semantics](lifecycle_semantics.md) - [Maturity and maintenance](maturity-and-maintenance.md) - [Usage metering](metering.md) - [Operator runbooks](operator-runbooks.md) - [Organization billing](organization_billing.md) - [PDF Rendering](pdf.md) - [Customer Portal Configuration Checklist](portal_configuration_checklist.md) - [Production readiness](production-readiness.md) - [Quickstart](quickstart.md) - [Release notes (plain-language)](release-notes.md) - [Sigra Integration](sigra_integration.md) - [Stripe vs Braintree Promotions](stripe-vs-braintree-promotions.md) - [Telemetry & Observability](telemetry.md) - [Testing Accrue Billing Flows](testing.md) - [Troubleshooting](troubleshooting.md) - [Upgrade Guide](upgrade.md) - [Webhook Gotchas](webhook_gotchas.md) - [Webhooks](webhooks.md) ## Modules - [Accrue](Accrue.md): Accrue — billing state, modeled clearly. - [Accrue.Actor](Accrue.Actor.md): Process-dictionary-backed actor context for the Events ledger (D-15). - [Accrue.Analytics.Dunning](Accrue.Analytics.Dunning.md): Analytics context for Dunning. - [Accrue.Application](Accrue.Application.md): OTP Application module for Accrue — manages boot-time validation and the supervision tree. - [Accrue.Auth](Accrue.Auth.md): Behaviour + facade for host-app auth integration. - [Accrue.Auth.Default](Accrue.Auth.Default.md): Dev-permissive, prod-refuse-to-boot default `Accrue.Auth` adapter (D-40). - [Accrue.Auth.Mock](Accrue.Auth.Mock.md): Process-local `Accrue.Auth` adapter for host test suites. - [Accrue.Billable](Accrue.Billable.md): One-line macro that makes any host schema billable. - [Accrue.Billing](Accrue.Billing.md): Primary context module for Accrue billing operations. - [Accrue.Billing.Charge](Accrue.Billing.Charge.md): Ecto schema for the `accrue_charges` table. - [Accrue.Billing.ChargeActions](Accrue.Billing.ChargeActions.md): Charge / payment intent / setup intent write surface. - [Accrue.Billing.Coupon](Accrue.Billing.Coupon.md): Ecto schema for the `accrue_coupons` table. - [Accrue.Billing.CouponActions](Accrue.Billing.CouponActions.md): Coupon and promotion-code write surface. - [Accrue.Billing.Customer](Accrue.Billing.Customer.md): Ecto schema for the `accrue_customers` table. - [Accrue.Billing.DiscountMapping](Accrue.Billing.DiscountMapping.md): Canonical local discount mapping for Braintree promotion-code resolution. - [Accrue.Billing.DiscountMappingActions](Accrue.Billing.DiscountMappingActions.md): Local write/read/resolve helpers for Braintree discount mappings. - [Accrue.Billing.Dunning](Accrue.Billing.Dunning.md): Pure policy module for dunning. - [Accrue.Billing.EntitlementSummary](Accrue.Billing.EntitlementSummary.md): Ecto schema for `accrue_entitlement_summaries` (ENT-10). - [Accrue.Billing.IntentResult](Accrue.Billing.IntentResult.md): Wraps Stripe intent-capable responses into the `intent_result` tagged union (D3-06..D3-08). - [Accrue.Billing.Invoice](Accrue.Billing.Invoice.md): Ecto schema for the `accrue_invoices` table. - [Accrue.Billing.InvoiceActions](Accrue.Billing.InvoiceActions.md): Invoice write surface. - [Accrue.Billing.InvoiceCoupon](Accrue.Billing.InvoiceCoupon.md): Ecto schema for the `accrue_invoice_coupons` redemption link table (D3-16). - [Accrue.Billing.InvoiceItem](Accrue.Billing.InvoiceItem.md): Ecto schema for the `accrue_invoice_items` table (D3-15). - [Accrue.Billing.InvoiceProjection](Accrue.Billing.InvoiceProjection.md): Deterministic decomposition of a processor (Stripe- or Fake-shaped) invoice into a flat attrs map ready for `Accrue.Billing.Invoice.changeset/2` plus a list of per-line attrs ready for `Accrue.Billing.InvoiceItem.changeset/2`. - [Accrue.Billing.Metadata](Accrue.Billing.Metadata.md): Stripe-compatible metadata validation and merge helpers. - [Accrue.Billing.MeterDefinition](Accrue.Billing.MeterDefinition.md): Accrue-owned billability contract for one raw usage event name. - [Accrue.Billing.MeterDefinitions](Accrue.Billing.MeterDefinitions.md): Local write/read helpers for Braintree meter definitions. - [Accrue.Billing.MeterEvent](Accrue.Billing.MeterEvent.md): Ecto schema for `accrue_meter_events` — the metered billing audit ledger and transactional outbox. - [Accrue.Billing.MeterEventActions](Accrue.Billing.MeterEventActions.md): Metered billing write surface. - [Accrue.Billing.MeterEvents](Accrue.Billing.MeterEvents.md): Helper for asynchronous meter-event state transitions driven by Stripe webhooks. - [Accrue.Billing.MeteredChargeAttempt](Accrue.Billing.MeteredChargeAttempt.md): Durable settlement ledger for one metered renewal window. - [Accrue.Billing.MeteredChargeAttempts](Accrue.Billing.MeteredChargeAttempts.md): Replay-safe settlement state transitions for one metered renewal window. - [Accrue.Billing.MeteredRenewal](Accrue.Billing.MeteredRenewal.md): Immutable local renewal-window anchor for one metered billing period. - [Accrue.Billing.MeteredRenewalActions](Accrue.Billing.MeteredRenewalActions.md): Opens immutable metered renewal windows from canonical Braintree renewal evidence. - [Accrue.Billing.MeteredRenewalInvoice](Accrue.Billing.MeteredRenewalInvoice.md): Authors one canonical local invoice for a closed metered renewal window. - [Accrue.Billing.PaymentMethod](Accrue.Billing.PaymentMethod.md): Ecto schema for the `accrue_payment_methods` table. - [Accrue.Billing.PaymentMethodActions](Accrue.Billing.PaymentMethodActions.md): Payment method orchestration. - [Accrue.Billing.PromotionCode](Accrue.Billing.PromotionCode.md): Ecto schema for the `accrue_promotion_codes` table. - [Accrue.Billing.PromotionCodeProjection](Accrue.Billing.PromotionCodeProjection.md): Decomposes a processor promotion-code map (atom- or string-keyed) into a flat attrs map ready for `Accrue.Billing.PromotionCode.changeset/2`. - [Accrue.Billing.Query](Accrue.Billing.Query.md): Composable `Ecto.Query` fragments mirroring the `Accrue.Billing.Subscription` predicates. - [Accrue.Billing.Refund](Accrue.Billing.Refund.md): Ecto schema for the `accrue_refunds` table (D3-45). - [Accrue.Billing.RefundActions](Accrue.Billing.RefundActions.md): Refund write surface. - [Accrue.Billing.Search](Accrue.Billing.Search.md): Provides native PostgreSQL trigram similarity search for core billing objects. - [Accrue.Billing.Subscription](Accrue.Billing.Subscription.md): Ecto schema for the `accrue_subscriptions` table. - [Accrue.Billing.SubscriptionActions](Accrue.Billing.SubscriptionActions.md): Write surface for subscription lifecycle operations. - [Accrue.Billing.SubscriptionItem](Accrue.Billing.SubscriptionItem.md): Ecto schema for the `accrue_subscription_items` table. - [Accrue.Billing.SubscriptionItems](Accrue.Billing.SubscriptionItems.md): Multi-item subscription surface. - [Accrue.Billing.SubscriptionProjection](Accrue.Billing.SubscriptionProjection.md): Translates a processor subscription response into local Ecto changesets. - [Accrue.Billing.SubscriptionSchedule](Accrue.Billing.SubscriptionSchedule.md): Ecto schema for `accrue_subscription_schedules`. - [Accrue.Billing.SubscriptionScheduleActions](Accrue.Billing.SubscriptionScheduleActions.md): Write surface for Stripe SubscriptionSchedules. - [Accrue.Billing.SubscriptionScheduleProjection](Accrue.Billing.SubscriptionScheduleProjection.md): Decomposes a Stripe/Fake SubscriptionSchedule payload into the flat attrs map consumed by `Accrue.Billing.SubscriptionSchedule.changeset/2` and `force_status_changeset/2`. - [Accrue.Billing.Trial](Accrue.Billing.Trial.md): Trial end normalization (D3-38). - [Accrue.Billing.UpcomingInvoice](Accrue.Billing.UpcomingInvoice.md): Non-persistent struct representing a proration preview. - [Accrue.Billing.UpcomingInvoice.Line](Accrue.Billing.UpcomingInvoice.Line.md): A single line on an upcoming-invoice preview. - [Accrue.BillingPortal](Accrue.BillingPortal.md): Customer Billing Portal context. - [Accrue.BillingPortal.Session](Accrue.BillingPortal.Session.md): Stripe Customer Billing Portal session wrapper. - [Accrue.Checkout](Accrue.Checkout.md): Stripe Checkout integration facade. - [Accrue.Checkout.LineItem](Accrue.Checkout.LineItem.md): Helpers for constructing Stripe Checkout `line_items` array entries. - [Accrue.Checkout.LocalSession](Accrue.Checkout.LocalSession.md): Persisted local checkout sessions used by processors that route checkout through a first-party Accrue portal. - [Accrue.Checkout.Session](Accrue.Checkout.Session.md): Checkout handoff wrapper. - [Accrue.Cldr](Accrue.Cldr.md): Provides the core functions to retrieve and manage the CLDR data that supports formatting and localisation. - [Accrue.Cldr.AcceptLanguage](Accrue.Cldr.AcceptLanguage.md): Parses HTTP `Accept-Language` header values as defined in [rfc2616](https://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.4). - [Accrue.Cldr.Currency](Accrue.Cldr.Currency.md) - [Accrue.Cldr.Locale](Accrue.Cldr.Locale.md): Backend module that provides functions to define new locales and display human-readable locale names for presentation purposes. - [Accrue.Cldr.Number](Accrue.Cldr.Number.md): Formats numbers and currencies based upon CLDR's decimal formats specification. - [Accrue.Cldr.Number.Cardinal](Accrue.Cldr.Number.Cardinal.md): Implements cardinal plural rules for numbers. - [Accrue.Cldr.Number.Format](Accrue.Cldr.Number.Format.md): Functions to manage the collection of number patterns defined in Cldr. - [Accrue.Cldr.Number.Formatter.Decimal](Accrue.Cldr.Number.Formatter.Decimal.md) - [Accrue.Cldr.Number.Ordinal](Accrue.Cldr.Number.Ordinal.md): Implements ordinal plural rules for numbers. - [Accrue.Cldr.Number.PluralRule.Range](Accrue.Cldr.Number.PluralRule.Range.md): Implements plural rules for ranges - [Accrue.Cldr.Number.Symbol](Accrue.Cldr.Number.Symbol.md) - [Accrue.Cldr.Number.System](Accrue.Cldr.Number.System.md) - [Accrue.Cldr.Number.Transliterate](Accrue.Cldr.Number.Transliterate.md): Transliteration for digits and separators. - [Accrue.Cldr.Rbnf.NumberSystem](Accrue.Cldr.Rbnf.NumberSystem.md): Functions to implement the number system rule-based-number-format rules of CLDR. - [Accrue.Cldr.Rbnf.Ordinal](Accrue.Cldr.Rbnf.Ordinal.md): Functions to implement the ordinal rule-based-number-format rules of CLDR. - [Accrue.Cldr.Rbnf.Spellout](Accrue.Cldr.Rbnf.Spellout.md): Functions to implement the spellout rule-based-number-format rules of CLDR. - [Accrue.Clock](Accrue.Clock.md): Canonical time source for Accrue. - [Accrue.Config](Accrue.Config.md): Runtime configuration schema for Accrue, backed by `NimbleOptions`. - [Accrue.Connect](Accrue.Connect.md): Stripe Connect domain facade. - [Accrue.Connect.Account](Accrue.Connect.Account.md): Ecto schema for `accrue_connect_accounts` — the local projection of a Stripe Connected Account (D5-02, CONN-01/03). - [Accrue.Connect.AccountLink](Accrue.Connect.AccountLink.md): Onboarding/update bearer credential for a connected account. - [Accrue.Connect.LoginLink](Accrue.Connect.LoginLink.md): Express dashboard return credential for a connected account. - [Accrue.Connect.PlatformFee](Accrue.Connect.PlatformFee.md): Pure `Accrue.Money` math for platform fee computation. - [Accrue.Connect.Projection](Accrue.Connect.Projection.md): Decomposes a processor-shaped (Stripe- or Fake-produced) Connected Account payload into a flat attrs map ready for `Accrue.Connect.Account.changeset/2` (D5-02). - [Accrue.Credo.NoRawStatusAccess](Accrue.Credo.NoRawStatusAccess.md): ## Basics - [Accrue.Dunning](Accrue.Dunning.md): Public API for checking dunning state, enabling host applications to display in-app banners or alerts for active dunning campaigns without false positives from projection lag. - [Accrue.Dunning.Campaign](Accrue.Dunning.Campaign.md): Pure step resolver for the built-in dunning campaign (DUN-02, D-11). - [Accrue.Dunning.Engine](Accrue.Dunning.Engine.md): Behaviour for dunning campaign orchestration engines (DUN-03, D-01). - [Accrue.Dunning.Engine.Oban](Accrue.Dunning.Engine.Oban.md): Built-in dunning engine backed by Oban (DUN-03, D-02). - [Accrue.Ecto.Money](Accrue.Ecto.Money.md): Two storage shapes for `%Accrue.Money{}` in Ecto schemas — both shipped in Phase 1 per D-02 and RESEARCH Open Question 5. - [Accrue.Emails.CardExpiringSoon](Accrue.Emails.CardExpiringSoon.md): Card-expiring-soon reminder email. - [Accrue.Emails.CouponApplied](Accrue.Emails.CouponApplied.md): Coupon applied notification. - [Accrue.Emails.DunningActionRequired](Accrue.Emails.DunningActionRequired.md): Dunning step-2 ("action required") email — D-01, D-02. - [Accrue.Emails.DunningFinalNotice](Accrue.Emails.DunningFinalNotice.md): Dunning step-3 ("final notice") email — D-01, D-02. - [Accrue.Emails.Fixtures](Accrue.Emails.Fixtures.md): Canned assigns for every `Accrue.Emails.*` type. - [Accrue.Emails.InvoiceFinalized](Accrue.Emails.InvoiceFinalized.md): Invoice finalized notification. - [Accrue.Emails.InvoicePaid](Accrue.Emails.InvoicePaid.md): Invoice paid confirmation. - [Accrue.Emails.InvoicePaymentFailed](Accrue.Emails.InvoicePaymentFailed.md): Invoice payment-failed notification. - [Accrue.Emails.PaymentFailed](Accrue.Emails.PaymentFailed.md): Canonical payment-failed email. - [Accrue.Emails.PaymentSucceeded](Accrue.Emails.PaymentSucceeded.md): Receipt-style confirmation for a successful payment. - [Accrue.Emails.Receipt](Accrue.Emails.Receipt.md): Canonical receipt email. - [Accrue.Emails.RefundIssued](Accrue.Emails.RefundIssued.md): Refund issued notification. - [Accrue.Emails.SubscriptionCanceled](Accrue.Emails.SubscriptionCanceled.md): Subscription cancellation confirmation. - [Accrue.Emails.SubscriptionPaused](Accrue.Emails.SubscriptionPaused.md): Subscription-paused notification. - [Accrue.Emails.SubscriptionResumed](Accrue.Emails.SubscriptionResumed.md): Subscription-resumed notification. - [Accrue.Emails.TrialEnded](Accrue.Emails.TrialEnded.md): Trial-ended notification email. - [Accrue.Emails.TrialEnding](Accrue.Emails.TrialEnding.md): Trial-ending reminder email. - [Accrue.Entitlements](Accrue.Entitlements.md): Public, fail-closed entitlement gate API. - [Accrue.Entitlements.Account](Accrue.Entitlements.Account.md): Durable, owner-stable entitlement identity. - [Accrue.Entitlements.Admin](Accrue.Entitlements.Admin.md): Internal read-only diagnostic seam for the `accrue_admin` entitlements tab (ENT-11). - [Accrue.Entitlements.Apple.Client.Production](Accrue.Entitlements.Apple.Client.Production.md): Private App Store Server API adapter. It uses OTP's `:httpc`; hosts provide a short-lived bearer token, so Accrue neither adds an HTTP dependency nor retains Apple private keys. - [Accrue.Entitlements.Apple.Intake.Outcome](Accrue.Entitlements.Apple.Intake.Outcome.md) - [Accrue.Entitlements.Apple.Intake.VerifiedEvidence](Accrue.Entitlements.Apple.Intake.VerifiedEvidence.md) - [Accrue.Entitlements.Apple.ReconciliationSweeper](Accrue.Entitlements.Apple.ReconciliationSweeper.md): Host-scheduled Oban entry point for Apple reconciliation checkpoints. - [Accrue.Entitlements.Compatibility](Accrue.Entitlements.Compatibility.md): Fail-closed compatibility lane between legacy LocalMap and canonical projection. - [Accrue.Entitlements.DecisionCases.DecisionCase](Accrue.Entitlements.DecisionCases.DecisionCase.md) - [Accrue.Entitlements.DecisionCases.Evidence](Accrue.Entitlements.DecisionCases.Evidence.md) - [Accrue.Entitlements.DecisionCases.Expected](Accrue.Entitlements.DecisionCases.Expected.md) - [Accrue.Entitlements.DecisionCases.Ordering](Accrue.Entitlements.DecisionCases.Ordering.md) - [Accrue.Entitlements.DecisionCases.PriorState](Accrue.Entitlements.DecisionCases.PriorState.md) - [Accrue.Entitlements.Device](Accrue.Entitlements.Device.md): Account-scoped device registration with durable revocation history. - [Accrue.Entitlements.Grant](Accrue.Entitlements.Grant.md): A rail-qualified entitlement grant with retained supersession history. - [Accrue.Entitlements.Guard](Accrue.Entitlements.Guard.md): The always-compiled, LiveView-runtime-free decision engine shared by both enforcement surfaces (`Accrue.Plug.RequireEntitlement` and the cond-compiled `Accrue.Live.Entitlements` `on_mount` guard). - [Accrue.Entitlements.Observation](Accrue.Entitlements.Observation.md): Privacy-bounded, rail-qualified entitlement evidence received from a provider. - [Accrue.Entitlements.Offline](Accrue.Entitlements.Offline.md): Public, public-key-only verification support for versioned offline entitlement proofs. - [Accrue.Entitlements.Offline.Challenge.Value](Accrue.Entitlements.Offline.Challenge.Value.md) - [Accrue.Entitlements.Offline.Issuer.Admission](Accrue.Entitlements.Offline.Issuer.Admission.md) - [Accrue.Entitlements.Offline.Issuer.Request](Accrue.Entitlements.Offline.Issuer.Request.md) - [Accrue.Entitlements.Offline.Issuer.Result](Accrue.Entitlements.Offline.Issuer.Result.md) - [Accrue.Entitlements.Offline.KeyProvider](Accrue.Entitlements.Offline.KeyProvider.md): Host-owned offline proof signing and public-key material boundary. - [Accrue.Entitlements.Offline.Reconnect.Outcome](Accrue.Entitlements.Offline.Reconnect.Outcome.md) - [Accrue.Entitlements.Offline.Reconnect.Request](Accrue.Entitlements.Offline.Reconnect.Request.md) - [Accrue.Entitlements.Offline.ReconnectSweeper](Accrue.Entitlements.Offline.ReconnectSweeper.md): Host-scheduled recovery worker for stranded offline reconnect attempts. - [Accrue.Entitlements.Offline.Registration.ReplacementRequest](Accrue.Entitlements.Offline.Registration.ReplacementRequest.md) - [Accrue.Entitlements.Offline.Registration.ReplacementResult](Accrue.Entitlements.Offline.Registration.ReplacementResult.md) - [Accrue.Entitlements.Offline.Registration.Request](Accrue.Entitlements.Offline.Registration.Request.md) - [Accrue.Entitlements.Offline.Registration.Result](Accrue.Entitlements.Offline.Registration.Result.md) - [Accrue.Entitlements.Offline.SourceCoordinator.SourceStatus](Accrue.Entitlements.Offline.SourceCoordinator.SourceStatus.md) - [Accrue.Entitlements.PastDueGrace](Accrue.Entitlements.PastDueGrace.md): Pure, clock-driven past-due grace-window check (ENT-09, D-17). - [Accrue.Entitlements.Plan](Accrue.Entitlements.Plan.md): Pure value struct for a resolved entitlement plan. - [Accrue.Entitlements.Projector](Accrue.Entitlements.Projector.md): The sole transactional writer for current grants and account revisions. - [Accrue.Entitlements.PurchaseDecision](Accrue.Entitlements.PurchaseDecision.md): Revision-bound, rail-neutral purchase preflight decisions. - [Accrue.Entitlements.Reconcile](Accrue.Entitlements.Reconcile.md): Shared writer for advisory entitlement-summary snapshots. - [Accrue.Entitlements.ReferenceScenarios](Accrue.Entitlements.ReferenceScenarios.md): Strict, data-only reader for the v1.59 cross-consumer reference scenarios. - [Accrue.Entitlements.ReferenceScenarios.Command](Accrue.Entitlements.ReferenceScenarios.Command.md) - [Accrue.Entitlements.ReferenceScenarios.Expected](Accrue.Entitlements.ReferenceScenarios.Expected.md) - [Accrue.Entitlements.ReferenceScenarios.ExpectedTransition](Accrue.Entitlements.ReferenceScenarios.ExpectedTransition.md) - [Accrue.Entitlements.ReferenceScenarios.OfflinePolicy](Accrue.Entitlements.ReferenceScenarios.OfflinePolicy.md) - [Accrue.Entitlements.ReferenceScenarios.Purchase](Accrue.Entitlements.ReferenceScenarios.Purchase.md) - [Accrue.Entitlements.ReferenceScenarios.Scenario](Accrue.Entitlements.ReferenceScenarios.Scenario.md) - [Accrue.Entitlements.ReferenceScenarios.Snapshot](Accrue.Entitlements.ReferenceScenarios.Snapshot.md) - [Accrue.Entitlements.Repair](Accrue.Entitlements.Repair.md): Bounded, host-authorized recovery actions for entitlement operations. - [Accrue.Entitlements.Resolver](Accrue.Entitlements.Resolver.md): Behaviour + runtime-dispatch seam for entitlement resolution. - [Accrue.Entitlements.Resolver.Canonical](Accrue.Entitlements.Resolver.Canonical.md): Resolver-compatible read-only projection of canonical entitlement snapshots. - [Accrue.Entitlements.Resolver.LocalMap](Accrue.Entitlements.Resolver.LocalMap.md): Default entitlement resolver — derives a billable's entitlements from **local subscription state only**, with zero processor calls. - [Accrue.Entitlements.Snapshot](Accrue.Entitlements.Snapshot.md): A deterministic, privacy-bounded view of an account's effective grants. - [Accrue.Entitlements.Source](Accrue.Entitlements.Source.md): Closed, inspection-only entitlement-source contract. - [Accrue.Entitlements.Source.CapabilityError](Accrue.Entitlements.Source.CapabilityError.md): Typed, bounded error for unavailable source capabilities or bad registry input. - [Accrue.Entitlements.Source.Outcome](Accrue.Entitlements.Source.Outcome.md): A bounded, host-facing result for one source/capability pair. - [Accrue.Entitlements.Source.Registry](Accrue.Entitlements.Source.Registry.md): Deterministic entitlement-source inspection registry; intentionally processor-free. - [Accrue.Entitlements.StripeSync](Accrue.Entitlements.StripeSync.md): Read-only observational seam over the optional Stripe-native entitlement-summary cache (`accrue_entitlement_summaries`, ENT-10). - [Accrue.Entitlements.StripeSync.RefreshWorker](Accrue.Entitlements.StripeSync.RefreshWorker.md): Thin Oban wrapper for advisory Stripe-native entitlement refreshes. - [Accrue.Events](Accrue.Events.md): Tamper-evident audit ledger for Accrue billing events. - [Accrue.Events.Event](Accrue.Events.Event.md): Ecto schema for a row in the append-only `accrue_events` table. - [Accrue.Events.Schemas](Accrue.Events.Schemas.md): Registry mapping Phase 3 event atoms to their canonical schema modules (D3-66, D3-68). - [Accrue.Events.Schemas.CardExpiringSoon](Accrue.Events.Schemas.CardExpiringSoon.md): Payload schema for `:"card.expiring_soon"` events (D3-66). - [Accrue.Events.Schemas.InvoicePaid](Accrue.Events.Schemas.InvoicePaid.md): Payload schema for `:"invoice.paid"` events (D3-66). - [Accrue.Events.Schemas.RefundCreated](Accrue.Events.Schemas.RefundCreated.md): Payload schema for `:"refund.created"` events (D3-66). - [Accrue.Events.Schemas.SubscriptionCanceled](Accrue.Events.Schemas.SubscriptionCanceled.md): Payload schema for `:"subscription.canceled"` events (D3-66). - [Accrue.Events.Schemas.SubscriptionCreated](Accrue.Events.Schemas.SubscriptionCreated.md): Payload schema for `:"subscription.created"` events (D3-66). - [Accrue.Events.Schemas.SubscriptionPlanSwapped](Accrue.Events.Schemas.SubscriptionPlanSwapped.md): Payload schema for `:"subscription.plan_swapped"` events (D3-66). - [Accrue.Events.Schemas.SubscriptionUpdated](Accrue.Events.Schemas.SubscriptionUpdated.md): Payload schema for `:"subscription.updated"` events (D3-66). - [Accrue.Events.Upcaster](Accrue.Events.Upcaster.md): Upcaster behaviour for event `schema_version` evolution (D3-69). - [Accrue.Events.UpcasterRegistry](Accrue.Events.UpcasterRegistry.md): Chain composition for event schema-version upcasting. - [Accrue.Events.Upcasters.V1ToV2](Accrue.Events.Upcasters.V1ToV2.md): Example upcaster from `schema_version: 1` to `schema_version: 2`. - [Accrue.Install.Fingerprints](Accrue.Install.Fingerprints.md): No-clobber primitives for Accrue-generated host files. - [Accrue.Install.Options](Accrue.Install.Options.md): Strict option parsing for `mix accrue.install`. - [Accrue.Install.Patches](Accrue.Install.Patches.md): Safe host-file patch builders and manual snippets for Accrue installs. - [Accrue.Install.Project](Accrue.Install.Project.md): Phoenix host project discovery for `mix accrue.install`. - [Accrue.Install.Templates](Accrue.Install.Templates.md): Renders host-owned installer templates. - [Accrue.Integrations.Chimeway](Accrue.Integrations.Chimeway.md): Off-by-default Chimeway dunning engine adapter for Accrue (DUN-03). - [Accrue.Integrations.Chimeway.DunningNotifier](Accrue.Integrations.Chimeway.DunningNotifier.md): Bundled `Chimeway.Notifier` implementation for Accrue dunning notifications. - [Accrue.InvoiceRenderer](Accrue.InvoiceRenderer.md): Behaviour + facade for invoice-specific PDF rendering. - [Accrue.InvoiceRenderer.ChromicPDF](Accrue.InvoiceRenderer.ChromicPDF.md): Invoice renderer that preserves the existing HEEx-to-ChromicPDF path. - [Accrue.InvoiceRenderer.Null](Accrue.InvoiceRenderer.Null.md): Null invoice renderer for Chrome-hostile or PDF-disabled deploys. - [Accrue.InvoiceRenderer.Rendro](Accrue.InvoiceRenderer.Rendro.md): Native Rendro-backed invoice renderer. - [Accrue.Invoices](Accrue.Invoices.md): Invoice facade (D6-04). Owns lazy PDF rendering + storage delegation. - [Accrue.Invoices.Components](Accrue.Invoices.Components.md): Phoenix.Component function components shared by email and PDF. - [Accrue.Invoices.Layouts](Accrue.Invoices.Layouts.md): HEEx layout wrappers for PDF (and optionally, shared email shells). - [Accrue.Invoices.Render](Accrue.Invoices.Render.md): Invoice render orchestration — builds a single `RenderContext` and exposes format-helper functions shared by the email + PDF pipelines. - [Accrue.Invoices.RenderContext](Accrue.Invoices.RenderContext.md): Format-neutral hydrated invoice payload (D6-04). - [Accrue.Invoices.Styles](Accrue.Invoices.Styles.md): Static branding-aware inline-CSS lookup used by `Accrue.Invoices.Components` to stamp `style="..."` attributes on every structural element. - [Accrue.Jobs.DetectExpiringCards](Accrue.Jobs.DetectExpiringCards.md): Scheduled Oban worker for expiring-card detection. - [Accrue.Jobs.DunningSweeper](Accrue.Jobs.DunningSweeper.md): Oban cron worker for the dunning grace-period overlay. - [Accrue.Jobs.MeterEventsReconciler](Accrue.Jobs.MeterEventsReconciler.md): Metered billing outbox reconciler. - [Accrue.Jobs.MeteredRenewalReconciler](Accrue.Jobs.MeteredRenewalReconciler.md): Narrow scheduled backstop for stale Braintree renewal windows. - [Accrue.Jobs.ProcessMeteredRenewal](Accrue.Jobs.ProcessMeteredRenewal.md): Worker-owned BT-06 aggregation path for one metered renewal window. - [Accrue.Jobs.ReconcileChargeFees](Accrue.Jobs.ReconcileChargeFees.md): Daily backstop Oban worker for charge fees that weren't populated at create time (D3-46). - [Accrue.Jobs.ReconcileRefundFees](Accrue.Jobs.ReconcileRefundFees.md): Daily backstop Oban worker for refund fees that weren't populated at create time (D3-46). - [Accrue.Live.Entitlements](Accrue.Live.Entitlements.md): `on_mount/4` entitlement guard for host LiveViews (ENT-07). - [Accrue.Mailer](Accrue.Mailer.md): Behaviour + facade for the Accrue transactional email pipeline. - [Accrue.Mailer.Default](Accrue.Mailer.Default.md): Default `Accrue.Mailer` adapter — enqueues an Oban job on the `:accrue_mailers` queue that a worker later turns into a delivered email. - [Accrue.Mailer.Swoosh](Accrue.Mailer.Swoosh.md): Swoosh-backed delivery module for Accrue's transactional emails. - [Accrue.Mailer.Test](Accrue.Mailer.Test.md): Test adapter for `Accrue.Mailer` (D6-05). Replaces `Accrue.Mailer.Default` at the behaviour layer — intercepts `Accrue.Mailer.deliver/2` BEFORE Oban enqueue. Sends the intent tuple to the calling test pid and returns immediately. - [Accrue.Migration](Accrue.Migration.md): Helpers for Accrue-owned migrations. - [Accrue.Money](Accrue.Money.md): Accrue's canonical money value type — a thin, opinionated wrapper over the `:ex_money` currency table. - [Accrue.Oban.Middleware](Accrue.Oban.Middleware.md): Helper for setting `Accrue.Actor` operation_id from an Oban job (D3-63). - [Accrue.PDF](Accrue.PDF.md): Behaviour + facade for legacy HTML-to-PDF rendering. - [Accrue.PDF.ChromicPDF](Accrue.PDF.ChromicPDF.md): ChromicPDF adapter for `Accrue.PDF` (D-32, D-33). - [Accrue.PDF.Null](Accrue.PDF.Null.md): Null `Accrue.PDF` adapter for Chrome-hostile deploys (D6-06). - [Accrue.PDF.Test](Accrue.PDF.Test.md): Chrome-free `Accrue.PDF` adapter for test environments (D-34). - [Accrue.PlanResolver](Accrue.PlanResolver.md): Host-owned resolver for plan metadata that the shared `price_id` facade does not carry by itself. - [Accrue.Plug.PutConnectedAccount](Accrue.Plug.PutConnectedAccount.md): Stashes a per-request Connect `stripe_account` id into the process dictionary for the lifetime of the request. - [Accrue.Plug.PutOperationId](Accrue.Plug.PutOperationId.md): Sets `Accrue.Actor` operation_id from `conn.assigns[:request_id]`. - [Accrue.Plug.RequireEntitlement](Accrue.Plug.RequireEntitlement.md): A controller-pipeline guard that halts a request unless the resolved billable is entitled to a `feature:` (or holds an active `plan:`). - [Accrue.Portal.Checkout.CompletionJob](Accrue.Portal.Checkout.CompletionJob.md): Asynchronously records and reduces the synthetic local-portal checkout completion event after a successful Braintree subscribe handoff. - [Accrue.Processor](Accrue.Processor.md): The adapter contract between Accrue and payment processors. - [Accrue.Processor.Braintree](Accrue.Processor.Braintree.md): Production Braintree adapter for the gateway subscription core slice. - [Accrue.Processor.Capabilities](Accrue.Processor.Capabilities.md): Capability map for bounded processor slices. - [Accrue.Processor.Fake](Accrue.Processor.Fake.md): Deterministic in-memory `Accrue.Processor` adapter for tests and demos. - [Accrue.Processor.Fake.State](Accrue.Processor.Fake.State.md): Internal state struct for `Accrue.Processor.Fake`. - [Accrue.Processor.Idempotency](Accrue.Processor.Idempotency.md): Deterministic idempotency key and subject UUID derivation for Phase 3 processor operations (D3-60, D3-61, D3-64). - [Accrue.Processor.Stripe](Accrue.Processor.Stripe.md): Production Stripe adapter — wires all `Accrue.Processor` callbacks to `:lattice_stripe`. - [Accrue.Processor.Stripe.ErrorMapper](Accrue.Processor.Stripe.ErrorMapper.md): Translates raw `LatticeStripe` error shapes into `Accrue.Error` subtypes. - [Accrue.Rails.GatewayRegistry](Accrue.Rails.GatewayRegistry.md): Closed dispatch boundary for already-persisted gateway resources. - [Accrue.Rails.GatewayRegistry.Error](Accrue.Rails.GatewayRegistry.Error.md): Typed, stable failure returned when persisted gateway provenance is unusable. - [Accrue.Repo](Accrue.Repo.md): Thin facade over the host-configured `Ecto.Repo`. - [Accrue.Router](Accrue.Router.md): Router helpers for mounting Accrue webhook endpoints. - [Accrue.Schema](Accrue.Schema.md): Shared Ecto schema setup for Accrue-owned database tables. - [Accrue.Storage](Accrue.Storage.md): Behaviour + facade for pluggable PDF / asset storage. - [Accrue.Storage.Null](Accrue.Storage.Null.md): No-op `Accrue.Storage` adapter — the v1.0 default (D6-04). - [Accrue.Stripe](Accrue.Stripe.md): Stripe-specific helpers for host applications (D2-15). - [Accrue.Telemetry](Accrue.Telemetry.md): Telemetry conventions and helpers for Accrue. - [Accrue.Telemetry.Metrics](Accrue.Telemetry.Metrics.md): Default `Telemetry.Metrics` recipe for SRE teams. - [Accrue.Telemetry.OTel](Accrue.Telemetry.OTel.md): Optional OpenTelemetry bridge for Accrue telemetry spans. - [Accrue.Telemetry.Ops](Accrue.Telemetry.Ops.md): Ops-grade telemetry emit helper. - [Accrue.Test](Accrue.Test.md): Public test helper facade for host applications. - [Accrue.Test.Clock](Accrue.Test.Clock.md): Deterministic clock helpers for host tests. - [Accrue.Test.Entitlements](Accrue.Test.Entitlements.md): Small, provider-free entitlement fixtures for host application tests. - [Accrue.Test.EventAssertions](Accrue.Test.EventAssertions.md): ExUnit-style assertions for Accrue's append-only event ledger. - [Accrue.Test.Factory](Accrue.Test.Factory.md): Phase 3 test factories (D3-79..85). - [Accrue.Test.Generators](Accrue.Test.Generators.md): StreamData generators for Phase 3 property tests (D3-81). - [Accrue.Test.MailerAssertions](Accrue.Test.MailerAssertions.md): ExUnit-style assertions for `Accrue.Mailer.Test` intent captures (D6-05). Symmetric with `Accrue.Test.PdfAssertions`. - [Accrue.Test.PdfAssertions](Accrue.Test.PdfAssertions.md): ExUnit-style assertions for `Accrue.PDF.Test` render captures (D-34). Symmetric with `Accrue.Test.MailerAssertions`. - [Accrue.Test.Webhooks](Accrue.Test.Webhooks.md): Synthetic webhook helpers for host tests. - [Accrue.Webhook.CachingBodyReader](Accrue.Webhook.CachingBodyReader.md): Custom body reader for `Plug.Parsers` that tees the raw body into `conn.assigns[:raw_body]` for webhook signature verification. - [Accrue.Webhook.ConnectHandler](Accrue.Webhook.ConnectHandler.md): Webhook handler for events arriving on the `:connect` endpoint. - [Accrue.Webhook.DefaultHandler](Accrue.Webhook.DefaultHandler.md): Non-disableable default handler for built-in state reconciliation. - [Accrue.Webhook.DispatchWorker](Accrue.Webhook.DispatchWorker.md): Oban worker for async webhook handler dispatch. - [Accrue.Webhook.Event](Accrue.Webhook.Event.md): Lean event struct passed to webhook handlers. - [Accrue.Webhook.Handler](Accrue.Webhook.Handler.md): Behaviour for webhook event handlers (D2-27). - [Accrue.Webhook.Ingest](Accrue.Webhook.Ingest.md): Transactional webhook event persistence and Oban job dispatch (D2-24). - [Accrue.Webhook.Plug](Accrue.Webhook.Plug.md): Core webhook ingestion plug. - [Accrue.Webhook.Pruner](Accrue.Webhook.Pruner.md): Oban cron worker for webhook event retention (D2-34). - [Accrue.Webhook.Signature](Accrue.Webhook.Signature.md): Webhook signature verification. Delegates entirely to `LatticeStripe.Webhook.construct_event!/4` (D2-22). - [Accrue.Webhook.WebhookEvent](Accrue.Webhook.WebhookEvent.md): Ecto schema for the `accrue_webhook_events` table. - [Accrue.Webhooks.DLQ](Accrue.Webhooks.DLQ.md): Dead-letter queue replay and retention for webhook events. - [Accrue.Workers.DunningStep](Accrue.Workers.DunningStep.md): Durable, cancel-guarded, Oban-unique dunning-campaign step worker (DUN-02, DUN-05; D-10, D-11, D-16). - [Accrue.Workers.Mailer](Accrue.Workers.Mailer.md): Oban worker that delivers a transactional email asynchronously. - Exceptions - [Accrue.APIError](Accrue.APIError.md): Raised when a processor call fails for a reason that is neither a card error nor a rate limit (e.g., HTTP 500, unexpected payload). Pattern-match on `%Accrue.APIError{}` in retry logic. - [Accrue.ActionRequiredError](Accrue.ActionRequiredError.md): Raised when a Stripe PaymentIntent or SetupIntent transitions to `requires_action` (SCA / 3DS). The `:payment_intent` field carries the full PaymentIntent payload so callers can extract `client_secret` and drive the Stripe.js confirmation flow on the frontend. - [Accrue.Auth.StepUpUnconfigured](Accrue.Auth.StepUpUnconfigured.md): Raised when a destructive admin action requires step-up verification but the configured auth adapter does not implement the optional callbacks. - [Accrue.CardError](Accrue.CardError.md): Raised when the processor rejects a card (declined, expired, insufficient funds, etc.). Mirrors Stripe's card-error shape 1:1. - [Accrue.ConfigError](Accrue.ConfigError.md): Raised when `Accrue.Config` validation fails, or when a key is looked up that is neither set at runtime nor has a schema default. - [Accrue.DecodeError](Accrue.DecodeError.md): Raised when a processor response body cannot be decoded (malformed JSON, unexpected shape). The `payload` field holds the raw binary for debugging — treat as sensitive; do not log verbatim. - [Accrue.Error.DiscountMappingInvalid](Accrue.Error.DiscountMappingInvalid.md): Raised when a stored local discount mapping is present but cannot be resolved safely because the canonical local row has drifted into an invalid state. - [Accrue.Error.InvalidState](Accrue.Error.InvalidState.md): Raised when a state-machine transition is attempted from an illegal source state (e.g., `pay_invoice/2` on a `:void` invoice, `resume/2` on an `:active` subscription). - [Accrue.Error.InvoiceRendererUnavailable](Accrue.Error.InvoiceRendererUnavailable.md): Returned when the explicitly configured invoice renderer cannot run due to a stable host misconfiguration. - [Accrue.Error.MeteredSettlementConflict](Accrue.Error.MeteredSettlementConflict.md): Raised when a metered renewal attempts to create a second settlement unit for a period that already has a canonical charge attempt. - [Accrue.Error.MeteredSettlementMissingPrerequisite](Accrue.Error.MeteredSettlementMissingPrerequisite.md): Raised when a metered renewal settlement is attempted before the renewal has the local billing truth required for money movement. - [Accrue.Error.MultiItemSubscription](Accrue.Error.MultiItemSubscription.md): Raised when a legacy convenience call (e.g., `update_quantity/3`) is made against a subscription that has more than one `SubscriptionItem`. Multi-item subscriptions require `Accrue.Billing.update_items/3`; the convenience helpers enforce a single-item invariant. - [Accrue.Error.NoDefaultPaymentMethod](Accrue.Error.NoDefaultPaymentMethod.md): Raised when a charge or subscription call requires a default payment method and the customer has none set. Callers should surface a user-facing "add a payment method" prompt. - [Accrue.Error.NotAttached](Accrue.Error.NotAttached.md): Raised when a payment method is referenced for a customer it is not attached to (e.g., `set_default_payment_method/3` with a `pm_id` that belongs to a different customer). - [Accrue.Error.PdfDisabled](Accrue.Error.PdfDisabled.md): Raised / returned when the configured PDF adapter is `Accrue.PDF.Null`. Expected and terminal — callers MUST pattern-match and fall through to a non-PDF path (e.g., link to `hosted_invoice_url` instead of attaching a rendered binary). Oban workers MUST NOT treat this as a transient retry; it is a stable adapter configuration, not a failure. - [Accrue.EventLedgerImmutableError](Accrue.EventLedgerImmutableError.md): Raised when a caller attempts to UPDATE or DELETE a row in `accrue_events`. The append-only guarantee is enforced in two places - [Accrue.IdempotencyError](Accrue.IdempotencyError.md): Raised when the processor rejects an idempotency key replay (e.g., same key used for a different request body). Pattern-match on `%Accrue.IdempotencyError{}` to surface a user-facing "this request was already processed" message. - [Accrue.Money.MismatchedCurrencyError](Accrue.Money.MismatchedCurrencyError.md): Raised when `Accrue.Money` arithmetic is attempted across two different currencies. Per D-04, cross-currency math never silently coerces or returns a tagged tuple — it raises at the call site so the bug surfaces immediately. - [Accrue.PDF.RenderFailed](Accrue.PDF.RenderFailed.md): Raised from `Accrue.Workers.Mailer.perform/1` when `Accrue.Billing.render_invoice_pdf/2` returns a non-terminal `{:error, reason}` (i.e., not `%Accrue.Error.PdfDisabled{}` and not `%Accrue.Error.InvoiceRendererUnavailable{}`). Raising this exception lets Oban backoff handle transient render failures — the mailer job is retried per its `max_attempts` setting. - [Accrue.RateLimitError](Accrue.RateLimitError.md): Raised when the processor returns a rate-limit response (HTTP 429). The `retry_after` field carries the server's suggested backoff in seconds. - [Accrue.SetupDiagnostic](Accrue.SetupDiagnostic.md): Shared setup-diagnostic carrier for first-hour host misconfiguration. - [Accrue.SignatureError](Accrue.SignatureError.md): Raised when a webhook signature fails verification. This is NEVER returned as a tuple — a bad signature is either a misconfiguration or an attacker, and neither is recoverable at the call site. The webhook plug translates this raise into an HTTP 400. ## Mix Tasks - [mix accrue.entitlements.decision_cases](Mix.Tasks.Accrue.Entitlements.DecisionCases.md) - [mix accrue.entitlements.reference_scenarios](Mix.Tasks.Accrue.Entitlements.ReferenceScenarios.md) - [mix accrue.gen.handler](Mix.Tasks.Accrue.Gen.Handler.md): Generates a host-owned Accrue webhook handler scaffold. Generated files are stamped with `# accrue:generated` by `Accrue.Install.Fingerprints`. - [mix accrue.install](Mix.Tasks.Accrue.Install.md): Generates host-owned Accrue wiring. - [mix accrue.webhooks.prune](Mix.Tasks.Accrue.Webhooks.Prune.md): Manually trigger the same retention sweep that `Accrue.Webhook.Pruner` runs on its Oban cron schedule. Useful for ops engineers who want to reclaim DB space without waiting for the next scheduled run. - [mix accrue.webhooks.replay](Mix.Tasks.Accrue.Webhooks.Replay.md): Requeue dead-lettered webhook events from the command line.