Smart button without shipping
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello All,
This new smart button jdk is making my life difficult ...
All I need is the code to add for a paypal checkout button that doesn't inquire shipping address (we are selling digital goods), and with a variable amount (I will instruct the cart amount through JS.
That's what I have for now :
<script src="https://www.paypal.com/sdk/js?client-id=sb¤cy=EUR" data-sdk-integration-source="button-factory"></script>
<script>
paypal.Buttons({
style: {
shape: 'rect',
color: 'gold',
layout: 'vertical',
label: 'paypal',
},
createOrder: function(data, actions) {
return actions.order.create({
purchase_units: [{
amount: {
value: '1'
}
}]
});
},
onApprove: function(data, actions) {
return actions.order.capture().then(function(details) {
alert('Transaction completed by ' + details.payer.name.given_name + '!');
});
}
}).render('#paypal-button-container');
</script>
Can anyone help with that? I spend 3 hours today reading the manuel without finding any concrete help.
Thanks
- Labels:
-
PayPal HTML Buttons

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi @Mo1111,
Thank you for contacting PayPal community.
We apologize for any inconvenience.
Yes, you can able to handle the shipping address fields during PayPal checkout using parameter "NOSHIPPING".
I request to please contact your website developer, to cross check your website payment request API calls and modify the value "NOSHIPPING to "1" in your payment calls. Since you have confirmed that your website doesn't ship any physical goods/products to the customers.
Once this settings is done, PayPal system will not show/provide the shipping address option to the customers and resolves the issue.
- Displays the shipping address to the customer.
- Enables the customer to choose an address on the PayPal site.
- Restricts the customer from changing the address during the payment-approval process.
- GET_FROM_FILE. Use the customer-provided shipping address on the PayPal site.
- NO_SHIPPING. Redact the shipping address from the PayPal site. Recommended for digital goods.
- SET_PROVIDED_ADDRESS. Use the merchant-provided address. The customer cannot change this address on the PayPal site.
Default: GET_FROM_FILE.
Guide link for reference -
https://developer.paypal.com/docs/api/orders/v2/#definition-order_application_context
Note - This parameter will disable shipping address during PayPal checkout flow. Please use this parameter if your website doesn't ship any physical products to the customers/clients.
Thank you so much for your patience and understanding.
Sincerely,
Chiranjeevi
PayPal, Inc.
If this post or any other was helpful, please enrich the community by giving kudos or accepting it as a solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello Chiranjeevi,
Thanks for your reply.
You manual doesn't provide any code examples, so I do not know how to use this parameter.
Could you please show me how to use it concretely?
var purchase_value = '100';
paypal.Buttons({
style: {
shape: 'rect',
color: 'gold',
layout: 'vertical',
label: 'paypal',
},
createOrder: function(data, actions) {
return actions.order.create({
purchase_units: [{
amount: {
value: purchase_value,
}
}]
});
},
onApprove: function(data, actions) {
return actions.order.capture().then(function(details) {
alert('Transaction completed by ' + details.payer.name.given_name + '!');
});
}
}).render('#paypal-button-container');
Also, OnAprove I would like to redirect the user to a success page, how can I assure the access to that page is done by your system? do I receive any variable or other element?
Thanks
- 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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
It works for me, but removes the city name, street name and house number input fields. This way it is not a full billing information, because it contains only first name, last name and postal code. Is there anything else to solve this problem?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank you! @smile108 That worked for me too . The smart button documentation seems badly lacking.

Haven't Found your Answer?
It happens. Hit the "Login to Ask the community" button to create a question for the PayPal community.
- Sandbox account collect billing and shipping address in Sandbox Environment
- "System error. Please try again later" when connecting to paypal sandbox account with my android app in Sandbox Environment
- Things don’t appear to be working at the moment in PayPal Payments Standard
- Something went wrong. Contact the merchant for help. in PayPal Payments Standard
- How to prompt a "thank you" after using donate button on a website in PayPal Payments Standard