title: Can I use stripe's simple JS form with subscriptions?
body: <p>I have a rails app that I'm trying to implement stripe on. I need subscriptions and I'd like to use the really simple JS form stripe provides but i'm not sure how to do it with subscriptions. </p>
  
  <p>With the JS form (shown below), it seems I can't specify a plan or a way to know which plan was selected. Here's my view:</p>
  
  <pre><code>= form_tag subscriptions_path do
    %article
      %label.amount
        %span Plan: Basic, Amount: $5.00
    %script.stripe-button{"data-amount" =&gt; "500", "data-description" =&gt; "A month's subscription", "data-key" =&gt; Rails.configuration.stripe[:publishable_key], src: "https://checkout.stripe.com/checkout.js"}
  </code></pre>
  
  <p>here's my create method in subscriptions controller:</p>
  
  <pre><code>  def create
      # Amount in cents
      @amount = 500
  
      customer = Stripe::Customer.create(
        email: current_user.company.admin.email,
        plan:  '???'
        card:  params[:stripeToken]
      )
  
    rescue Stripe::CardError =&gt; e
      flash[:error] = e.message
      redirect_to subscriptions_path
    end
  </code></pre>
  
  <p>how do I know which plan was selected from the stripe form checkout.js</p>