Multiple items smart button
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
I am trying to implement the smart button and I need to pass more than one item to it in the checkout call.
Is this possible?
The code I am using is the following:
purchase_units: [{
amount: {
currency_code: "USD",
value: "110.0",
breakdown: {
item_total: {currency_code: "USD", value: "100.00"},
tax_total: {currency_code: "USD", value: "10.00"}
}
},
items: [{name: "wiersze", tax: {currency_code: "USD", value: "10.00"}, quantity: "1", unit_amount: {currency_code: "USD", value: "100.00"}}]
}],
redirect_urls: {
return_url: "https: //example/ok.php",
cancel_url: "https: //example/error.php"
}

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi @Santi76
Yes, this is definitely possible and it looks like you're on the right track!
Here is the documentation for the Item Object which it looks like you've already been looking at based on how you've crafted your call. Keep in mind If you specify amount.breakdown, the amount equals item_total plus tax_total plus shipping plus handling plus insurance minus shipping_discount minus discount.
Is there a particular error you're running into? I would just try that out in sandbox, working the kinks out as you go. However that looks like a valid call to my eyes.
Hope that helps!
-Aaron

Haven't Found your Answer?
It happens. Hit the "Login to Ask the community" button to create a question for the PayPal community.
- "System error. Please try again later" when connecting to paypal sandbox account with my android app in Sandbox Environment
- use the payment button code with variable price in REST APIs
- A cart needed for multiple items ordered at once in PayPal Payments Standard
- Add to cart button is missing? in PayPal Payments Standard
- Integrating PayPal's smart button into Shopify without specifying the price or shipping rates. in PayPal Payments Standard