AshBilling.Resource

Copy Markdown View Source

A Spark DSL extension for Ash resources representing billing customers (e.g., User or Organization).

Usage

defmodule MyApp.Accounts.User do
  use Ash.Resource,
    domain: MyApp.Accounts,
    extensions: [AshBilling.Resource]

  billing do
    customer_id_attribute :stripe_customer_id
    provider AshBilling.Providers.Stripe
  end
end

billing

Configuration for billing customer functionality.

Options

NameTypeDefaultDocs
customer_id_attributeatom:stripe_customer_idThe attribute name on the resource that stores the billing customer ID.
providermoduleAshBilling.Providers.StripeThe billing provider module.