I assume you say Stripe Checkout . See the section "Custom buttons".
Add a script tag to test Stripe in <head>your template file.
<head>
<script src="https://checkout.stripe.com/v2/checkout.js"></script>
</head>
Then add a button, anchor, or other clickable tag template to the template.
<template name="payment">
<button>Pay</button>
</template>
Then add an event to open the form in the Stripe text box when you click the button.
Template.payment.events({
'click button': function(e) {
e.preventDefault();
StripeCheckout.open({
key: 'YOUR PUBLIC KEY',
amount: 5000,
name: 'The Store',
description: 'A whole bag of awesome ($50.00)',
panelLabel: 'Pay Now',
token: function(res) {
console.info(res);
}
});
}
});
Stripe "" . id , .