PayPal Checkout Turn Off Shipping
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
I don't am trying to setup an online purchase that does not require shipping. I have added the following code to my website:
<script
src="https://www.paypal.com/sdk/js?client-id=sb&locale=en_AU¤cy=AUD">
</script>
<script>
paypal.Buttons({
createOrder: function(data, actions) {
// This function sets up the details of the transaction, including the amount and line item details.
return actions.order.create({
purchase_units: [{
amount: {
value: '0.01'
},
application_context: {
shipping_preference: "NO_SHIPPING",
}
}]
});
},
onApprove: function(data, actions) {
// This function captures the funds from the transaction.
return actions.order.capture().then(function(details) {
// This function shows a transaction success message to your buyer.
alert('Transaction completed by ' + details.payer.name.given_name);
});
}
}).render('#paypal-button-container');
</script>
When I click the Debit or Credit Card button that displays, it requests a billing address and has a check box called "Ship to billing address". Is there a way to turn this off?
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I think you missed the description. I think Shipping looks at it.
Here is code that does work
return actions.order.create({
purchase_units: [{
description: 'GnG Order',
amount: {
value: cartTotal
}
}],
application_context: {
shipping_preference: 'NO_SHIPPING'
}
});
},
End of Code Block
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

Haven't Found your Answer?
It happens. Hit the "Login to Ask the community" button to create a question for the PayPal community.
- Is it possible to make payments in RON (Romanian Leu) through PayPal? in REST APIs
- Sandbox account collect billing and shipping address in Sandbox Environment
- Payments Refunded Automatically After Successful Transactions - PayPal Business Account Issue in REST APIs
- p is not a function error using the example downloaded from Paypal in SDKs
- How to enable on-demand / recurring payments to existing PayPal checkout? in SDKs