Smart Payment Buttons and Multiple purchase_units
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I'm seeing contradictory behavior when using the Smart Buttons and trying send multiple payment_units.
The Orders API clearly states that "payment_units" is an array and implies that multiple items are allowed: "An array of purchase units. Each purchase unit establishes".
Further adding to the confusion, when I send multiple payment_unit_request objects in the array, the PayPal payment UI displays the total amount for all of the payment_unit_request amounts.
The scenario only fails when the payer clicks the pay button. At this point, the capture API call returns a 400 response indicating that "The requested action could not be performed, semantically incorrect, or failed business validation."
Here is the full response object:
{
"ack": "contingency",
"contingency": "UNPROCESSABLE_ENTITY",
"data": {
"name": "UNPROCESSABLE_ENTITY",
"details": [
{
"field": "/purchase_units/@reference_id==4dbc6c54-1111-41ab-94db-3f3d493819b7",
"issue": "PAYER_INVALID_FOR_PAYMENT",
"description": "Mismatch between request payer account number and session"
},
{
"field": "/purchase_units/@reference_id==4dbc6c54-2222-41ab-94db-3f3d493819b7",
"issue": "PAYER_INVALID_FOR_PAYMENT",
"description": "Mismatch between request payer account number and session"
}
],
"message": "The requested action could not be performed, semantically incorrect, or failed business validation.",
"debug_id": "614f4d6613c4c",
"links": [
{
"href": "https://developer.paypal.com/docs/api/orders/v2/#error-PAYER_INVALID_FOR_PAYMENT",
"rel": "information_link",
"method": "GET"
}
]
},
"meta": {
"calc": "614f4d6613c4c",
"rlog": "rZJvnqaaQhLn%2FnmWT8cSUueWscmrtUHe5Y1Bd%2FeqyvyOTq66rSXAcoHt23K4aX7r7RV0T%2BAtZVLHG%2FvY24WQLtP8HscVD18wRlJBrCCC7%2BE_176fc4daa02"
},
"server": "20-vV5gRvwbVJCitHScvK0IsJLy1aejD25H9pAU97CPyG3rmMtCIdkuzRZFsKzrdD1QPvQfhjgPYGeSc2PkxzzT62xVYQhnp2ZDIbobrsOJKDn3yXD_5MMebxS6FxlH9d7uH0UYpP-IsESzqThCLB4-qXH58qXSDP4XlqkwUxILEYHC4UOGmzqF95eejxEJlTdk_1pPAyTj9JSbKpua1DomqFUAPAXEfJSvSmogXlQqEe4wJQ8bjrURYveML_LUDDfVQt5gQuPk4VMm4W7MZ3m"
}
- Labels:
-
PayPal HTML Buttons

Haven't Found your Answer?
It happens. Hit the "Login to Ask the community" button to create a question for the PayPal community.
- Add to cart button is missing? in PayPal Payments Standard
- Multiple subscription links not working in REST APIs
- paypal angular sandbox, receiving not approved order ,when Capture even OnApprove is triggered in Sandbox Environment
- Paypal button - allow the user to select more than one item in the list or add to cart in PayPal Payments Standard
- paypal_js_sdk_v5_unhandled_exception {err: 'Error: No ack for postMessage init() in SDKs