AuroraMeter. Billing. Provider behaviour
(Aurora Meter v0.1.0)
View Source
Behaviour for a billing provider. The core ships AuroraMeter.Billing.Noop;
the Pro package provides a Stripe implementation. Only ever call a provider
through the AuroraMeter.Billing facade.
Summary
Callbacks
Returns a billing-portal URL for the tenant.
Creates a checkout session and returns a redirect URL.
Reports metered usage entries to the provider.
Syncs a provider subscription payload into local storage.
Callbacks
@callback billing_portal_url(tenant :: term(), opts :: keyword()) :: {:ok, String.t()} | {:error, term()}
Returns a billing-portal URL for the tenant.
@callback create_checkout_session(tenant :: term(), opts :: keyword()) :: {:ok, String.t()} | {:error, term()}
Creates a checkout session and returns a redirect URL.
Reports metered usage entries to the provider.
Syncs a provider subscription payload into local storage.