2
votes

I'm currently using this code to accept payments on my website using PayPal Express Checkout. I removed the shipping fields using the 'NO_SHIPPING' option. Since I'm selling digital goods, I would also like to remove the billing address fields (firstname, lastname, zip, phone, email) or at least any of them. How to do that?

<script src="https://www.paypal.com/sdk/js?client-id={client-id}"></script>
<script>
    render_paypal_button();

    function render_paypal_button() {
        paypal.Buttons({
            createOrder: function(data, actions) {
              return actions.order.create({
                purchase_units: [{
                  amount: {
                    value: 1.00
                  }
                }],
                application_context: {
                    shipping_preference: 'NO_SHIPPING'
                }
              });
            },
            onApprove: function(data, actions) {
              return actions.order.capture().then(function(details) {
              });
            }
          }).render('#paypal-button-container');
  </script>  
1

1 Answers

3
votes

Billing fields are used for payment processing by PayPal, as they are necessary for communication with credit card companies for example. They are not returned to you or included as part of the transaction that you see. You cannot remove them.