Implement Checkout without requesting shipping address
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi, I'm following the instructions laid out on this documentation page for implementing Paypal Checkout: https://developer.paypal.com/docs/checkout/integrate/
We do not want Paypal using the payer's address as the shipping address. We want Paypal to completely skip anything to do with a shipping address as we collect that ourselves on our website. We sell gift baskets and the item rarely goes to the purchaser, there is a separate recipient.
How do we suppress the collection of the shipping address using this checkout process?
I already looked at the Orders API and the application_context option with shipping_preference = NO_SHIPPING but that doesn't work. It throws a javascript error of "Uncaught ReferenceError: NO_SHIPPING is not defined".
javascript code:
paypal.Buttons({
// Set up the transaction
createOrder: function(data, actions){
return actions.order.create({
purchase_units: [{
amount: {
value: '#numberformat(OrderTotal + ShippingTotal + TaxTotal, "9.99")#'
}
}],
application_context: {
shipping_preference: NO_SHIPPING
}
});
}
}).render('#paypal-button-container');
- Labels:
-
PayPal HTML Buttons
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
you have to send a NO_SHIPPING string
"application_context": {
"shipping_preference": 'NO_SHIPPING'
},

Haven't Found your Answer?
It happens. Hit the "Login to Ask the community" button to create a question for the PayPal community.
- Add tracking INVALID_TRANSACTION_ID in REST APIs
- I am trying to implement PayPal with Salesforce commerce in Sandbox Environment
- how to set the shipping address for the transaction via api request in REST APIs
- Invalid scope error using PayPal Login in Sandbox Environment
- Automatic Sales Tax on Smart Buttons in PayPal Payments Standard