paypal.Buttons({ style: { shape: 'pill', color: 'gold', layout: 'vertical', label: 'paypal' }, createSubscription: function(data, actions) { return actions.subscription.create({ /* Creates the subscription */ plan_id: 'P-59Y822567L281092VMIBENRQ' }); }, onApprove: function(data, actions) { alert(data.subscriptionID); // You can add optional success message for the subscriber here } }).render('#paypal-button-container-P-59Y822567L281092VMIBENRQ'); // Renders the PayPal button