Coffrify. Resources. Billing
(Coffrify v0.9.0)
View Source
Stripe-backed billing — subscription, usage, address, portal/checkout links.
Summary
Functions
Mint a Stripe Checkout URL for upgrading to Pro or Ultra.
Mint a Stripe Customer Portal URL.
Fetch the billing address.
Fetch the current Stripe subscription.
List metered usage rows (per period).
Update the billing address.
Functions
@spec create_checkout_link(Coffrify.t(), map() | keyword()) :: {:ok, map()} | {:error, Exception.t()}
Mint a Stripe Checkout URL for upgrading to Pro or Ultra.
@spec create_portal_link( Coffrify.t(), keyword() ) :: {:ok, map()} | {:error, Exception.t()}
Mint a Stripe Customer Portal URL.
@spec get_address(Coffrify.t()) :: {:ok, map()} | {:error, Exception.t()}
Fetch the billing address.
@spec get_subscription(Coffrify.t()) :: {:ok, map()} | {:error, Exception.t()}
Fetch the current Stripe subscription.
@spec get_usage( Coffrify.t(), keyword() ) :: {:ok, map()} | {:error, Exception.t()}
List metered usage rows (per period).
@spec update_address(Coffrify.t(), map()) :: {:ok, map()} | {:error, Exception.t()}
Update the billing address.