Paddle.Price (paddlex v0.1.1) View Source

Price

Link to this section Summary

Functions

Retrieve prices for one or multiple products or plans

Link to this section Functions

Link to this function

get(product_ids, opts \\ [])

View Source

Specs

get([String.t()],
  customer_country: String.t(),
  customer_ip: String.t(),
  coupons: String.t()
) :: {:ok, map()} | {:error, Paddle.Error.t()}

Retrieve prices for one or multiple products or plans

Examples

Paddle.Price.get([123456])
{:ok, %{
  "customer_country" => "GB",
  "products" => [
    %{
      "product_id" => 123456,
      "product_title" => "My Product 3",
      "currency" => "GBP",
      "vendor_set_prices_included_tax" => true,
      "price" => %{
        "gross" => 34.95,
        "net" => 29.13,
        "tax" => 5.83
      },
      "list_price" => %{
        "gross" => 34.95,
        "net" => 29.13,
        "tax" => 5.83
      },
      "applied_coupon" => []
    }
  ]
}}