---
title: Pay Invoices
slug: pay-invoices
docTags: 
createdAt: 2026-08-25T19:28:59.170Z
---

{
  "id": "X3bh6nMiMCUCjLeoI1kEJ",
  "type": "api-oas-v2",
  "data": {
    "method": "POST",
    "url": "https://api.nue.io/billing/invoices:pay",
    "servers": [
      {
        "url": "https://api.nue.io/billing/invoices:pay",
        "description": "Nue Production API Endpoint"
      },
      {
        "url": "https://api.sandbox.nue.io/billing/invoices:pay",
        "description": "Nue Sandbox API Endpoint"
      }
    ],
    "name": "Pay Invoices",
    "description": "Pay active invoices.",
    "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 payment invoices request",
          "schema": [
            {
              "name": "payInvoices",
              "kind": "required",
              "type": "array",
              "description": "List of invoices and payment details to apply",
              "example": "",
              "itemType": "object",
              "customType": "object[]",
              "schema": [
                {
                  "name": "invoiceId",
                  "kind": "required",
                  "type": "string<uuid>",
                  "description": "",
                  "format": "uuid"
                },
                {
                  "name": "transactionAmount",
                  "kind": "required",
                  "type": "number",
                  "description": ""
                },
                {
                  "name": "paymentMethod",
                  "kind": "required",
                  "type": "string",
                  "description": "Payment method for this transaction."
                },
                {
                  "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": "paymentNumber",
                  "kind": "optional",
                  "type": "string",
                  "description": ""
                },
                {
                  "name": "customerId",
                  "kind": "optional",
                  "type": "string",
                  "description": ""
                },
                {
                  "name": "paymentType",
                  "kind": "optional",
                  "type": "string",
                  "description": "<p>Optional payment type/category.</p>"
                },
                {
                  "name": "items",
                  "kind": "optional",
                  "type": "array",
                  "description": "<p>Optional per-invoice-item allocation. If omitted, transactionAmount applies to the whole invoice.</p>",
                  "example": "",
                  "itemType": "object",
                  "customType": "object[]",
                  "schema": [
                    {
                      "name": "invoiceItemId",
                      "kind": "optional",
                      "type": "string<uuid>",
                      "description": "",
                      "format": "uuid"
                    },
                    {
                      "name": "transactionAmount",
                      "kind": "optional",
                      "type": "number",
                      "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": "Invoice paid successfully",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "description": "",
            "schema": [
              {
                "name": "paymentApplications",
                "kind": "optional",
                "type": "array",
                "description": "List of payment applications created for the payment",
                "example": "",
                "itemType": "object",
                "customType": "object[]",
                "schema": [
                  {
                    "name": "id",
                    "kind": "optional",
                    "type": "string<uuid>",
                    "description": "",
                    "format": "uuid"
                  },
                  {
                    "name": "invoiceId",
                    "kind": "optional",
                    "type": "string<uuid>",
                    "description": "",
                    "format": "uuid"
                  },
                  {
                    "name": "debitMemoId",
                    "kind": "optional",
                    "type": "string<uuid>",
                    "description": "",
                    "format": "uuid"
                  },
                  {
                    "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": ""
                  },
                  {
                    "name": "items",
                    "kind": "optional",
                    "type": "array",
                    "description": "",
                    "example": "",
                    "itemType": "object",
                    "customType": "object[]",
                    "schema": [
                      {
                        "name": "id",
                        "kind": "optional",
                        "type": "string<uuid>",
                        "description": "",
                        "format": "uuid"
                      },
                      {
                        "name": "invoiceItemId",
                        "kind": "optional",
                        "type": "string<uuid>",
                        "description": "",
                        "format": "uuid"
                      },
                      {
                        "name": "transactionAmount",
                        "kind": "optional",
                        "type": "number",
                        "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": "fs3btxNnzmPKxHzejCrzH",
          "language": "curl",
          "label": "cURL",
          "code": "curl --request POST \\\n     --url https://api.nue.io/billing/invoices:pay \\\n     --header 'accept: application/json' \\\n     --header 'content-type: application/json' \\\n     --data '{\n     \"payInvoices\": [\n     {\n     \"invoiceId\": \"\",\n     \"transactionAmount\": \"\",\n     \"paymentMethod\": \"\",\n     \"paymentSource\": \"\"\n     }\n     ]\n     }'"
        },
        {
          "id": "uxyktfDG6umKWRiX-yI-I",
          "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   \"payInvoices\": [\n      {\n         \"invoiceId\": \"\",\n         \"transactionAmount\": \"\",\n         \"paymentMethod\": \"\",\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/invoices:pay\", requestOptions)\n   .then(response => response.text())\n   .then(result => console.log(result))\n   .catch(error => console.log('error', error));"
        },
        {
          "id": "voKLZbhEe59syUo1Rmy2D",
          "language": "ruby",
          "label": "Ruby",
          "code": "require \"uri\"\nrequire \"json\"\nrequire \"net/http\"\n\nurl = URI(\"https://api.nue.io/billing/invoices:pay\")\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   \"payInvoices\": [\n      {\n         \"invoiceId\": \"\",\n         \"transactionAmount\": \"\",\n         \"paymentMethod\": \"\",\n         \"paymentSource\": \"\"\n      }\n   ]\n})\n\nresponse = https.request(request)\nputs response.read_body\n"
        },
        {
          "id": "ue9pjRutDddmEEfiRlFRj",
          "language": "python",
          "label": "Python",
          "code": "import requests\nimport json\n\nurl = \"https://api.nue.io/billing/invoices:pay\"\n\npayload = json.dumps({\n   \"payInvoices\": [\n      {\n         \"invoiceId\": \"\",\n         \"transactionAmount\": \"\",\n         \"paymentMethod\": \"\",\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": "fs3btxNnzmPKxHzejCrzH"
    },
    "results": {
      "languages": [
        {
          "id": "zBVEVNjEMifyOWUMBwePa",
          "language": "200",
          "code": "// Invoice paid successfully\n{\n  \"paymentApplications\": [\n    {\n      \"id\": \"\",\n      \"invoiceId\": \"\",\n      \"debitMemoId\": \"\",\n      \"paymentId\": \"\",\n      \"paymentMethod\": \"\",\n      \"transactionAmount\": 0,\n      \"errorCode\": \"\",\n      \"errorMessage\": \"\",\n      \"items\": [\n        {\n          \"id\": \"\",\n          \"invoiceItemId\": \"\",\n          \"transactionAmount\": 0\n        }\n      ]\n    }\n  ]\n}"
        },
        {
          "id": "lxSuWuMc9FDT_GrzHsMoT",
          "language": "400",
          "code": "// Bad Request\n{\n  \"title\": \"\",\n  \"message\": \"\",\n  \"errorCode\": \"\"\n}"
        },
        {
          "id": "7IBFipbL8WANGPmNIdUMg",
          "language": "404",
          "code": "// Not Found\n{}"
        }
      ],
      "selectedLanguageId": "zBVEVNjEMifyOWUMBwePa"
    }
  },
  "children": [
    {
      "text": ""
    }
  ]
}