- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi all,
I've followed the Client-side REST integration steps and changed the following code to include my info and can complete payments fine. However, I want to display the items customers are paying for but can't figure out how to send this information with the amount in the included code. Is this even possible?
<div id="paypal-button"></div> <script src="https://www.paypalobjects.com/api/checkout.js"></script> <script> paypal.Button.render({ env: 'production', // Or 'sandbox' client: { sandbox: 'xxxxxxxxx', production: 'xxxxxxxxx' }, commit: true, // Show a 'Pay Now' button payment: function(data, actions) { return actions.payment.create({ payment: { transactions: [ { amount: { total: '1.00', currency: 'USD' } } ] } }); }, onAuthorize: function(data, actions) { return actions.payment.execute().then(function(payment) { // The payment is complete! // You can now show a confirmation message to the customer }); } }, '#paypal-button'); </script>
Solved! Go to Solution.
Accepted Solutions

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You can pass the line item details in the Items object.
Below is a sample from the Rest API PayPal Payments section of the PayPal Developer Site:
"item_list": {
"items": [
{
"name": "hat",
"description": "Brown color hat",
"quantity": "5",
"price": "3",
"tax": "0.01",
"sku": "1",
"currency": "USD"
},
Thank you,
Jennifer

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You can pass the line item details in the Items object.
Below is a sample from the Rest API PayPal Payments section of the PayPal Developer Site:
"item_list": {
"items": [
{
"name": "hat",
"description": "Brown color hat",
"quantity": "5",
"price": "3",
"tax": "0.01",
"sku": "1",
"currency": "USD"
},
Thank you,
Jennifer

Haven't Found your Answer?
It happens. Hit the "Login to Ask the community" button to create a question for the PayPal community.
- PayPal Express Error #10413 when people use a discount code on my Magento2 store in PayPal Payments Standard
- ExpressCheckout to REST API - Is Partner Program Now Required to Host Simple 3rd Party Transactions? in REST APIs
- permission_denied response in call to patch order when paying by Card in Braintree Client-side Integration (JS, iOS, Android SDKs)
- Unable to test successful payments using sandbox personal accounts in NVP/SOAP APIs
- will new changes to API just announced break integration with our express checkout in NVP/SOAP APIs