Announcement

Collapse
No announcement yet.

Saving Order Applies Double Discount

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Saving Order Applies Double Discount

    When using the /3dCartWebAPI/v1/Orders endpoint an order that contains a Discount or promotional code will get doubled on an update (PUT).

    I think it's because the OrderDiscount field is already populated with the discount from the promotion and then anything in the PromotionList is added to the existing order discount on a PUT.

    For example, I have an order for $150 and a 10% discount promotion on.

    The order I GET is like:
    {
    OrderID: 12345,
    ...
    PromotionList: [
    PromotionName: "10 % Off",
    Coupon: "10off",
    DiscountAmount: 15
    ],
    OrderDiscount: 15,
    OrderAmount: 135
    }

    If I take that order and send a PUT request with it in the body (without changing anything), the DiscountAmount is doubled to $30 and the OrderAmount is $120 - effectively doubling my discounts.

    Thanks,
    Matt
Working...
X