no_shipping option in new Smart Buttons API
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I'm integrating the new Smart Buttons into my website. Using the older (prior to Feb 2019) API, I could specify a no_shipping option, so that the user would not be prompted for their address on PayPal pages, as in the following snippet:
paypal.Button.render({
payment: function (data, actions) {
return actions.payment.create({
experience: {
input_fields: {no_shipping: 1}
}});},}, '#paypal-button');
The new API evidently uses actions.order.create() instead of actions.payment.create(), and specifying experience: {input_fields: {no_shipping: 1}}} there doesn't seem to have any effect. So how do I hide the shipping address on paypal pages during checkout?
- Labels:
-
API
-
Express Checkout

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Use https://developer.paypal.com/docs/api/orders/v2/#definition-application_context
pass shipping_preference as NO_SHIPPING
it should look something like
"payment_source": {
"paypal": {
"experience_context": {
"shipping_preference": "NO_SHIPPING"
}
}
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I tried this as well, though in my Paypal dashboard, new orders still have shipment options and i can/must still apply orders as 'shipped' manually.
Anybody else with more luck?
PS. i'm using this particular Paypal account for donations and digital goods.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
Can you please comment your Sandbox Merchant ID? I can review your Sandbox account to ensure that it is setup correctly. Also I will review the requests and responses that is coming in.
Your request should look something like this to suppress the shipping. I also need to check and see if the account is enabled for Digital Goods as well.
{
"intent": "CAPTURE",
"purchase_units": [
{
"amount": {
"currency_code": "USD",
"value": "100.00"
}
}
],
"payment_source": {
"paypal": {
"experience_context": {
"shipping_preference": "NO_SHIPPING",
}
}
}
}
Thank you,
Jennifer
PayPal
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Jennifer,
I'm replying on the account I've set-up. (I've posted the question under the name "iX Studios".
Where can i find the "merchant ID"?
I only have Client ID.
This is the script i'm using:
(major difference is i don't use is the intent = CAPTURE - is that needed?)
<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({
reference_id: 'BAR 10',
description: 'BAR Donation $10',
purchase_units: [{
amount: {
value: '10.00',
currency_code: 'USD',
breakdown: {
item_total: {value: '10', currency_code: 'USD'}
}
},
items: [{
name: 'BAR Donation 10',
unit_amount: {value: '10.00', currency_code: 'USD'},
quantity: '1',
category: 'DIGITAL_GOODS'
}]
}],
application_context: {
shipping_preference: 'NO_SHIPPING',
return_url: 'https://www.beyondallreason.info/thank-you',
cancel_url: 'https://www.beyondallreason.info/too-bad'
}
});
},
onApprove: function(data, actions) {
return actions.order.capture().then(function(details) {
// Show a success message to the buyer
alert('Transaction completed by ' + details.payer.name.given_name + '!');
});
}
}).render('#paypal-button-container');
//This function displays Smart Payment Buttons on your web page.
</script>
At the moment we don't have explicit "digital goods" - for now it's 99% donations.
We do like to setup some 'digital rewards' like naming donateurs or giving them a special badge in our (free) game.
I hope you can help me improve this, because currently, donations/transactions all get blocked by default and take a long time to get 'free'.
And i think i have to manually "send the digital goods" for each transaction, which i would like be automated.
PS. Side question: is it also possible to do recurring donations, like $5 each month or each year?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The NO_SHIPPING option won't hide shipping fields for credit card payments (choose PayPal from Smart Payment Buttons then "Pay with a card").
Too, for Sofort and MyBank payments (not working, btw) it will asks again Name, Surname, e-mail address and phone (I didn't ask the phone to my customers). At least you can prefill them.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Too, the Paypal popup shows the Ship to for a moment, while loading (will disappear when loading finished). Very poor UI experience
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks to the moderatos for their prompt responses. For posterity I want to say that I sell physical goods and collect shipping addresses directly on my site, and then pass that information along to PayPal to complete the payment. I later manually purchase the shipping label on PayPal. In my case, the original answer ("shipping_preference":"NO_SHIPPING") behaves exactly as I desire (does not re-prompt the user for their address). I have never tried to sell non-physical goods, but conceptually it seems like the PayPal API should handle that separately so that vendors do not need to manually mark these goods as shipped. If somebody knows how to do that, this might be a good place to post it, although I personally do not need an answer to this.

Haven't Found your Answer?
It happens. Hit the "Login to Ask the community" button to create a question for the PayPal community.
- PayPal Pay buttons a mysterious process in PayPal Payments Standard
- Help a nonprofit set up an order form with multiple options in PayPal Payments Standard
- Is there a way to dynamically-populate a product ID into the no-code button? in PayPal Payments Standard
- My form has recently stopped sending the quantity info direct to the paypal checkout page. in PayPal Payments Standard
- I can't set Shipping Calculations for a Buy now Button - there's no option in my profile? in Braintree Client-side Integration (JS, iOS, Android SDKs)