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
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
- 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
- advanced credit and debit card payment options not available in accept payments in NVP/SOAP APIs
- How do I limit the purchase to max 1 quantity only using Buy Now buttons? in PayPal Payments Standard