Separate purchase amount and shipping cost in SDK
kat_iteracy
Contributor
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Posted on
Jan-16-2023
05:44 AM
I used to use the Rest API to send transaction data but I'm now using the SDK.
One main difference is that with the API I used to be able to post separate amounts for shipping and goods purchased, plus a description of the items purchased.
I am using the code as follows, which works but bundles the shipping cost into the total order. Is there a way to send shipping amount as a separate field? There is documentation about sending shipping name and address but not amount.
// Sets up the transaction when a payment button is clicked
createOrder: function(data, actions) {
return actions.order.create({
purchase_units: [{
amount: {
value: '[order total including shipping]'
}
}]
});
},
0 REPLIES 0
![](/skins/images/D5B8BD0DC6B6E0A6133F550EC4C25E94/responsive_peak/images/icon_anonymous_message.png)
Haven't Found your Answer?
It happens. Hit the "Login to Ask the community" button to create a question for the PayPal community.
Related Content
- Problems with PayFlow in Payflow
- How To Redirect To Custom Landing Pages For Multiple Websites in PayPal Payments Standard
- Sandbox works but live => INVALID_RESOURCE_ID in Sandbox Environment
- My Shopify checkout keeps looping and not letting customers complete the payment through PayPal. in PayPal Payments Standard
- drop down menu does not work on single buy it now button in PayPal Payments Standard