StripeManaged.Price (StripeManaged v0.1.0)

Copy Markdown View Source

Manage prices for Stripe products.

Each product can have multiple prices (monthly, yearly, etc.). Tax behavior defaults to exclusive in Managed Payments (tax added on top of the stated price).

Example

{:ok, price} = StripeManaged.Price.create(%{
  product: "prod_abc123",
  unit_amount: 29900,
  currency: "usd",
  recurring: %{interval: "year"},
  tax_behavior: "exclusive"
})

Summary

Functions

Creates a new price.

Lists prices. Accepts optional filter params like product.

Returns a lazy Stream of all prices, auto-paginating.

Retrieves a price by ID.

Updates a price. Only active, metadata, nickname, and tax_behavior can be updated.

Functions

create(params, opts \\ [])

@spec create(
  map(),
  keyword()
) :: StripeManaged.Client.response()

Creates a new price.

list(params \\ %{}, opts \\ [])

@spec list(
  map(),
  keyword()
) :: StripeManaged.Client.response()

Lists prices. Accepts optional filter params like product.

list_all(params \\ %{}, opts \\ [])

@spec list_all(
  map(),
  keyword()
) :: Enumerable.t()

Returns a lazy Stream of all prices, auto-paginating.

retrieve(id, opts \\ [])

@spec retrieve(
  String.t(),
  keyword()
) :: StripeManaged.Client.response()

Retrieves a price by ID.

update(id, params, opts \\ [])

@spec update(String.t(), map(), keyword()) :: StripeManaged.Client.response()

Updates a price. Only active, metadata, nickname, and tax_behavior can be updated.