Applying a price override

Learn how to apply a price override to a cart.

Applying a unit price override

You can apply a unit price override to one product with an encrypted request body. The following example shows an unencrypted request as a reference.

curl --location --request POST 'https://api.digitalriver.com/v1/shoppers/me/carts/active' \
--header 'authorization: Basic ***\
...
--data-raw '{
  "cart": {
    "lineItems": {
      "lineItem": {
        "quantity": "2",
        "product": {
          "id": "1234"
        },
        "pricing": {
          "salePrice": {
            "currency": "USD",
            "value": 3.33
          }
        }
      }
    }
  }
}'

Applying a tax-inclusive price override

The tax-inclusive override (TaxInclusiveOverride) will only override the price for the current cart or order. It won't override the original price list tax inclusive or exclusive setting. For example:

  1. The original tax-inclusive price list setting is 100 USD.

  2. Override the original price list setting by creating a cart that overrides the original price list setting with a tax-exclusive price of 80 USD.

  3. Create a new cart without a price override. The price will return to the original tax-inclusive price list setting of 100 USD.

The TaxInclusiveOverride flag only works with a price override. Use POST v1/shoppers/me/carts/active request to change the TaxInclusiveOverride flag (not encrypted), then send a POST request to do a price override (encrypted).

curl --location --request POST 'https://api.digitalriver.com/v1/shoppers/me/carts/active' \
--header 'authorization: Basic ***\
...
--data-raw '{
  "cart": {
    "customAttributes": {
      "attribute": [
        {
          "name": "TaxInclusiveOverride",
          "type": "Boolean",
          "value": true
        }
      ]
    }
  }
}'

Applying a line item price override

Override the aggregate price of one product with an encrypted request body. The following example shows an unencrypted request as a reference.

curl --location --request POST 'https://api.digitalriver.com./v1/shoppers/me/carts/active' \
--header 'authorization: Basic ***\
...
--data-raw '{
  "cart": {
    "lineItems": {
      "lineItem": {
        "quantity": "2",
        "product": {
          "id": "1234"
        },
        "pricing": {
          "itemPrice": {
            "currency": "USD",
            "value": 6.66
          }
        }
      }
    }
  }
}'

Last updated