You have no items in your shopping cart.

Friday, August 8, 2025 2:03:04 PM

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

Avatar

wize1

Avatar

Posted: 1 month ago

#13677 Quote

wize1

Posted: 1 month 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! :)
Avatar

Support

Avatar

Posted: 1 month ago

#13678 Quote

Support

Posted: 1 month ago

#13678 Quote
You are right. The issue is in the calculation and rounding Taxes.
Could you enable "don't send order items" on the plugin configure page?
Avatar

wize1

Avatar

Posted: 1 month ago

#13679 Quote

wize1

Posted: 1 month ago

#13679 Quote
Support wrote:
You are right. The issue is in the calculation and rounding Taxes.
Could you enable "don't send order items" on the plugin configure page?


We tried that already, but problem persists.
Avatar

Support

Avatar

Posted: 1 month ago

#13680 Quote

Support

Posted: 1 month ago

#13680 Quote
Could you check order amounts for this order?

"amount": {
                "currency": "GBP",
                "total": "68.15",
                "details": {
                    "subtotal": "55.04",
                    "shipping": "9.99",
                    "tax": "3.13"
                }
            },

What values do you see in the nopcommerce admin dashboard?
Do you see the cents or several digits after the dot?
Avatar

wize1

Avatar

Posted: 1 month ago

#13681 Quote

wize1

Posted: 1 month ago

#13681 Quote
Support wrote:
Could you check order amounts for this order?

"amount": {
                "currency": "GBP",
                "total": "68.15",
                "details": {
                    "subtotal": "55.04",
                    "shipping": "9.99",
                    "tax": "3.13"
                }
            },

What values do you see in the nopcommerce admin dashboard?
Do you see the cents or several digits after the dot?


I can not, as there no order created before payment made.
Avatar

wize1

Avatar

Posted: 1 month ago

#13682 Quote

wize1

Posted: 1 month ago

#13682 Quote
But, if i look at other orders. They are all show only 2 decimals.

So for example:

Order subtotal
£43.71 incl tax
Order shipping
£11.99 incl tax
Order tax
20%
£2.00
Order total
£55.70
Refunded amount
£2.21
Profit
£15.34
Avatar

Support

Avatar

Posted: 1 month ago

#13683 Quote

Support

Posted: 1 month ago

#13683 Quote
Send me nopcommerce order values for this order

"amount": {
                "currency": "GBP",
                "total": "68.15",
                "details": {
                    "subtotal": "55.04",
                    "shipping": "9.99",
                    "tax": "3.13"
                }
            },

I would like to compare it.
Avatar

wize1

Avatar

Posted: 1 month ago

#13684 Quote

wize1

Posted: 1 month ago

#13684 Quote
I'm sorry if I don't understand what you asking for.

But as i said before, I can not send you order values because order was never created. Order only gets created after payment made, which could not be completed because of the problem mentioned.
Avatar

Support

Avatar

Posted: 1 month ago

#13685 Quote

Support

Posted: 1 month ago

#13685 Quote
The plugin gets these amounts from nopcommerce and the plugin rounded them.

"amount": {
                "currency": "GBP",
                "total": "68.15",
                "details": {
                    "subtotal": "55.04",
                    "shipping": "9.99",
                    "tax": "3.13"
                }
            },

Could you try to purchase the same products for the same address and make a print screen the shopping cart page?
I would like to compare all values from PayPal and from the shopping cart page.
We have the difference 0.01 and I would like to see where did we get it.
Avatar

wize1

Avatar

Posted: 1 month ago

#13686 Quote

wize1

Posted: 1 month ago

#13686 Quote


Text from image:


You will be redirected to PayPal site to complete the order.

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
Please note: We reserve the right to limit glass packed products to 6 items per parcel, and any order which consist of only glass jars will be cancelled.
Image  Product(s)  Price  Qty.  Total
Picture of Baltasis Pyragas Jone Rye Bread 800g  Baltasis Pyragas Jone Rye Bread 800g  £2.69  4  £10.76
Picture of Bagels "Sushki Malutka S Glazuriu" 180g  Bagels "Sushki Malutka S Glazuriu" 180g  £1.79  5  £8.95
Picture of Bagels "Sushki Malutka S Makom" 180g  Bagels "Sushki Malutka S Makom" 180g  £1.59  3  £4.77
Picture of Oatmeal Cookies With Pumpkin Seeds 500g  Oatmeal Cookies With Pumpkin Seeds 500g  £3.19  2  £6.38
Picture of Oats Biscuits 400g  Oats Biscuits 400g  £2.89  1  £2.89
Picture of Prianiki "Vanilla" 400g  Prianiki "Vanilla" 400g  £1.89  1  £1.89
Picture of Prianiki "Miatnye" 400g  Prianiki "Miatnye" 400g  £1.89  1  £1.89
Picture of Chocolate" Inspiration", 100g  Chocolate" Inspiration", 100g  £3.39  2  £6.78
Picture of Truffles KO 200g  Truffles KO 200g  £4.69  1  £4.69
Picture of Mario Small Bagels with Poppy Seeds 250g  Mario Small Bagels with Poppy Seeds 250g  £1.79  4  £7.16
Sub-Total:  £56.16
Shipping: (After leaving our premises - 1 to 2 Business Days)  £11.99
Total:  £68.15
You will earn:  2 points



