<form id="myForm" action="XXXXXX" method="POST">
    <input type="text" id="amount" name="amount"/>
    <input type="hidden" id="stripeToken" name="stripeToken"/>
    <input type="hidden" id="stripeEmail" name="stripeEmail"/>
</form>
<input type="button" id="customButton" value="pay">

var handler = StripeCheckout.configure({
    key: 'pk_test_6pRNASCoBOKtIshFeQd4XMUh',
    token: function(token) {
        $("#stripeToken").val(token.id);
        $("#stripeEmail").val(token.email);
        $("#myForm").submit();
    }
  });

  $('#customButton').on('click', function(e) {
    var amount = $("#amount").val() *100;
        console.log(amount)
    // Open Checkout with further options
    handler.open({
      name: 'Demo Site',
      description: '2 widgets',
      amount: amount
    });
    e.preventDefault();
  });

  // Close Checkout on page navigation
  $(window).on('popstate', function() {
    handler.close();
  });

100% of your donation is tax deductible