title: How to reload / refresh Stripe Checkout button?
body: <p>I'm submitting my Stripe Checkout form via AJAX (catching the form submit event) because I have a complex multi-pane HTML form and want to display payment errors from Stripe without having to reload the page and regenerate the form or making the  user re-enter a load of info.</p>
  
  <p>This all works fine, except once the Stripe Checkout button is used once it's disabled. After I display the error message on the booking form page, I need the user to be able to click the Stripe button again and try different payment info. 
  How do I reactivate the Stripe button? Do I need to remove the whole Stripe button script from the DOM (I'm using jQuery) and re-insert it (or similar code) fresh?</p>
  
  <p>My standard Checkout button code:</p>
  
  <pre class="lang-html prettyprint-override"><code>&lt;script
      src="https://checkout.stripe.com/checkout.js" class="stripe-button"
      data-key="my_stripe_key"
      data-image="mylogo.png"
      data-name="My Booking Form"
      data-zip-code="true"
      data-locale="auto"
      data-email=""
      data-description="Payment for this booking"
      data-currency="gbp"
      data-amount=""
      data-label="Pay and book!"&gt;
  &lt;/script&gt;   
  </code></pre>
  
  <p>and if relevant, my AJAX form submit code:</p>
  
  <pre class="lang-js prettyprint-override"><code>$('#booking-form').get(0).submit = function() {
    var formdata = $(this).serialize();
  
    $.ajax({
      headers: {
        'X-CSRF-TOKEN': $('#booking-form &gt; input[name="_token"]').val()
      },
      type: 'POST',
      url: 'book',
      dataType: 'json',
      data: formdata,
      success: function(data) {
        if (data.response == 'ok') // Payment went through OK
        {
          // Redirect to booking confirmation page:
          window.location.replace(data.url);
        } else // Payment failed, alert user to try again
        {
          $('#erroralert').text('Sorry, payment failed, please try again').removeClass('nodisplay');
        }
      },
      error: function(data) // Server error
      {
        console.log('Error:', data.responseText);
      }
    });
  
    // Prevent form submit.
    return false;
  }
  </code></pre>