---
title: Duplicate Payment Rule
slug: duplicate-payment-rule
docTags: 
createdAt: 2026-08-25T19:28:59.170Z
---

{
  "id": "uRG-9yd2CKtuRR7Ss4yM6",
  "type": "api-oas-v2",
  "data": {
    "method": "POST",
    "url": "https://api.nue.io/billing/payment-rules/{id}:duplicate",
    "servers": [
      {
        "url": "https://api.nue.io/billing/payment-rules/{id}:duplicate",
        "description": "Nue Production API Endpoint"
      },
      {
        "url": "https://api.sandbox.nue.io/billing/payment-rules/{id}:duplicate",
        "description": "Nue Sandbox API Endpoint"
      }
    ],
    "name": "Duplicate Payment Rule",
    "description": "Duplicate a payment rule.",
    "contentType": "application/json",
    "request": {
      "pathParameters": [
        {
          "kind": "required",
          "name": "id",
          "type": "string<uuid>",
          "description": "The payment rule ID",
          "format": "uuid"
        }
      ],
      "headerParameters": [
        {
          "name": "accept",
          "type": "string",
          "kind": "optional",
          "description": "Generated from available response content types",
          "enum": [
            "*/*",
            "application/json"
          ],
          "default": "*/*"
        }
      ],
      "queryParameters": [],
      "bodyDataParameters": [],
      "formDataParameters": [],
      "oAuthParameters": [
        {
          "id": "apiKeyAuth",
          "name": "nue-api-key",
          "kind": "optional",
          "type": "apiKey",
          "in": "header"
        }
      ],
      "cookieParameters": []
    },
    "responses": [
      {
        "statusCode": "201",
        "description": "Created",
        "jsonExample": "",
        "isExpanded": true
      },
      {
        "statusCode": "400",
        "description": "Bad Request",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "description": "",
            "schema": [
              {
                "name": "title",
                "kind": "optional",
                "type": "string",
                "description": ""
              },
              {
                "name": "message",
                "kind": "optional",
                "type": "string",
                "description": ""
              },
              {
                "name": "errorCode",
                "kind": "optional",
                "type": "string",
                "description": ""
              }
            ],
            "isExpanded": true
          }
        ]
      },
      {
        "statusCode": "404",
        "description": "Not Found",
        "jsonExample": "",
        "isExpanded": true
      }
    ],
    "hasXCodeSamples": false,
    "examples": {
      "languages": [
        {
          "id": "F7t4LnLoI4A6o10GltKH3",
          "language": "curl",
          "label": "cURL",
          "code": "curl --request POST \\\n     --url https://api.nue.io/billing/payment-rules/{id}:duplicate \\\n     --header 'accept: */*'"
        },
        {
          "id": "HlCDWEqZ3xfGOxQg0RZia",
          "language": "javascript",
          "label": "javascript",
          "code": "var myHeaders = new Headers();\nmyHeaders.append(\"accept\", \"*/*\");\nmyHeaders.append(\"content-type\", \"application/json\");\n\nvar requestOptions = {\n   method: 'POST',\n   headers: myHeaders,\n   redirect: 'follow'\n};\n\nfetch(\"https://api.nue.io/billing/payment-rules/{id}:duplicate\", requestOptions)\n   .then(response => response.text())\n   .then(result => console.log(result))\n   .catch(error => console.log('error', error));"
        },
        {
          "id": "WEpizqCXdGkuoNyrilHBH",
          "language": "ruby",
          "label": "Ruby",
          "code": "require \"uri\"\nrequire \"json\"\nrequire \"net/http\"\n\nurl = URI(\"https://api.nue.io/billing/payment-rules/{id}:duplicate\")\n\nhttps = Net::HTTP.new(url.host, url.port)\nhttps.use_ssl = true\n\nrequest = Net::HTTP::Post.new(url)\nrequest[\"accept\"] = \"*/*\"\nrequest[\"content-type\"] = \"application/json\"\n\nresponse = https.request(request)\nputs response.read_body\n"
        },
        {
          "id": "cBM-6OEcY1EKPA-4p1HCB",
          "language": "python",
          "label": "Python",
          "code": "import requests\nimport json\n\nurl = \"https://api.nue.io/billing/payment-rules/{id}:duplicate\"\n\npayload = {}\nheaders = {\n   'accept': '*/*',\n   'content-type': 'application/json'\n}\n\nresponse = requests.request(\"POST\", url, headers=headers, data=payload)\n\nprint(response.text)\n"
        }
      ],
      "selectedLanguageId": "F7t4LnLoI4A6o10GltKH3"
    },
    "results": {
      "languages": [
        {
          "id": "8culZCt_at5dOwnu0I3Yr",
          "language": "201",
          "code": "// Created\n"
        },
        {
          "id": "S3t5I-IZYPQaTtVof7YBq",
          "language": "400",
          "code": "// Bad Request\n{\n  \"title\": \"\",\n  \"message\": \"\",\n  \"errorCode\": \"\"\n}"
        },
        {
          "id": "c_CYRD5-A2aLRlBnbO5qJ",
          "language": "404",
          "code": "// Not Found\n"
        }
      ],
      "selectedLanguageId": "8culZCt_at5dOwnu0I3Yr"
    }
  },
  "children": [
    {
      "text": ""
    }
  ]
}