Separate purchase amount and shipping cost in SDK


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]'



Login to Me Too

Haven't Found your Answer?

It happens. Hit the "Login to Ask the community" button to create a question for the PayPal community.