What happens to cart items submitted to orders endpoint
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I added "items" from a cart to the payload of my call to the /v2/checkout/orders endpoint inside purchase_unit with the following structure. The order and following capture all work, but the items are not shown in the server side jsonResponse to the order or the client-side response to the capture. This is in Sandbox. Am I doing this correctly? Will these items be recorded in PayPal anywhere when I go live -- or do I need to record them in a db?
Below is the items json, and below that is the whole payload to the orders endpoint.
const items = [
{
"name": "dance_admission",
"unit_amount": {
"currency_code": "USD",
"value": "150.00"
},
"quantity": "1",
"description": "Dancer: Test Test, Under 30: Yes, Dietary: omnivore"
},
{
"name": "dance_admission",
"unit_amount": {
"currency_code": "USD",
"value": "150.00"
},
"quantity": "1",
"description": "Dancer: Saturday guy, Under 30: No, Dietary: vegetarian"
}
]
This is the complete payload, showing where the above items are placed.
body: JSON.stringify({ purchase_units: [ { amount: { currency_code: "USD", value: totalAmount, breakdown: { item_total: { currency_code: "USD", value: totalAmount } } }, items:items }, ]

Haven't Found your Answer?
It happens. Hit the "Login to Ask the community" button to create a question for the PayPal community.
- NOT ENABLED TO VAULT PAYMENT SOURCE in Sandbox Environment
- How do you create subscriptions with PayPal Advanced Checkout? in SDKs
- Why does PayPal redirect to different pages (login vs credit card form) depending on browser mode? in Braintree Server-side Integration (PHP, Java, .NET, Ruby, Python, NodeJS SDKs)
- PERMISSION_DENIED error for checkout/orders/{order_id} endpoint in REST APIs
- permission_denied response in call to patch order when paying by Card in Braintree Client-side Integration (JS, iOS, Android SDKs)