Smart Payment Buttons - How to set return url
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi All,
is there a way to set a return url with Smart Payment Buttons?
It's really unclear for the user that the thank you page is the same of the order page.
Thank you,
Luca
- Labels:
-
PayPal Buttons

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi @Imengine
Thanks for reaching out to us,
Here, you can find an example of how to do this on Smart Buttons.
There is an object called: redirect_urls
return actions.payment.create({
payment: {
transactions: [{
amount: {
total: '0.01',
currency: 'USD'
}
}],
redirect_urls: {
return_url: 'https://example.com',
cancel_url: 'https://example.com'
}
}
});
},
You could also set up a "cancel" URL.
I hope this helps,
Thanks,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank you.
It works also with Subscriptions?
This is my script
<script>
paypal.Buttons({
createSubscription: function(data, actions) {
return actions.subscription.create({
'plan_id': '<?=$paypal_plan_id;?>'
});
},
onApprove: function(data, actions) {}
}).render('#paypal-button-container');
</script>
Best,
Luca
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Did you get this to work? I am also looking for this solution with Smart Buttons and Subscriptions. I can't find any info on how to do this!

Haven't Found your Answer?
It happens. Hit the "Login to Ask the community" button to create a question for the PayPal community.
- Has PayPal removed the ability to update shipping charges on PayPal Buttons? in Business Tools Archives
- 1099 help! My name is on the PayPal account, but I don't own the business! in Reporting Archives
- Paypal Thailand seller buttons not working on personal account in Merchant Products and Services Archives
- How to Edit Payment button in Merchant Products and Services Archives
- I need to create a one item one price payment button in the middle of the Hurricane Ida Disaster? in Merchant Products and Services Archives