Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Decimal amounts are passed to API as zeros #38

Open
glebpom opened this issue Nov 17, 2020 · 0 comments
Open

Decimal amounts are passed to API as zeros #38

glebpom opened this issue Nov 17, 2020 · 0 comments

Comments

@glebpom
Copy link

glebpom commented Nov 17, 2020

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 glebpom changed the title Decimal amounts are passed tp API as zeros Decimal amounts are passed to API as zeros Nov 17, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant