---
title: Unapply Credit Memos
slug: unapply-credit-memos
docTags: 
createdAt: 2026-08-25T19:28:59.170Z
---

{
  "id": "BQOQpz1P-5bP_O13_JblV",
  "type": "api-oas-v2",
  "data": {
    "method": "POST",
    "url": "https://api.nue.io/billing/credit-memos:unapply",
    "servers": [
      {
        "url": "https://api.nue.io/billing/credit-memos:unapply",
        "description": "Nue Production API Endpoint"
      },
      {
        "url": "https://api.sandbox.nue.io/billing/credit-memos:unapply",
        "description": "Nue Sandbox API Endpoint"
      }
    ],
    "name": "Unapply Credit Memos",
    "description": "Unapply credit memos.",
    "contentType": "application/json",
    "request": {
      "pathParameters": [],
      "headerParameters": [
        {
          "name": "accept",
          "type": "string",
          "kind": "optional",
          "description": "Generated from available response content types",
          "enum": [
            "application/json"
          ],
          "default": "application/json"
        }
      ],
      "queryParameters": [],
      "bodyDataParameters": [
        {
          "kind": "required",
          "name": "body",
          "type": "object",
          "description": "The unapplied invoices request",
          "schema": [
            {
              "name": "unappliedInvoices",
              "kind": "required",
              "type": "array",
              "description": "List of invoices and credit memo details to unapply",
              "example": "",
              "itemType": "object",
              "customType": "object[]",
              "schema": [
                {
                  "name": "invoiceId",
                  "kind": "required",
                  "type": "string<uuid>",
                  "description": "",
                  "format": "uuid"
                },
                {
                  "name": "creditMemoId",
                  "kind": "required",
                  "type": "string<uuid>",
                  "description": "",
                  "format": "uuid"
                },
                {
                  "name": "paymentSource",
                  "kind": "required",
                  "type": "string<Stripe | QuickBooks | NetSuite | GoCardless | Nue>",
                  "description": "The source system that processed the payment.",
                  "enum": [
                    "Stripe",
                    "QuickBooks",
                    "NetSuite",
                    "GoCardless",
                    "Nue"
                  ]
                },
                {
                  "name": "paymentId",
                  "kind": "optional",
                  "type": "string",
                  "description": ""
                },
                {
                  "name": "paymentApplicationId",
                  "kind": "optional",
                  "type": "string<uuid>",
                  "description": "",
                  "format": "uuid"
                },
                {
                  "name": "paymentNumber",
                  "kind": "optional",
                  "type": "string",
                  "description": ""
                },
                {
                  "name": "paymentMethod",
                  "kind": "optional",
                  "type": "string",
                  "description": ""
                },
                {
                  "name": "customerId",
                  "kind": "optional",
                  "type": "string",
                  "description": ""
                }
              ]
            },
            {
              "name": "configMap",
              "kind": "optional",
              "type": "object",
              "description": "Configuration flags for processing",
              "example": "",
              "schema": [
                {
                  "name": "triggerFromNue",
                  "kind": "optional",
                  "type": "boolean",
                  "description": ""
                }
              ]
            }
          ],
          "isExpanded": true
        }
      ],
      "formDataParameters": [],
      "oAuthParameters": [
        {
          "id": "apiKeyAuth",
          "name": "nue-api-key",
          "kind": "optional",
          "type": "apiKey",
          "in": "header"
        }
      ],
      "cookieParameters": []
    },
    "responses": [
      {
        "statusCode": "200",
        "description": "Credit memo successfully unapplied from invoices",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "description": "",
            "schema": [
              {
                "name": "paymentApplications",
                "kind": "optional",
                "type": "array",
                "description": "List of payment applications created for the unapply",
                "example": "",
                "itemType": "object",
                "customType": "object[]",
                "schema": [
                  {
                    "name": "id",
                    "kind": "optional",
                    "type": "string",
                    "description": ""
                  },
                  {
                    "name": "invoiceId",
                    "kind": "optional",
                    "type": "string",
                    "description": ""
                  },
                  {
                    "name": "debitMemoId",
                    "kind": "optional",
                    "type": "string",
                    "description": ""
                  },
                  {
                    "name": "paymentId",
                    "kind": "optional",
                    "type": "string",
                    "description": ""
                  },
                  {
                    "name": "paymentMethod",
                    "kind": "optional",
                    "type": "string",
                    "description": ""
                  },
                  {
                    "name": "transactionAmount",
                    "kind": "optional",
                    "type": "number",
                    "description": ""
                  },
                  {
                    "name": "errorCode",
                    "kind": "optional",
                    "type": "string",
                    "description": ""
                  },
                  {
                    "name": "errorMessage",
                    "kind": "optional",
                    "type": "string",
                    "description": ""
                  }
                ]
              }
            ],
            "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,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "description": "",
            "schema": [],
            "isExpanded": true
          }
        ]
      }
    ],
    "hasXCodeSamples": false,
    "examples": {
      "languages": [
        {
          "id": "oZQ33avnYH8qfmjzIri1E",
          "language": "curl",
          "label": "cURL",
          "code": "curl --request POST \\\n     --url https://api.nue.io/billing/credit-memos:unapply \\\n     --header 'accept: application/json' \\\n     --header 'content-type: application/json' \\\n     --data '{\n     \"unappliedInvoices\": [\n     {\n     \"invoiceId\": \"\",\n     \"creditMemoId\": \"\",\n     \"paymentSource\": \"\"\n     }\n     ]\n     }'"
        },
        {
          "id": "1gWZ7FQV8bVxgSKR_VQBt",
          "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   \"unappliedInvoices\": [\n      {\n         \"invoiceId\": \"\",\n         \"creditMemoId\": \"\",\n         \"paymentSource\": \"\"\n      }\n   ]\n});\n\nvar requestOptions = {\n   method: 'POST',\n   headers: myHeaders,\n   body: raw,\n   redirect: 'follow'\n};\n\nfetch(\"https://api.nue.io/billing/credit-memos:unapply\", requestOptions)\n   .then(response => response.text())\n   .then(result => console.log(result))\n   .catch(error => console.log('error', error));"
        },
        {
          "id": "SIJBtTCxad_WHuEPINSAu",
          "language": "ruby",
          "label": "Ruby",
          "code": "require \"uri\"\nrequire \"json\"\nrequire \"net/http\"\n\nurl = URI(\"https://api.nue.io/billing/credit-memos:unapply\")\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   \"unappliedInvoices\": [\n      {\n         \"invoiceId\": \"\",\n         \"creditMemoId\": \"\",\n         \"paymentSource\": \"\"\n      }\n   ]\n})\n\nresponse = https.request(request)\nputs response.read_body\n"
        },
        {
          "id": "IgCAsjQe8sxzMPp-gabu3",
          "language": "python",
          "label": "Python",
          "code": "import requests\nimport json\n\nurl = \"https://api.nue.io/billing/credit-memos:unapply\"\n\npayload = json.dumps({\n   \"unappliedInvoices\": [\n      {\n         \"invoiceId\": \"\",\n         \"creditMemoId\": \"\",\n         \"paymentSource\": \"\"\n      }\n   ]\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": "oZQ33avnYH8qfmjzIri1E"
    },
    "results": {
      "languages": [
        {
          "id": "nM6WvWpKzXtnW24scCC1G",
          "language": "200",
          "code": "// Credit memo successfully unapplied from invoices\n{\n  \"paymentApplications\": [\n    {\n      \"id\": \"\",\n      \"invoiceId\": \"\",\n      \"debitMemoId\": \"\",\n      \"paymentId\": \"\",\n      \"paymentMethod\": \"\",\n      \"transactionAmount\": 0,\n      \"errorCode\": \"\",\n      \"errorMessage\": \"\"\n    }\n  ]\n}"
        },
        {
          "id": "QGwwbFdHJrUr75zb2YZDV",
          "language": "400",
          "code": "// Bad Request\n{\n  \"title\": \"\",\n  \"message\": \"\",\n  \"errorCode\": \"\"\n}"
        },
        {
          "id": "LAPuUPUdz8LGmXrP6AZt4",
          "language": "404",
          "code": "// Not Found\n{}"
        }
      ],
      "selectedLanguageId": "nM6WvWpKzXtnW24scCC1G"
    }
  },
  "children": [
    {
      "text": ""
    }
  ]
}