Require non-consumer email for guest checkout (Subscription)

RataCross
Contributor
Contributor

Hi, does anyone know if there is a way to require non-consumer email when a customer pays by credit or debit card? I cannot find anything about this.

This is the code we're using for the subscription checkout. Everything is working fine, but we need users to enter a non-generic email.

<div id="paypal-button-container-XXXXXXXXXXXX"></div>
<script src="https://www.paypal.com/sdk/js?client-id=XXXXXXXXXXXXX&vault=true&intent=subscription&disable-funding=credit" data-sdk-integration-source="button-factory"></script>
<script>
  paypal.Buttons({
      style: {
          shape: 'pill',
          color: 'silver',
          layout: 'vertical',
          label: 'subscribe'
      },
      createSubscription: function(data, actions) {
        return actions.subscription.create({
          /* Creates the subscription */
          plan_id: 'XXXXXXXXXXXXX',
         application_context: {        
          shipping_preference: 'NO_SHIPPING'
           }
        });
      },
      onApprove: function(data, actions) {
        alert(data.subscriptionID); // You can add optional success message for the subscriber here
        actions.redirect('XXXXXXXXXXXXX');
      }
  }).render('#paypal-button-container-XXXXXXXXXXX'); // Renders the PayPal button
</script>

Thank you

Login to Me Too
0 REPLIES 0

Haven't Found your Answer?

It happens. Hit the "Login to Ask the community" button to create a question for the PayPal community.