cancel
Showing results for 
Search instead for 
Did you mean: 

How can I pass shipping address to PayPal Express checkout

Member

How can I pass shipping address to PayPal Express checkout

 I am using PayPal Express checkout Client-side REST for our eCommerce solution. I am wondering how I can pass shipping address from our website to PayPal, so we can have the shipping address confirmed by PayPal and be eligible for Seller Protection. For your reference I am using below code:

 

<div id="paypal-button"></div>

<script src="https://www.paypalobjects.com/api/checkout.js"></script>

<script>
    paypal.Button.render({

        env: 'production', // Or 'sandbox'

        client: {
            sandbox:    'xxxxxxxxx',
            production: 'xxxxxxxxx'
        },

        commit: true, // Show a 'Pay Now' button

        payment: function(data, actions) {
            return actions.payment.create({
                payment: {
                    transactions: [
                        {
                            amount: { total: '1.00', currency: 'USD' }
                        }
                    ]
                }
            });
        },

        onAuthorize: function(data, actions) {
            return actions.payment.execute().then(function(payment) {

                // The payment is complete!
                // You can now show a confirmation message to the customer
            });
        }

    }, '#paypal-button');
</script>

Thanks for your help in advance. 

1 REPLY
Highlighted
Contributor

Re: How can I pass shipping address to PayPal Express checkout

That would be good question to ask the Merchant Support Community as there are other Developers there who may be able to assist.

Tags (1)