---
title: Create fixed-amount discount for entire pricing plans
slug: reference/create-fixed-amount-discount-for-entire-pricing-plans
docTags: 
createdAt: 2025-03-18T18:28:02.919Z
---

{
  "id": "7hYgD5OhRCxUN6hGVw2V5",
  "type": "api-oas-v2",
  "data": {
    "method": "POST",
    "url": "https://app.amberflo.io/payments/pricing/amberflo/account-pricing/promotions/unconditioned_absolute_plan_promotion",
    "servers": [
      {
        "url": "https://app.amberflo.io/payments/pricing/amberflo/account-pricing/promotions/unconditioned_absolute_plan_promotion"
      }
    ],
    "name": "Create fixed-amount discount for entire pricing plans",
    "description": "<p>Creates an unconditioned fixed-amount discount that applies to entire pricing plans.\nUse this for broad promotional campaigns that reduce costs across all plan services.</p>\n<p>Use this endpoint to:</p>\n<ul>\n<li>Apply blanket discounts across all products in a plan</li>\n<li>Create loyalty rewards for plan subscribers</li>\n<li>Implement general cost reductions for promotional periods</li>\n</ul>\n<p><strong>Important Note:</strong> Applies automatically to all customers on the plan without conditions.</p>",
    "contentType": "application/json",
    "request": {
      "pathParameters": [],
      "headerParameters": [],
      "queryParameters": [],
      "bodyDataParameters": [
        {
          "kind": "optional",
          "name": "body",
          "type": "object",
          "description": "Unconditional fixed-amount discount promotion applying to entire pricing plans without activation conditions or time constraints.",
          "customType": "payment.pricing.promotions.pre_created.AbsolutePlanPromotion.in",
          "schema": [
            {
              "name": "id",
              "kind": "required",
              "type": "string",
              "description": "Unique identifier for the promotion within the account.",
              "example": ""
            },
            {
              "name": "type",
              "kind": "optional",
              "type": "string",
              "description": "Fixed promotion type identifier for plan-level absolute discounts.",
              "example": "",
              "default": "unconditioned_absolute_plan_promotion"
            },
            {
              "name": "promotionName",
              "kind": "required",
              "type": "string",
              "description": "Human-readable name for promotion display and management purposes.",
              "example": ""
            },
            {
              "name": "description",
              "kind": "optional",
              "type": "string",
              "description": "Optional detailed description explaining promotion purpose and terms.",
              "example": ""
            },
            {
              "name": "lockingStatus",
              "kind": "optional",
              "type": "string",
              "description": "Controls modification permissions and lifecycle state of the promotion.",
              "modelRef": "#/components/schemas/common.LockingStatus.in",
              "customType": "common.LockingStatus.in",
              "schema": []
            },
            {
              "name": "targetPlanId",
              "kind": "optional",
              "type": "string",
              "description": "Identifier of the specific pricing plan receiving the discount.",
              "example": ""
            },
            {
              "name": "discount",
              "kind": "optional",
              "type": "number",
              "description": "Fixed monetary amount deducted from plan charges in account currency.",
              "example": ""
            },
            {
              "name": "promotionType",
              "kind": "optional",
              "type": "string",
              "description": "Classification of promotion behavior for system processing and reporting.",
              "modelRef": "#/components/schemas/payment.pricing.promotions.attributes.PromotionType.in",
              "customType": "payment.pricing.promotions.attributes.PromotionType.in",
              "schema": []
            }
          ],
          "modelRef": "#/components/schemas/payment.pricing.promotions.pre_created.AbsolutePlanPromotion.in",
          "isExpanded": true
        }
      ],
      "formDataParameters": [],
      "oAuthParameters": [
        {
          "id": "apiKey",
          "name": "X-API-KEY",
          "kind": "optional",
          "type": "apiKey",
          "in": "header"
        }
      ]
    },
    "responses": [
      {
        "statusCode": "200",
        "description": "Plan-level promotion created with fixed discount amount and coverage details",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "description": "Response containing unconditional fixed-amount discount promotion details applied to entire pricing plans.",
            "customType": "payment.pricing.promotions.pre_created.AbsolutePlanPromotion.out",
            "schema": [
              {
                "name": "id",
                "kind": "required",
                "type": "string",
                "description": "Unique identifier for the promotion within the account.",
                "example": ""
              },
              {
                "name": "type",
                "kind": "optional",
                "type": "string",
                "description": "Fixed promotion type identifier for plan-level absolute discounts.",
                "example": "",
                "default": "unconditioned_absolute_plan_promotion"
              },
              {
                "name": "promotionName",
                "kind": "required",
                "type": "string",
                "description": "Human-readable name for promotion display and management purposes.",
                "example": ""
              },
              {
                "name": "description",
                "kind": "optional",
                "type": "string",
                "description": "Optional detailed description explaining promotion purpose and terms.",
                "example": ""
              },
              {
                "name": "lockingStatus",
                "kind": "optional",
                "type": "string",
                "description": "Current modification permissions and lifecycle state of the promotion.",
                "modelRef": "#/components/schemas/common.LockingStatus.in",
                "customType": "common.LockingStatus.in",
                "schema": []
              },
              {
                "name": "lastUpdateTimeInMillis",
                "kind": "optional",
                "type": "integer<int64>",
                "description": "Unix timestamp in milliseconds when promotion was last modified.",
                "example": 0
              },
              {
                "name": "targetPlanId",
                "kind": "optional",
                "type": "string",
                "description": "Identifier of the specific pricing plan receiving the discount.",
                "example": ""
              },
              {
                "name": "discount",
                "kind": "optional",
                "type": "number",
                "description": "Fixed monetary amount deducted from plan charges in account currency.",
                "example": ""
              },
              {
                "name": "promotionType",
                "kind": "optional",
                "type": "string",
                "description": "Classification of promotion behavior for system processing and reporting.",
                "modelRef": "#/components/schemas/payment.pricing.promotions.attributes.PromotionType.in",
                "customType": "payment.pricing.promotions.attributes.PromotionType.in",
                "schema": []
              }
            ],
            "modelRef": "#/components/schemas/payment.pricing.promotions.pre_created.AbsolutePlanPromotion.out",
            "isExpanded": true
          }
        ]
      },
      {
        "statusCode": "400",
        "description": "Invalid discount amount or pricing plan configuration parameters",
        "jsonExample": "",
        "isExpanded": true
      },
      {
        "statusCode": "401",
        "description": "Authentication required or invalid API key provided",
        "jsonExample": "",
        "isExpanded": true
      },
      {
        "statusCode": "500",
        "description": "Internal server error occurred while creating plan promotion",
        "jsonExample": "",
        "isExpanded": true
      }
    ],
    "hasXCodeSamples": false,
    "examples": {
      "languages": [
        {
          "id": "NivmdoTdpNn_eb8RUXjge",
          "language": "curl",
          "label": "cURL",
          "code": "curl --request POST \\\n     --url https://app.amberflo.io/payments/pricing/amberflo/account-pricing/promotions/unconditioned_absolute_plan_promotion \\\n     --header 'accept: application/json' \\\n     --header 'content-type: application/json' \\\n     --data '{\n     \"id\": \"\",\n     \"type\": \"unconditioned_absolute_plan_promotion\",\n     \"promotionName\": \"\"\n     }'"
        },
        {
          "id": "rf1FdwZZjS9D366heCFtE",
          "language": "javascript",
          "label": "javascript",
          "code": "var myHeaders = new Headers();\nmyHeaders.append(\"accept\", \"application/json\");\nmyHeaders.append(\"content-type\", \"application/json\");\n\nvar raw = JSON.stringify({\n   \"id\": \"\",\n   \"type\": \"unconditioned_absolute_plan_promotion\",\n   \"promotionName\": \"\"\n});\n\nvar requestOptions = {\n   method: 'POST',\n   headers: myHeaders,\n   body: raw,\n   redirect: 'follow'\n};\n\nfetch(\"https://app.amberflo.io/payments/pricing/amberflo/account-pricing/promotions/unconditioned_absolute_plan_promotion\", requestOptions)\n   .then(response => response.text())\n   .then(result => console.log(result))\n   .catch(error => console.log('error', error));"
        },
        {
          "id": "j8B3cLmfU4E4As9QZ1UlE",
          "language": "ruby",
          "label": "Ruby",
          "code": "require \"uri\"\nrequire \"json\"\nrequire \"net/http\"\n\nurl = URI(\"https://app.amberflo.io/payments/pricing/amberflo/account-pricing/promotions/unconditioned_absolute_plan_promotion\")\n\nhttps = Net::HTTP.new(url.host, url.port)\nhttps.use_ssl = true\n\nrequest = Net::HTTP::Post.new(url)\nrequest[\"accept\"] = \"application/json\"\nrequest[\"content-type\"] = \"application/json\"\nrequest.body = JSON.dump({\n   \"id\": \"\",\n   \"type\": \"unconditioned_absolute_plan_promotion\",\n   \"promotionName\": \"\"\n})\n\nresponse = https.request(request)\nputs response.read_body\n"
        },
        {
          "id": "Dm6_vZFzG3OuMVd2OKHUc",
          "language": "python",
          "label": "Python",
          "code": "import requests\nimport json\n\nurl = \"https://app.amberflo.io/payments/pricing/amberflo/account-pricing/promotions/unconditioned_absolute_plan_promotion\"\n\npayload = json.dumps({\n   \"id\": \"\",\n   \"type\": \"unconditioned_absolute_plan_promotion\",\n   \"promotionName\": \"\"\n})\nheaders = {\n   'accept': 'application/json',\n   'content-type': 'application/json'\n}\n\nresponse = requests.request(\"POST\", url, headers=headers, data=payload)\n\nprint(response.text)\n"
        }
      ],
      "selectedLanguageId": "NivmdoTdpNn_eb8RUXjge"
    },
    "results": {
      "languages": [
        {
          "id": "response-0-200",
          "language": "200",
          "code": "// Plan-level promotion created with fixed discount amount and coverage details\n{\n  \"id\": \"\",\n  \"type\": \"\",\n  \"promotionName\": \"\",\n  \"description\": \"\",\n  \"lockingStatus\": \"\",\n  \"lastUpdateTimeInMillis\": \"\",\n  \"targetPlanId\": \"\",\n  \"discount\": 0,\n  \"promotionType\": \"\"\n}"
        },
        {
          "id": "response-1-400",
          "language": "400",
          "code": "// Invalid discount amount or pricing plan configuration parameters\n"
        },
        {
          "id": "response-2-401",
          "language": "401",
          "code": "// Authentication required or invalid API key provided\n"
        },
        {
          "id": "response-3-500",
          "language": "500",
          "code": "// Internal server error occurred while creating plan promotion\n"
        }
      ],
      "selectedLanguageId": "response-0-200"
    }
  },
  "children": [
    {
      "text": ""
    }
  ]
}