I am using stripe gem v 1.57.0, Ruby 2.3.0, Stripe API version 2016-07-06 on Ubuntu 16. I have a paid-plan called "small" and I run the following in stripe-console:
Stripe.api_key = 'sk_test_<rest of my test publishable key>'
st = Stripe::Token.create(card: {number:"4242424242424242",exp_month:11, exp_year:2017, cvc:123})
Stripe::Customer.create(plan:"small", email:"u...@example.com", default_source:st.id)
and i get:
Stripe::InvalidRequestError: (Status 400) (Request req_9eDifdeAcouHxI) No such source: tok_19KvD....
I thought I understood how things were supposed to work: you get a token for the card and pass that token and a plan name when creating a customer with a subscription.
What am I missing?