Error when trying to checkout elasticpath promotion code

I am getting this error when trying to checkout a promotion code using Elastic Path formally known as Moltin:

detail: "Line item discount for Simple Calculation Method is unsupported"
status: 400
title: "Line Level Discount Unsupported"

The promotion code as been created and also assigned to the promotion id. The promotion is also active.

Here is a example of my active promotion:

{
    "data": {
        "type": "promotion",
        "id": "ffd18442-43e1-4b4d-a72d-f5a7b096ccda",
        "name": "BREAST CANCER MONTH",
        "description": "BREAST CANCER MONTH",
        "enabled": true,
        "promotion_type": "item_percent_discount",
        "schema": {
            "targets": [
                "OXYGEN_GLOW_CLEAN",
                "OXYGEN_GLOW_CREAM",
                "OXYGEN_GLOW_EYES",
                "OXYGEN_GLOW_MASK",
                "TOPIALYSE_BAUME_LAVANT_200ML",
                "TOPIALYSE_BAUME_LAVANT_400ML",
                "TOPIALYSE_GEL_LAVANT"
            ],
            "percent": 10
        },
        "start": "2020-10-01T00:00:00Z",
        "end": "2020-10-31T00:00:00Z",
        "meta": {
            "timestamps": {
                "created_at": "2020-10-17T09:30:23.066251874Z",
                "updated_at": "2020-10-17T09:30:23.066251914Z"
            }
        }
    }
}

and here is the response I get why trying to get codes my promotion id:

{
    "data": [
        {
            "code": "BreastCancer"
        }
    ],
    "links": {
        "current": "https://api.moltin.com/v2/promotions/8960732b-824d-46b4-ba01-ab588e15ad97/codes?page[offset]=0&page[limit]=100",
        "first": "https://api.moltin.com/v2/promotions/8960732b-824d-46b4-ba01-ab588e15ad97/codes?page[offset]=0&page[limit]=100",
        "last": "https://api.moltin.com/v2/promotions/8960732b-824d-46b4-ba01-ab588e15ad97/codes?page[offset]=0&page[limit]=100",
        "prev": "https://api.moltin.com/v2/promotions/8960732b-824d-46b4-ba01-ab588e15ad97/codes?page[offset]=0&page[limit]=100",
        "next": "https://api.moltin.com/v2/promotions/8960732b-824d-46b4-ba01-ab588e15ad97/codes?page[offset]=0&page[limit]=100"
    },
    "meta": {
        "page": {
            "limit": 100,
            "offset": 0,
            "current": 1,
            "total": 1
        },
        "results": {
            "total": 1
        }
    }
}

so it seems the creation worked ...

Here is the payload I am sending to checkout the promotion:

"data": {
  code: "BreastCancer"
  type: "promotion_item"
 }

Not sure what I am doing wrong here, and was not able to find anything online regarding this issue.



Read more here: https://stackoverflow.com/questions/64401110/error-when-trying-to-checkout-elasticpath-promotion-code

Content Attribution

This content was originally published by Kruger at Recent Questions - Stack Overflow, and is syndicated here via their RSS feed. You can read the original post over there.

%d bloggers like this: