---
updatedAt: 2025-10-02T22:24:02.000Z
agentTools:
  projectIndex: https://developer.bill.com/v2/llms.txt
---

# Update a credit memo

Update a credit memo object.

**Warning**: All credit memo line item details are overwritten with an update operation. When you update a credit memo detail, enter all existing credit memo line item details.
### What is a credit memo?
A credit memo is an adjustment on the amount owed on a customer invoice. Credit memos for a range of reasons, such as not enough stock or returned merchandise. BILL provides a credit memo template with a header and content body.

You can create a credit memo with [`/v2/Crud/Create/CreditMemo.json`](ref:ar-customertransactions-createcreditmemo). In the credit memo, add credit memo line items to record credit details at a granular level.

`exchangeRate` is a required additional field for creating a credit memo for an international customer. In addition, each credit memo line item amount is in the foreign currency. Retrieve the current exchange rate with `/v2/GetDynamicExchangeRateQuote2.json`.

**Note**: You can apply credit memos to invoices and make changes to the default credit memo template only with the BILL web app. On the **Settings** page, click **Email Templates** under **Receivables** to view and edit the current credit memo template.

### Line item price, markups, & discounts
In your request, either `price` or percentage (`ratePercent`) is required for each `creditMemoLineItems` object. If you set one, do not set the other.
* If `price` is set, `amount` is (`quantity`) x (`price`).
* If `ratePercent` is set for a line item, the line item `amount` is (`ratePercent`) x (sum of other line item `amount` values). For example, to apply a discount of 20% in your invoice total of $100, set `ratePercent` as `-20` in the final line item of your request.

# OpenAPI definition

