How to solve the “UNPROCESSABLE_ENTITY – Should equal sum of (unit_amount * quantity) across all items for a given purchase_unit” error message?

The error occurred due to a slight variation in the price calculated by WooCommerce and PayPal. Since both PayPal and WooCommerce take the cost of each item and calculate the subtotal independently, a small variation in decimals can affect the subtotal. Since the total value includes the subtotal and the tax, it will be the same after rounding off the decimals at the end. As a workaround for this issue, we can provide you with a custom code snippet to send only the total to PayPal instead of sending each item’s price and quantity. However, by doing so, the individual order information will no longer be available in the PayPal account but only in your WooCommerce account. If you are okay with that, contact us through support.

Can’t find what you need?

Browse our Documentation or contact Support to get your questions answered.

Help Desk