Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6239557
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T11:24:45+00:00 2026-05-24T11:24:45+00:00

Have an ecommerce site running ZNode. We send tax, shipping, order total, etc. Everything

  • 0

Have an ecommerce site running ZNode. We send tax, shipping, order total, etc. Everything works fine until an order level discount is applied (say 50%). We get a response from PayPal that says the following:

The totals of the cart item amounts do not match order amounts.

I’m traversing the API, and I can’t find anything to apply an order level discount. FWIW, the user is applying discount codes on our site, and then is being transferred to PayPal.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T11:24:46+00:00Added an answer on May 24, 2026 at 11:24 am

    I think your problem is not the PayPal API.
    You checked that everything works perfect with your parameters passed to paypal in this 50% discount case?

    After the PayPal Documentation you should provide a negative value to reflect a discount on an order. So everything adds up to the total amount.

    Source: https://cms.paypal.com/us/cgi-bin/?cmd=_render-content&content_ID=developer/e_howto_api_ECCustomizing

    enter image description here

    Update with code: (by Nick)

    I have a paypal service that does all kinds of stuff, but the following code should give you an idea of how the discount works. The discount is not a special type, it’s a product just like any other except it’s disguised by naming it like a discount and setting it’s price to a negative number.

                List<PaymentDetailsItemType> items = paymentDetails.PaymentDetailsItem;
    
            foreach (ShoppingCartItem item in cart.ShoppingCartItems)
            {
                items.Add(new PaymentDetailsItemType
                              {
                                  Name = item.Book.Title,
                                  Quantity = item.Quantity,
                                  Number = item.BookId.ToString(),
                                  Amount =
                                      new BasicAmountType
                                          {currencyID = CurrencyCodeType.USD, 
                                           value = (item.Book.Price).To2Places()}
                              });
            }
            if (cartTotals.Discount > 0)
            {
                items.Add(new PaymentDetailsItemType
                              {
                                  Name = "Promo Code Discount",
                                  Quantity = 1,
                                  Number = "PromoCode",
                                  Amount =
                                      new BasicAmountType
                                          {
                                              currencyID = CurrencyCodeType.USD,
                                              value = (cartTotals.Discount*-1).To2Places()
                                          }
                              });
            }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Lets say I have a simple ecommerce site that sells 100 different t-shirt designs.
We have to develop an Ecommerce site with 20+ pages of static content which
I have a datastore model representing items in an ecommerce site: class Item(db.Model): CSIN
I have a table row with 4 columns on my ecommerce site and I
I have an ecommerce website that works in a classical way: people sign up,
I have a simple ecommerce type site that will have users with accounts, orders,
I have an ecommerce site built on OpenCart (1.5.0 i believe), which after inserting
Hello again dearest Experts, I have an ecommerce site at http://www.millenniumhealthproducts.com The site was
I have an ecommerce site that has about 8 CSS files linked from the
I have an ecommerce site which currently has product URLs like this: http://www.mydomain.com/nike-tshirt/Large http://www.mydomain.com/nike-tshirt/Medium

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.