```json
{
  "openapi": "3.0.0",
  "info": {
    "title": "AR | Customer transactions",
    "version": "2.0",
    "description": "BILL is a cloud-based cash flow management system for an organization's Accounts Payable (AP) and Accounts Receivable (AR) automation.\n * **AP**: Automate workflows to pay vendors bills at scale for the goods and services they provide. Pay vendors with a wide range of payment methods. Generate vendor credits, bill credits, and payment disbursement reports.\n * **AR**: Automate workflows to get paid by customers at scale for the goods and services you provide. Generate and send invoices on a schedule, generate customer and invoice credits, and seamlessly charge authorized customers.\n * **Organization**: Manage your bank accounts (for sending and receiving payments), users (with user roles), and sync with your choice of accounting software.\n\nIntegrate with the BILL API to send and receive payments for your business. See [Support Center](https://help.bill.com/hc/en-us) for resources about using the BILL web app.",
    "contact": {
      "email": "developerprogram@hq.bill.com"
    }
  },
  "servers": [
    {
      "url": "https://api-stage.bill.com/api/v2",
      "description": "Sandbox base URL"
    }
  ],
  "x-readme": {
    "samples-languages": [
      "curl",
      "java",
      "javascript",
      "python",
      "ruby"
    ]
  },
  "paths": {
    "/Crud/Update/CreditMemo.json": {
      "post": {
        "summary": "Update a credit memo",
        "operationId": "ar-customertransactions-updatecreditmemo",
        "description": "Update a credit memo object.\n\n**Warning**: All credit memo line item details are overwritten with an update operation. When you update a credit memo detail, enter all existing credit memo line item details.\n### What is a credit memo?\nA credit memo is an adjustment on the amount owed on a customer invoice. Credit memos for a range of reasons, such as not enough stock or returned merchandise. BILL provides a credit memo template with a header and content body.\n\nYou can create a credit memo with [`/v2/Crud/Create/CreditMemo.json`](ref:ar-customertransactions-createcreditmemo). In the credit memo, add credit memo line items to record credit details at a granular level.\n\n`exchangeRate` is a required additional field for creating a credit memo for an international customer. In addition, each credit memo line item amount is in the foreign currency. Retrieve the current exchange rate with `/v2/GetDynamicExchangeRateQuote2.json`.\n\n**Note**: You can apply credit memos to invoices and make changes to the default credit memo template only with the BILL web app. On the **Settings** page, click **Email Templates** under **Receivables** to view and edit the current credit memo template.\n\n### Line item price, markups, & discounts\nIn your request, either `price` or percentage (`ratePercent`) is required for each `creditMemoLineItems` object. If you set one, do not set the other.\n* If `price` is set, `amount` is (`quantity`) x (`price`).\n* If `ratePercent` is set for a line item, the line item `amount` is (`ratePercent`) x (sum of other line item `amount` values). For example, to apply a discount of 20% in your invoice total of $100, set `ratePercent` as `-20` in the final line item of your request.",
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CreateCreditMemoResponse"
                }
              }
            }
          }
        },
        "requestBody": {
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "type": "object",
                "required": [
                  "devKey",
                  "sessionId",
                  "data"
                ],
                "properties": {
                  "devKey": {
                    "type": "string",
                    "description": "Developer key generated with your BILL developer account"
                  },
                  "sessionId": {
                    "type": "string",
                    "description": "API session ID generated with [`/v2/Login.json`](ref:auth-login)"
                  },
                  "data": {
                    "$ref": "#/components/schemas/UpdateCreditMemoRequest"
                  }
                }
              }
            }
          }
        },
        "tags": [
          "Credit memos"
        ]
      },
      "parameters": []
    }
  },
  "components": {
    "schemas": {
      "ErrorResponse": {
        "type": "object",
        "properties": {
          "error_code": {
            "type": "string",
            "description": "Error code (only when `response_status` is `1`)"
          },
          "error_message": {
            "type": "string",
            "description": "Error message (only when `response_status` is `1`)"
          }
        }
      },
      "CreateCreditMemoResponse": {
        "type": "object",
        "properties": {
          "response_status": {
            "type": "integer",
            "description": "Response status.\n* `0`: Success response\n* `1`: Error response. Only `error_code` and `error_message` is returned in `response_data`."
          },
          "response_message": {
            "type": "string",
            "description": "Response status.\n* `Success`: Success response\n* `Error`: Error response. Only `error_code` and `error_message` is returned in `response_data`."
          },
          "response_data": {
            "type": "object",
            "allOf": [
              {
                "$ref": "#/components/schemas/ErrorResponse"
              }
            ],
            "properties": {
              "entity": {
                "type": "string",
                "description": "Object type. Set as `CreditMemo`."
              },
              "id": {
                "type": "string",
                "description": "BILL-generated ID of the credit memo. The value begins with `ccr`."
              },
              "isActive": {
                "type": "string",
                "description": "Object visibility status. Inactive objects are hidden by default in the BILL web app.\n* `1`: Active\n* `2`: Inactive"
              },
              "customerId": {
                "type": "string",
                "description": "BILL-generated ID of the customer. The value begins with `0cu`."
              },
              "refNumber": {
                "type": "string",
                "description": "Credit memo reference number"
              },
              "creditDate": {
                "type": "string",
                "description": "Date when the credit memo is issued. This value is in the YYYY-MM-DD format."
              },
              "glPostingDate": {
                "type": "string",
                "description": "Credit memo date in your organization’s general ledger in your choice of accounting software. The value is in the YYYY-MM-DD format."
              },
              "amount": {
                "type": "number",
                "description": "Credit memo total amount"
              },
              "localAmount": {
                "type": "number",
                "description": "Credit memo total amount in local currency"
              },
              "exchangeRate": {
                "type": "number",
                "description": "Exchange rate for creating a credit memo for an international customer. This field is required during credit memo creation for international customers."
              },
              "availableAmount": {
                "type": "number",
                "description": "Credit memo amount not applied"
              },
              "appliedAmount": {
                "type": "number",
                "description": "Credit memo total amount applied to the invoice"
              },
              "status": {
                "type": "string",
                "description": "Credit memo application status.\n* `0`: Fully applied\n* `1`: Not applied\n* `2`: Partially applied"
              },
              "description": {
                "type": "string",
                "description": "Credit memo description that is visible to the customer"
              },
              "poNumber": {
                "type": "string",
                "description": "Purchase order number associated with the credit memo"
              },
              "isToBePrinted": {
                "type": "boolean",
                "description": "Set as `true` if the credit memo is to be printed and mailed to the customer. Note that BILL does not support sending a credit memo by US Mail."
              },
              "isToBeEmailed": {
                "type": "boolean",
                "description": "Set as `true` if the credit memo is to be emailed to the customer"
              },
              "itemSalesTax": {
                "type": "string",
                "description": "BILL-generated ID of the sales tax applied to all taxable line items in the credit memo. The value begins with `0ii`. The `salesTaxTotal` in the response is calculated based on the `itemSalesTax` value.\n\nYou can set your sales tax value with the BILL web app. On the **Settings** page, click **Classifications** under **Accounting**, and then create a new item with the **TYPE** set as **Sales Tax**."
              },
              "salesTaxPercentage": {
                "type": "number",
                "description": "Sales tax percentage applied to the taxable line items in the credit memo"
              },
              "salesTaxTotal": {
                "type": "number",
                "description": "Sales tax total amount applied to the credit memo. This values is calculated based on the `itemSalesTax` value."
              },
              "salesRep": {
                "type": "string",
                "description": "Sales representative associated with the credit memo"
              },
              "FOB": {
                "type": "string",
                "description": "Shipping information for the credit memo"
              },
              "shipDate": {
                "type": "string",
                "description": "Shipping date when the products are shipped to the customer. This value is in the YYYY-MM-DD format."
              },
              "shipMethod": {
                "type": "string",
                "description": "Shipping method used to ship the products to the customer"
              },
              "departmentId": {
                "type": "string",
                "description": "BILL-generated ID of the department associated with the credit memo. This is an accounts tracking object."
              },
              "locationId": {
                "type": "string",
                "description": "BILL-generated ID of the location associated with the credit memo. This is an accounts tracking object."
              },
              "actgClassId": {
                "type": "string",
                "description": "BILL-generated ID of the accounting class associated with the credit memo. This is an accounts tracking object."
              },
              "jobId": {
                "type": "string",
                "description": "BILL-generated ID of the job associated with the credit memo. This is an accounts tracking object."
              },
              "payToBankAccountId": {
                "type": "string",
                "description": "BILL-generated ID of the bank account associated with the credit memo. This field is available only for select BILL partners."
              },
              "payToChartOfAccountId": {
                "type": "string",
                "description": "BILL-generated ID of the chart of accounts associated with the credit memo. This is an accounts tracking object. This field is available only for select BILL partners."
              },
              "creditMemoLineItems": {
                "type": "array",
                "items": {
                  "type": "object",
                  "required": [
                    "entity",
                    "quantity",
                    "amount"
                  ],
                  "properties": {
                    "entity": {
                      "type": "string",
                      "description": "Object type. Set as `CreditMemoLineItem`.",
                      "default": "CreditMemoLineItem"
                    },
                    "itemId": {
                      "type": "string",
                      "description": "BILL-generated ID of the item associated with the credit memo. The value begins with `0ii`."
                    },
                    "quantity": {
                      "type": "number",
                      "description": "Quantity of items sold or time spent providing the service"
                    },
                    "amount": {
                      "type": "number",
                      "description": "Credit memo line item total amount. If `ratePercent` is set, `amount` is (`ratePercent`) x (sum of other line item `amount` values). If `price` is set, `amount` is (`quantity`) x (`price`)."
                    },
                    "price": {
                      "type": "number",
                      "description": "Item price or service rate set for the credit memo"
                    },
                    "serviceDate": {
                      "type": "string",
                      "description": "Date when the products or service is sold. This value is in the YYYY-MM-DD format."
                    },
                    "ratePercent": {
                      "type": "number",
                      "description": "Item rate percentage.\n* A positive value is a markup. For example, set as `20` for a `20%` markup.\n* A negative value is a discount. For example, set as `-20` for a `20%` discount."
                    },
                    "chartOfAccountId": {
                      "type": "string",
                      "description": "BILL-generated ID of the chart of accounts associated with the credit memo line item. This is an accounts tracking object."
                    },
                    "departmentId": {
                      "type": "string",
                      "description": "BILL-generated ID of the department associated with the credit memo line item. This is an accounts tracking object."
                    },
                    "locationId": {
                      "type": "string",
                      "description": "BILL-generated ID of the location associated with the credit memo line item. This is an accounts tracking object."
                    },
                    "actgClassId": {
                      "type": "string",
                      "description": "BILL-generated ID of the accounting class associated with the credit memo line item. This is an accounts tracking object."
                    },
                    "jobId": {
                      "type": "string",
                      "description": "BILL-generated ID of the job associated with the credit memo line item. This is an accounts tracking object."
                    },
                    "description": {
                      "type": "string",
                      "description": "Credit memo line item description"
                    },
                    "taxCode": {
                      "type": "string",
                      "description": "Tax code"
                    },
                    "taxable": {
                      "type": "boolean",
                      "description": "Set as `true` if the credit memo line item is taxable and is included in the `salesTaxTotal` calculation"
                    },
                    "lineOrder": {
                      "type": "number",
                      "description": "Invoice line item order"
                    }
                  }
                }
              }
            }
          }
        }
      },
      "UpdateCreditMemoRequest": {
        "type": "object",
        "required": [
          "obj"
        ],
        "properties": {
          "obj": {
            "type": "object",
            "required": [
              "entity",
              "id",
              "customerId",
              "refNumber",
              "creditDate",
              "creditMemoLineItems"
            ],
            "properties": {
              "entity": {
                "type": "string",
                "description": "Object type. Set as `CreditMemo`."
              },
              "id": {
                "type": "string",
                "description": "BILL-generated ID of the credit memo. The value begins with `ccr`."
              },
              "isActive": {
                "type": "string",
                "description": "Object visibility status. Inactive objects are hidden by default in the BILL web app.\n* `1`: Active\n* `2`: Inactive"
              },
              "customerId": {
                "type": "string",
                "description": "BILL-generated ID of the customer. The value begins with `0cu`."
              },
              "refNumber": {
                "type": "string",
                "description": "Credit memo reference number"
              },
              "creditDate": {
                "type": "string",
                "description": "Date when the credit memo is issued. This value is in the YYYY-MM-DD format."
              },
              "glPostingDate": {
                "type": "string",
                "description": "Credit memo date in your organization’s general ledger in your choice of accounting software. The value is in the YYYY-MM-DD format."
              },
              "exchangeRate": {
                "type": "number",
                "description": "Exchange rate for creating a credit memo for an international customer. This field is required during credit memo creation for international customers."
              },
              "availableAmount": {
                "type": "number",
                "description": "Credit memo amount not applied"
              },
              "appliedAmount": {
                "type": "number",
                "description": "Credit memo amount applied to the invoice"
              },
              "status": {
                "type": "string",
                "description": "Credit memo application status.\n* `0`: Fully applied\n* `1`: Not applied\n* `2`: Partially applied"
              },
              "description": {
                "type": "string",
                "description": "Credit memo description that is visible to the customer"
              },
              "poNumber": {
                "type": "string",
                "description": "Purchase order number associated with the credit memo"
              },
              "isToBePrinted": {
                "type": "boolean",
                "description": "Set as `true` if the credit memo is to be printed and mailed to the customer. Note that BILL does not support sending a credit memo by US Mail."
              },
              "isToBeEmailed": {
                "type": "boolean",
                "description": "Set as `true` if the credit memo is to be emailed to the customer"
              },
              "itemSalesTax": {
                "type": "string",
                "description": "BILL-generated ID of the sales tax applied to all taxable line items in the credit memo. The value begins with `0ii`. The `salesTaxTotal` in the response is calculated based on the `itemSalesTax` value.\n\nYou can set your sales tax value with the BILL web app. On the **Settings** page, click **Classifications** under **Accounting**, and then create a new item with the **TYPE** set as **Sales Tax**."
              },
              "salesRep": {
                "type": "string",
                "description": "Sales representative associated with the credit memo"
              },
              "FOB": {
                "type": "string",
                "description": "Shipping information for the credit memo"
              },
              "shipDate": {
                "type": "string",
                "description": "Shipping date when the products are shipped to the customer. This value is in the YYYY-MM-DD format."
              },
              "shipMethod": {
                "type": "string",
                "description": "Shipping method used to ship the products to the customer"
              },
              "departmentId": {
                "type": "string",
                "description": "BILL-generated ID of the department associated with the credit memo. This is an accounts tracking object."
              },
              "locationId": {
                "type": "string",
                "description": "BILL-generated ID of the location associated with the credit memo. This is an accounts tracking object."
              },
              "actgClassId": {
                "type": "string",
                "description": "BILL-generated ID of the accounting class associated with the credit memo. This is an accounts tracking object."
              },
              "jobId": {
                "type": "string",
                "description": "BILL-generated ID of the job associated with the credit memo. This is an accounts tracking object."
              },
              "payToBankAccountId": {
                "type": "string",
                "description": "BILL-generated ID of the bank account associated with the credit memo. This field is available only for select BILL partners."
              },
              "payToChartOfAccountId": {
                "type": "string",
                "description": "BILL-generated ID of the chart of accounts associated with the credit memo. This is an accounts tracking object. This field is available only for select BILL partners."
              },
              "creditMemoLineItems": {
                "type": "array",
                "items": {
                  "type": "object",
                  "required": [
                    "entity",
                    "quantity",
                    "amount"
                  ],
                  "properties": {
                    "entity": {
                      "type": "string",
                      "description": "Object type. Set as `CreditMemoLineItem`.",
                      "default": "CreditMemoLineItem"
                    },
                    "itemId": {
                      "type": "string",
                      "description": "BILL-generated ID of the item associated with the credit memo. The value begins with `0ii`."
                    },
                    "quantity": {
                      "type": "number",
                      "description": "Quantity of items sold or time spent providing the service"
                    },
                    "amount": {
                      "type": "number",
                      "description": "Credit memo line item total amount. If `ratePercent` is set, `amount` is (`ratePercent`) x (sum of other line item `amount` values). If `price` is set, `amount` is (`quantity`) x (`price`)."
                    },
                    "price": {
                      "type": "number",
                      "description": "Item price or service rate set for the credit memo"
                    },
                    "serviceDate": {
                      "type": "string",
                      "description": "Date when the products or service is sold. This value is in the YYYY-MM-DD format."
                    },
                    "ratePercent": {
                      "type": "number",
                      "description": "Item rate percentage.\n* A positive value is a markup. For example, set as `20` for a `20%` markup.\n* A negative value is a discount. For example, set as `-20` for a `20%` discount."
                    },
                    "chartOfAccountId": {
                      "type": "string",
                      "description": "BILL-generated ID of the chart of accounts associated with the credit memo line item. This is an accounts tracking object."
                    },
                    "departmentId": {
                      "type": "string",
                      "description": "BILL-generated ID of the department associated with the credit memo line item. This is an accounts tracking object."
                    },
                    "locationId": {
                      "type": "string",
                      "description": "BILL-generated ID of the location associated with the credit memo line item. This is an accounts tracking object."
                    },
                    "actgClassId": {
                      "type": "string",
                      "description": "BILL-generated ID of the accounting class associated with the credit memo line item. This is an accounts tracking object."
                    },
                    "jobId": {
                      "type": "string",
                      "description": "BILL-generated ID of the job associated with the credit memo line item. This is an accounts tracking object."
                    },
                    "description": {
                      "type": "string",
                      "description": "Credit memo line item description"
                    },
                    "taxCode": {
                      "type": "string",
                      "description": "Tax code"
                    },
                    "taxable": {
                      "type": "boolean",
                      "description": "Set as `true` if the credit memo line item is taxable and is included in the `salesTaxTotal` calculation"
                    },
                    "lineOrder": {
                      "type": "number",
                      "description": "Invoice line item order"
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}
```