[Skip to main content](#vessel-content)

#   Applying a discount on the shipping option leads to a Paypal error

##

- **[hlarocque](/forum/user/57562-hlarocque "View hlarocque's Profile")**
- [![hlarocque's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/57562-hlarocque "View hlarocque's Profile") Topic Author
- [ Offline](/forum/user/57562-hlarocque)

Less More

- Posts: 31
- Thank you received: 0
-
-

6 years 5 months ago [\#320272](#320272) by [hlarocque](/forum/user/57562-hlarocque "View hlarocque's Profile")  *[Applying a discount on the shipping option leads to a Paypal error](/forum/28-shipping-methods/900078-applying-a-discount-on-the-shipping-option-leads-to-a-paypal-error#320272 "-- HikaShop version -- : 4.3.0 -- Joomla version -- : 3.9.19 -- PHP version -- : 7.3.18 -- Browser(s) name and version -- : Firefox lastest -- Error-message(debug-mod must be tuned on) -- :   www.paypal.com/webapps/shoppingcart/erro...861947&#95;20a327941b4cf  Hi! I offer several shipping method to my customer including one where the customer can pick up the merchandise at our store. This option offer a rebate of 10% on his order. The mecanism works on the website but as soon as the user click to go to Paypal, there is an error in the url :   www.paypal.com/webapps/shoppingcart/erro...861947&#95;20a327941b4cf  I tried with two different plugins for manual shipping but both failed (including the manual shipping plugin provided by Hikashop). As soon as I remove the discount, everything works fine. Is there a better way to offer discount on shipping method ? thank you")* was created by *[hlarocque](/forum/user/57562-hlarocque "View hlarocque's Profile")*

-- HikaShop version -- : 4.3.0
-- Joomla version -- : 3.9.19
-- PHP version -- : 7.3.18
-- Browser(s) name and version -- : Firefox lastest
-- Error-message(debug-mod must be tuned on) -- : [ www.paypal.com/webapps/shoppingcart/erro...861947\_20a327941b4cf](https://www.paypal.com/webapps/shoppingcart/error?flowlogging_id=20a327941b4cf&code=AMOUNT_ERROR&mfid=1591295861947_20a327941b4cf)

Hi! I offer several shipping method to my customer including one where the customer can pick up the merchandise at our store. This option offer a rebate of 10% on his order. The mecanism works on the website but as soon as the user click to go to Paypal, there is an error in the url :
[ www.paypal.com/webapps/shoppingcart/erro...861947\_20a327941b4cf](https://www.paypal.com/webapps/shoppingcart/error?flowlogging_id=20a327941b4cf&code=AMOUNT_ERROR&mfid=1591295861947_20a327941b4cf)
I tried with two different plugins for manual shipping but both failed (including the manual shipping plugin provided by Hikashop). As soon as I remove the discount, everything works fine. Is there a better way to offer discount on shipping method ? thank you

- [ ![shipping&#95;method&#95;discount&#95;error.jpg](/forum/attachment/49617) ](/forum/attachment/49617 "...ount&#95;error.jpg") [ ](/forum/attachment/49617?download=1 "...ount&#95;error.jpg")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI4LXNoaXBwaW5nLW1ldGhvZHMvOTAwMDc4LWFwcGx5aW5nLWEtZGlzY291bnQtb24tdGhlLXNoaXBwaW5nLW9wdGlvbi1sZWFkcy10by1hLXBheXBhbC1lcnJvcj90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[Philip](/forum/user/34318-philip "View Philip's Profile")**
- [![Philip's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar34318_2015-11-18-2.png)](/forum/user/34318-philip "View Philip's Profile")
- [ Offline](/forum/user/34318-philip)

Less More

- Posts: 4820
- Thank you received: 652
-
-

6 years 5 months ago -  6 years 5 months ago [\#320285](#320285) by [Philip](/forum/user/34318-philip "View Philip's Profile")  Replied by *[Philip](/forum/user/34318-philip "View Philip's Profile")* on topic *[Applying a discount on the shipping option leads to a Paypal error](/forum/28-shipping-methods/900078-applying-a-discount-on-the-shipping-option-leads-to-a-paypal-error#320285 "-- HikaShop version -- : 4.3.0 -- Joomla version -- : 3.9.19 -- PHP version -- : 7.3.18 -- Browser(s) name and version -- : Firefox lastest -- Error-message(debug-mod must be tuned on) -- :   www.paypal.com/webapps/shoppingcart/erro...861947&#95;20a327941b4cf  Hi! I offer several shipping method to my customer including one where the customer can pick up the merchandise at our store. This option offer a rebate of 10% on his order. The mecanism works on the website but as soon as the user click to go to Paypal, there is an error in the url :   www.paypal.com/webapps/shoppingcart/erro...861947&#95;20a327941b4cf  I tried with two different plugins for manual shipping but both failed (including the manual shipping plugin provided by Hikashop). As soon as I remove the discount, everything works fine. Is there a better way to offer discount on shipping method ? thank you")*

Hello,

Just a guess, but maybe there is something you can try, try to proceed your checkout step by step, I mean by example :
**1.** Checkout page login,Cart, Address **AND** Shipping method
**2.** Cart **AND** payment
**3.** Final page &amp; cart agreement and confirm button

My guess is that currently all is proceed at the same time and leads to have a wrong amount, but difficult to say more without more test.
Hope this will help us to progress on your subject
Regards

Last edit: 6 years 5 months ago by [Philip](/forum/user/34318-philip "View Philip's Profile").

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI4LXNoaXBwaW5nLW1ldGhvZHMvOTAwMDc4LWFwcGx5aW5nLWEtZGlzY291bnQtb24tdGhlLXNoaXBwaW5nLW9wdGlvbi1sZWFkcy10by1hLXBheXBhbC1lcnJvcj90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[hlarocque](/forum/user/57562-hlarocque "View hlarocque's Profile")**
- [![hlarocque's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/57562-hlarocque "View hlarocque's Profile") Topic Author
- [ Offline](/forum/user/57562-hlarocque)

Less More

- Posts: 31
- Thank you received: 0
-
-

6 years 5 months ago [\#320315](#320315) by [hlarocque](/forum/user/57562-hlarocque "View hlarocque's Profile")  Replied by *[hlarocque](/forum/user/57562-hlarocque "View hlarocque's Profile")* on topic *[Applying a discount on the shipping option leads to a Paypal error](/forum/28-shipping-methods/900078-applying-a-discount-on-the-shipping-option-leads-to-a-paypal-error#320315 "-- HikaShop version -- : 4.3.0 -- Joomla version -- : 3.9.19 -- PHP version -- : 7.3.18 -- Browser(s) name and version -- : Firefox lastest -- Error-message(debug-mod must be tuned on) -- :   www.paypal.com/webapps/shoppingcart/erro...861947&#95;20a327941b4cf  Hi! I offer several shipping method to my customer including one where the customer can pick up the merchandise at our store. This option offer a rebate of 10% on his order. The mecanism works on the website but as soon as the user click to go to Paypal, there is an error in the url :   www.paypal.com/webapps/shoppingcart/erro...861947&#95;20a327941b4cf  I tried with two different plugins for manual shipping but both failed (including the manual shipping plugin provided by Hikashop). As soon as I remove the discount, everything works fine. Is there a better way to offer discount on shipping method ? thank you")*

This is exacly how I proceed. For checking out, there is several steps actually.
1. add item to cart (product page)
2. access to checkout (icon in the top page presenting a dropdown with checkout info)
3. add personal info including address (checkout - page 1)
4. confirm if everything is ok so far (checkout - page 2)
5. present shipping options (default is the cheaper but not the pick up one) including pick up (checkout (page 3)
6. suppose I changed the shipping for pickup, the shopping cart is recalculated (same page)
7. chose payment (same page)
8. agree condition (same page)
9. go to payment (same page)

Is it what you said?

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI4LXNoaXBwaW5nLW1ldGhvZHMvOTAwMDc4LWFwcGx5aW5nLWEtZGlzY291bnQtb24tdGhlLXNoaXBwaW5nLW9wdGlvbi1sZWFkcy10by1hLXBheXBhbC1lcnJvcj90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[Philip](/forum/user/34318-philip "View Philip's Profile")**
- [![Philip's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar34318_2015-11-18-2.png)](/forum/user/34318-philip "View Philip's Profile")
- [ Offline](/forum/user/34318-philip)

Less More

- Posts: 4820
- Thank you received: 652
-
-

6 years 5 months ago -  6 years 5 months ago [\#320322](#320322) by [Philip](/forum/user/34318-philip "View Philip's Profile")  Replied by *[Philip](/forum/user/34318-philip "View Philip's Profile")* on topic *[Applying a discount on the shipping option leads to a Paypal error](/forum/28-shipping-methods/900078-applying-a-discount-on-the-shipping-option-leads-to-a-paypal-error#320322 "-- HikaShop version -- : 4.3.0 -- Joomla version -- : 3.9.19 -- PHP version -- : 7.3.18 -- Browser(s) name and version -- : Firefox lastest -- Error-message(debug-mod must be tuned on) -- :   www.paypal.com/webapps/shoppingcart/erro...861947&#95;20a327941b4cf  Hi! I offer several shipping method to my customer including one where the customer can pick up the merchandise at our store. This option offer a rebate of 10% on his order. The mecanism works on the website but as soon as the user click to go to Paypal, there is an error in the url :   www.paypal.com/webapps/shoppingcart/erro...861947&#95;20a327941b4cf  I tried with two different plugins for manual shipping but both failed (including the manual shipping plugin provided by Hikashop). As soon as I remove the discount, everything works fine. Is there a better way to offer discount on shipping method ? thank you")*

Hello,

Yes, what we have in mind, the most important point is to select shipping method on a separate page from payment selection, and the best is to have the payment method at the end with a non-editable cart just before the finish button.

If you have done this, can you provide these following elements :
- An **Url link** with all required to be able to reach the checkout process
- Relative **screenshot configuration** (payment method &amp; shipping method.
- Any elements that can help us to better understand the context.

**Note :** You can use our [ **Contact us**](https://www.hikashop.com/support/contact-us.html) form to provide secret references, don't forget to add to your message an **Url to this topic**.
Regards

Last edit: 6 years 5 months ago by [Philip](/forum/user/34318-philip "View Philip's Profile").

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI4LXNoaXBwaW5nLW1ldGhvZHMvOTAwMDc4LWFwcGx5aW5nLWEtZGlzY291bnQtb24tdGhlLXNoaXBwaW5nLW9wdGlvbi1sZWFkcy10by1hLXBheXBhbC1lcnJvcj90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[brainforge](/forum/user/423-brainforge "View brainforge's Profile")**
- [![brainforge's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar423.jpg)](/forum/user/423-brainforge "View brainforge's Profile")
- [ Offline](/forum/user/423-brainforge)

Less More

- Posts: 298
- Thank you received: 5
-
-
-
- [](https://brainforge.co.uk)
-

6 years 3 months ago [\#322213](#322213) by [brainforge](/forum/user/423-brainforge "View brainforge's Profile")  Replied by *[brainforge](/forum/user/423-brainforge "View brainforge's Profile")* on topic *[Applying a discount on the shipping option leads to a Paypal error](/forum/28-shipping-methods/900078-applying-a-discount-on-the-shipping-option-leads-to-a-paypal-error#322213 "-- HikaShop version -- : 4.3.0 -- Joomla version -- : 3.9.19 -- PHP version -- : 7.3.18 -- Browser(s) name and version -- : Firefox lastest -- Error-message(debug-mod must be tuned on) -- :   www.paypal.com/webapps/shoppingcart/erro...861947&#95;20a327941b4cf  Hi! I offer several shipping method to my customer including one where the customer can pick up the merchandise at our store. This option offer a rebate of 10% on his order. The mecanism works on the website but as soon as the user click to go to Paypal, there is an error in the url :   www.paypal.com/webapps/shoppingcart/erro...861947&#95;20a327941b4cf  I tried with two different plugins for manual shipping but both failed (including the manual shipping plugin provided by Hikashop). As soon as I remove the discount, everything works fine. Is there a better way to offer discount on shipping method ? thank you")*

Encountering similar situation with the PayPal shipping plugin.

Multiple shipping methods mix of fixed price or percentage of product price.

All work fine except for one which offers a 10% discount on the product price.
So total product price of order, say, $25.90 then shipping price in checkout shows as $-2.59, great.
Tax also appears to be adjusted correctly, so all set to go.

In paypal payment method have the **Send details of the order** option set to NO.
At end of checkout redirect to PayPal correctly.

In paypal payment method change the **Send details of the order** option to YES.
At end of checkout redirect to PayPal and get this error.

[ Paypal Error](https://www.paypal.com/webapps/shoppingcart/error?flowlogging_id=20a327941b4cf&code=AMOUNT_ERROR&mfid=1591295861947_20a327941b4cf) - Found description of that error here [ Paypal Error Description](https://docs.easydigitaldownloads.com/article/2030-paypal-error-things-dont-appear-to-be-working-at-the-moment)

Looks to me like PayPal does not like negative prices for order items - the shipping price is passed to PayPal as an order item.

Solution looks easy enough - if the shipping price is negative don't pass it to PayPal but add to the **discount\_amount\_cart** value which is passed to PayPal. Know of any reason why that would not work?

Could this change be made to paypal.php - or would it be better to create our own branch?
Other issues to consider - in theory a discount could even apply to selected payment methods!
What happens after all discounts applied the total order value is negative :evil: ?

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI4LXNoaXBwaW5nLW1ldGhvZHMvOTAwMDc4LWFwcGx5aW5nLWEtZGlzY291bnQtb24tdGhlLXNoaXBwaW5nLW9wdGlvbi1sZWFkcy10by1hLXBheXBhbC1lcnJvcj90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86358
- Thank you received: 14293
-
-

6 years 3 months ago [\#322245](#322245) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Applying a discount on the shipping option leads to a Paypal error](/forum/28-shipping-methods/900078-applying-a-discount-on-the-shipping-option-leads-to-a-paypal-error#322245 "-- HikaShop version -- : 4.3.0 -- Joomla version -- : 3.9.19 -- PHP version -- : 7.3.18 -- Browser(s) name and version -- : Firefox lastest -- Error-message(debug-mod must be tuned on) -- :   www.paypal.com/webapps/shoppingcart/erro...861947&#95;20a327941b4cf  Hi! I offer several shipping method to my customer including one where the customer can pick up the merchandise at our store. This option offer a rebate of 10% on his order. The mecanism works on the website but as soon as the user click to go to Paypal, there is an error in the url :   www.paypal.com/webapps/shoppingcart/erro...861947&#95;20a327941b4cf  I tried with two different plugins for manual shipping but both failed (including the manual shipping plugin provided by Hikashop). As soon as I remove the discount, everything works fine. Is there a better way to offer discount on shipping method ? thank you")*

Hi,

Well, yes, PayPal doesn't support negative prices.
Usually, in such cases, I would recommend to just turn off the "send order details" setting of the PayPal payment method.

Using the discount_amount_cart field for the shipping fee when the shipping fee is negative is something that could be implemented.
But then, the customer would see "discount" instead of "shipping" for the shipping fee, and if he has a coupon, the amount of the coupon would be summed together with the amount of the shipping fee.
And then, you would have the same query for payment fees, product prices (which can also be negative).
It looks like a hack of the API of PayPal. Ideally, it would be better that PayPal accept negative items as long as the total amount is positive. As that's not supported by PayPal I would recommend to just turn off the "send order details" option.

When the total order value is negative, HikaShop forces it to 0 when the cart is being loaded.
And when the total cart/order amount is 0, the payment method selector is removed from the checkout automatically and no call to the payment methods is done. At the end of the checkout the order will be created and if the "validate free order" plugin is activated, the order will be directly confirmed.
Most payment gateways don't accept transactions with a value of 0 or negative, so that's why we've done it like that as it wouldn't work otherwise.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI4LXNoaXBwaW5nLW1ldGhvZHMvOTAwMDc4LWFwcGx5aW5nLWEtZGlzY291bnQtb24tdGhlLXNoaXBwaW5nLW9wdGlvbi1sZWFkcy10by1hLXBheXBhbC1lcnJvcj90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[brainforge](/forum/user/423-brainforge "View brainforge's Profile")**
- [![brainforge's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar423.jpg)](/forum/user/423-brainforge "View brainforge's Profile")
- [ Offline](/forum/user/423-brainforge)

Less More

- Posts: 298
- Thank you received: 5
-
-
-
- [](https://brainforge.co.uk)
-

6 years 3 months ago [\#322276](#322276) by [brainforge](/forum/user/423-brainforge "View brainforge's Profile")  Replied by *[brainforge](/forum/user/423-brainforge "View brainforge's Profile")* on topic *[Applying a discount on the shipping option leads to a Paypal error](/forum/28-shipping-methods/900078-applying-a-discount-on-the-shipping-option-leads-to-a-paypal-error#322276 "-- HikaShop version -- : 4.3.0 -- Joomla version -- : 3.9.19 -- PHP version -- : 7.3.18 -- Browser(s) name and version -- : Firefox lastest -- Error-message(debug-mod must be tuned on) -- :   www.paypal.com/webapps/shoppingcart/erro...861947&#95;20a327941b4cf  Hi! I offer several shipping method to my customer including one where the customer can pick up the merchandise at our store. This option offer a rebate of 10% on his order. The mecanism works on the website but as soon as the user click to go to Paypal, there is an error in the url :   www.paypal.com/webapps/shoppingcart/erro...861947&#95;20a327941b4cf  I tried with two different plugins for manual shipping but both failed (including the manual shipping plugin provided by Hikashop). As soon as I remove the discount, everything works fine. Is there a better way to offer discount on shipping method ? thank you")*

I have passed this onto PayPal support.

*Hikashop's response to my suggested solution is reasonable - when using discount voouchers would cause more confusion!

Instead of the shop owner having to disable sending order details it would be more sensible if PayPal just accepted negative item prices ... the final total of the payment is the most important bit. Hiding the order details to get round the problem just reduces the customer's ability to check how the total arrived at (although they will have an email with that information). Negative item prices should not matter as long as the total is positive.*

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI4LXNoaXBwaW5nLW1ldGhvZHMvOTAwMDc4LWFwcGx5aW5nLWEtZGlzY291bnQtb24tdGhlLXNoaXBwaW5nLW9wdGlvbi1sZWFkcy10by1hLXBheXBhbC1lcnJvcj90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86358
- Thank you received: 14293
-
-

6 years 3 months ago [\#322300](#322300) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Applying a discount on the shipping option leads to a Paypal error](/forum/28-shipping-methods/900078-applying-a-discount-on-the-shipping-option-leads-to-a-paypal-error#322300 "-- HikaShop version -- : 4.3.0 -- Joomla version -- : 3.9.19 -- PHP version -- : 7.3.18 -- Browser(s) name and version -- : Firefox lastest -- Error-message(debug-mod must be tuned on) -- :   www.paypal.com/webapps/shoppingcart/erro...861947&#95;20a327941b4cf  Hi! I offer several shipping method to my customer including one where the customer can pick up the merchandise at our store. This option offer a rebate of 10% on his order. The mecanism works on the website but as soon as the user click to go to Paypal, there is an error in the url :   www.paypal.com/webapps/shoppingcart/erro...861947&#95;20a327941b4cf  I tried with two different plugins for manual shipping but both failed (including the manual shipping plugin provided by Hikashop). As soon as I remove the discount, everything works fine. Is there a better way to offer discount on shipping method ? thank you")*

Hi,

Thanks.
That's actually how Authorize.net works. You can give any price and quantities to the products in the order details to authorize.net. It will display them, but it will only take into account the main total amount you're giving it, even if the total of the items don't match. That way, it is a lot easier to handle such edge cases since the payment will always work with the correct amount.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI4LXNoaXBwaW5nLW1ldGhvZHMvOTAwMDc4LWFwcGx5aW5nLWEtZGlzY291bnQtb24tdGhlLXNoaXBwaW5nLW9wdGlvbi1sZWFkcy10by1hLXBheXBhbC1lcnJvcj90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

Board Categories HikaShop Install &amp; Update Product &amp; Category Display Content Creation Sales and Orders Orders management Reports &amp; Statistics Customers Checkout Payment Methods Shipping Methods Import &amp; Export (CSV, XLS…) Specific Features Affilation Taxes Wishlist Vote Carousel &amp; Slider Mass Actions Filters &amp; Search Discount &amp; Coupon Feature Request Integrations Showcase General Talk about HikaShop Development HikaShop 3.0 Beta Translation Commercial Jobs HikaShop Components HikaMarket Market: Feature requests Market: How to? Market: Bug Report HikaSerial General talk about HikaSerial Serial: Bug Report Serial: How to? Support en Français de HikaSerial (French Support) HikaSubscription HikaAuction Auction: Feature requests Auction: How to? Auction: Bug report Hikashop around the world Support en Français (French Support) Russian FAQ. Курс выживания с Hikashop. Частые вопросы и о Расширения Hikashop Наши сайты на Hikashop 日本語版サポート(Japanese Support) Thai German Archives Bug Report How to?

[](/forum/topics/feed/mode-topics?format=feed&type=rss)

Time to create page: 0.067 seconds

[Powered by](/forum/credits) [Kunena Forum](https://www.kunena.org)
