#simonc-subscription-error

1 messages · Page 1 of 1 (latest)

wraith idolBOT
#

Hello! We'll be with you shortly. Below are links to other discussions we've had with you in the past week in case you want to review that information. If your question is related to one of these previous discussions, please provide a comprehensive summary of the current state and what you need help with now. We help many users simultaneously, so a summary allows us to resolve your issue as soon as possible.

  • simonc, 1 day ago, 39 messages
  • simonc, 4 days ago, 103 messages
  • simonc, 5 days ago, 8 messages
karmic current
#

The error I got:

invalid_request_error - plan
Invalid string: {:id=>"price_1MRMNfFEFyxL8YontFZAEmKF", :object=>"plan", :amount_decimal=>"4999", :product=>"prod_NBjrp0hrXndzRq", :amount=>"4999", :tiers_mode=>"", :billing_scheme=>"per_unit", :livemode=>"false", :active=>"true", :currency=>"eur", :nickname=>"", :transform_usage=>"", :usage_type=>"licensed", :aggregate_usage=>"", :created=>"1673989663", :interval_count=>"1", :trial_period_days=>"", :interval=>"month"}

#

req_mLCUOQhZtIbDzT

olive hinge
#

simonc-subscription-error

#

@karmic current our API reference documents all the parameters of the API: https://stripe.com/docs/api/subscriptions/create
Right now your code seems to send parameters as a JSON encoded string which would never work. You seem to be passing items and putting some list inside of it which doesn't really make sense.

You have to fix your code so that you cleanly pass each parameter

karmic current
#

Is there a way to clean a subscription I get and input it has a proper JSON encoded for creating a subscription?

olive hinge
#

@karmic current sorry I missed your message my bad.
And no there's nothing like this