terraform-provider-stripe icon indicating copy to clipboard operation
terraform-provider-stripe copied to clipboard

Decimal amounts are passed to API as zeros

Open glebpom opened this issue 3 years ago • 0 comments

I'm trying to create the price with decimal values.

When I'm passing tiers in stripe_price resource:

  tier {
    up_to       = 500
    unit_amount_decimal = 0.0
    flat_amount_decimal = 1000.0
  }

  tier {
    up_to_inf   = true
    unit_amount_decimal = 0.1
    flat_amount_decimal = 0.0
  }

the resulting api call body contains zeroes on prices:

  "tiers": {
    "0": {
      "flat_amount": "0",
      "unit_amount": "0",
      "up_to": "500"
    },
    "1": {
      "flat_amount": "0",
      "unit_amount": "0",
      "up_to": "inf"
    }
  },

glebpom avatar Nov 17 '20 09:11 glebpom