AuroraMeter.Billing (Aurora Meter v0.1.0)

View Source

Facade over the configured AuroraMeter.Billing.Provider (AuroraMeter.Config.provider/0, default AuroraMeter.Billing.Noop).

With only the free core installed these return {:error, :not_configured}; install and configure the Pro Stripe provider to enable checkout and billing.

Summary

Functions

Starts a checkout session for plan_id and returns a redirect URL.

Returns a billing-portal URL for the tenant.

Functions

checkout(tenant, plan_id, opts \\ [])

@spec checkout(term(), atom() | String.t(), keyword()) ::
  {:ok, String.t()} | {:error, term()}

Starts a checkout session for plan_id and returns a redirect URL.

portal_url(tenant, opts \\ [])

@spec portal_url(
  term(),
  keyword()
) :: {:ok, String.t()} | {:error, term()}

Returns a billing-portal URL for the tenant.