<div id="paypal-button-container-P-5203113132080574RMEXW53A"></div>

<script src="https://www.paypal.com/sdk/js?client-id=AS2BxocQMN7ewdAVWu_8mIWZjrEJ9btED-k79NrAdwSWfxEs3wrkYQvfnkwHY7U6n5s52JKdmAAc051_&vault=true&intent=subscription" data-sdk-integration-source="button-factory"></script>

<script>

  paypal.Buttons({

      style: {

          shape: 'pill',

          color: 'blue',

          layout: 'vertical',

          label: 'paypal'

      },

      createSubscription: function(data, actions) {

        return actions.subscription.create({

          /* Creates the subscription */

          plan_id: 'P-5203113132080574RMEXW53A'

        });

      },

      onApprove: function(data, actions) {

        alert(data.subscriptionID); // You can add optional success message for the subscriber here

      }

  }).render('#paypal-button-container-P-5203113132080574RMEXW53A'); // Renders the PayPal button

</script>