passing parameters to the standard checkout

Dmaxxx
Contributor
Contributor

 I collect the address on my website and need to pass that data to the standard checkout javascript sdk buttons so my

customers do not have to re-enter. I can't find a comprehensive list of the varible:value terms that I can pass in actions.order.create.

So far all I have been able to pass is - purchase_units: {amount: {value: '1.00'} . Anything else I add cause the buttons

to not show.

 

createOrder: function(data, actions) {
return actions.order.create({
purchase_units: {
amount: {value: '1.00'}
shipping: {
address: {
address_line_1: {value: '123 Townsend St'},
address_line_2: {value: 'Floor 6'},
admin_area_2: {value: 'San Francisco'},
admin_area_1: {value: 'CA'},
postal_code: {value: '94107'},
country_code: {value: 'US'},
}
}
}

});
},

Login to Me Too
1 REPLY 1

MTS_Chiranjeevi
Moderator
Moderator

Good day @Dmaxxx,

 

Thank you for posting to the PayPal community.

 

Please find the address variables merchants can pass in the "Create Order" API call.

 

https://developer.paypal.com/docs/api/orders/v2/#definition-shipping_detail.address_portable

shipping object :The name and address of the person to whom to ship the items.

If your still facing any issues, please create a MTS ticket via - https://www.paypal-support.com/s/?language=en_US with the detail information and error details. 

 

Sincerely,

Chiranjeevi

PayPal/Braintree MTS

 

If this post or any other was helpful, please enrich the community by giving kudos or accepting it as a solution.

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.