Full lntent Log:

[code]
2025.06.20 15:26:04:3398*******
GetApprovalUrl
2025.06.20 15:26:05:1155*******
PayPalService. CreatePayment. step 2
2025.06.20 15:26:05:2964*******
PayPalService. GetAmountDetails. paymentRequest.OrderTotal=68.15, taxTotal=3.13, shippingTotal=9.99
2025.06.20 15:26:05:3003*******
PayPalService. CreatePayment. step 3
2025.06.20 15:26:05:3018*******
PayPalService. CreatePayment. step 4
2025.06.20 15:26:05:3036*******
PayPalService. CreatePayment. payment.json={"intent":"sale","payer":{"payment_method":"paypal","payer_info":{"email":"***@gmail.com","first_name":"Leo","last_name":"***","billing_address":{"phone":"***","line1":"***","city":"***","country_code":"GB","postal_code":"***"},"shipping_address":{"recipient_name":"Leo ***","phone":"***","line1":"***","city":"***","country_code":"GB","postal_code":"***"}}},"transactions":[{"amount":{"currency":"GBP","total":"68.15","details":{"subtotal":"55.04","shipping":"9.99","tax":"3.13"}},"description":"***","custom":"28665b81-8b76-4607-b244-f2b66df4c308","invoice_number":"28665b81-8b76-4607-b244-f2b66df4c308","item_list":{"items":[{"quantity":"4","name":"Baltasis Pyragas Jone Rye Bread 800g","price":"2.69","currency":"GBP"},{"quantity":"5","name":"Bagels \"Sushki Malutka S Glazuriu\" 180g","price":"1.79","currency":"GBP"},{"quantity":"4","name":"Mario Small Bagels with Poppy Seeds 250g","price":"1.79","currency":"GBP"},{"quantity":"3","name":"Bagels \"Sushki Malutka S Makom\" 180g","price":"1.59","currency":"GBP"},{"quantity":"2","name":"Oatmeal Cookies With Pumpkin Seeds 500g","price":"3.19","currency":"GBP"},{"quantity":"1","name":"Oats Biscuits 400g","price":"2.89","currency":"GBP"},{"quantity":"1","name":"Prianiki \"Vanilla\" 400g","price":"1.89","currency":"GBP"},{"quantity":"1","name":"Prianiki \"Miatnye\" 400g","price":"1.89","currency":"GBP"},{"quantity":"2","name":"Chocolate\" Inspiration\", 100g","price":"2.83","currency":"GBP"},{"quantity":"1","name":"Truffles KO 200g","price":"4.69","currency":"GBP"}],"shipping_address":{"recipient_name":"Leo ***","phone":"***","line1":"***","city":"***","country_code":"GB","postal_code":"***"}}}],"experience_profile_id":"XP-***-9HPS","redirect_urls":{"return_url":"https://***.uk/paymentpaypalstandardpro/confirmorder","cancel_url":"https://babushkadeli.uk/paymentpaypalstandardpro/cancelorder"}}
2025.06.20 15:26:05:5935**
Avatar

wize1

Avatar

Posted: 1 month ago

#13687 Quote

wize1

Posted: 1 month ago

#13687 Quote
The shipping has 20% tax and Chocolate "Inspiration" is also has 20% tax... rest of the items has 0% tax.
Avatar

Support

Avatar

Posted: 1 month ago

#13688 Quote

Support

Posted: 1 month ago

#13688 Quote
Open the plugin configure page and enable "Don't send order items". It could help you. When you enabled it the plugin will not send order items to PayPal and send only order total values.
If we want to send order items we should upload prices without TAX and PayPal will calculate TAX itself.

Powered by nopCommerce

Copyright © 2025 FoxNetSoft. All rights reserved