cancel
Showing results for 
Search instead for 
Did you mean: 

Separate purchase amount and shipping cost in SDK

Options
kat_iteracy
Contributor
Posted on

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]'
          }
        }]
      });
    },

 

 

Haven't Found your Answer?

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