You have no items in your shopping cart.

Sunday, June 22, 2025 5:06:58 PM

PayPal Standard Pro - ERROR: Transaction amount details (subtotal, tax, shipping) must add up to specified amount total

Avatar

wize11

Avatar

Posted: 1 day ago

#13677 Quote

wize11

Posted: 1 day ago

#13677 Quote
Hi,

We having issue with PayPal plugin it, i think its something related to reverse calculation of subtotal, tax and shipping values.

So, my customer stores all its prices including tax. But my guess to paypal you need pass values excluding tax. So plugin tries to calculate them and somewhere gets it wrong. Paypal returns error saying that total is not equal to sum of subtotal, tax and shipping amounts.

Here is what im talking about, this is what i got from log when i got this error:

The intent request sends to paypal following:

{
    "intent": "sale",
    // deleted some unrelevant data
    "transactions": [
        {
            "amount": {
                "currency": "GBP",
                "total": "68.15",
                "details": {
                    "subtotal": "55.04",
                    "shipping": "9.99",
                    "tax": "3.13"
                }
            },
            // deleted some unrelevant data
        }
    ],
    // deleted some unrelevant data
}

If you calculate some of "subtotal", "shipping" and "tax" fields you will get value of 68.16, which does not match value in "total" field, which is 68.15.
As result we get following error from PayPal:

2025.06.20 15:26:05:6098*******
Error. GetApprovalUrl approvalUrl=
- Payment error: PayPal error: Invalid request - see details (VALIDATION_ERROR)
- Payment error: transactions[0].amount Transaction amount details (subtotal, tax, shipping) must add up to specified amount total

We getting lots of customers saying that they are cant pay for order, because of this issue recently.

Please help! :)

Powered by nopCommerce

Copyright © 2025 FoxNetSoft. All rights reserved