v48

latestOpenAPI 3.1.0raw.githubusercontent.com2026-07-262621423.8 MB

Update a credit card charge

Updates an existing credit card charge so you can adjust the credit card account, payee, memo, transaction date, and expense or item lines. The total is recalculated from the line details.

NOTE: If you include expenseLines, itemLines, or itemGroupLines, QuickBooks Desktop replaces each included line list with the array you send, so include unchanged lines you want to keep and use id: "-1" for new lines.

post/quickbooks-desktop/credit-card-charges/{id}

Path parameters

idstring required

The QuickBooks-assigned unique identifier of the credit card charge to update.

Example:123ABC-1234567890

The QuickBooks-assigned unique identifier of the credit card charge to update.

Headers

Conductor-End-User-Idstring required

The ID of the End-User to receive this request.

Example:end_usr_1234567abcdefg

The ID of the End-User to receive this request.

Request body

revisionNumberstring required

The current QuickBooks-assigned revision number of the credit card charge object you are updating, which you can get by fetching the object first. Provide the most recent revisionNumber to ensure you're working with the latest data; otherwise, the update will return an error.

accountIdstring

The bank or credit card account to which money is owed for this credit card charge.

payeeIdstring

The vendor or company from whom merchandise or services were purchased for this credit card charge.

transactionDatestring date

The date of this credit card charge, in ISO 8601 format (YYYY-MM-DD).

refNumberstring

The case-sensitive user-defined reference number for this credit card charge, which can be used to identify the transaction in QuickBooks. This value is not required to be unique and can be arbitrarily changed by the QuickBooks user.

Maximum length: 11 characters.

memostring

A memo or note for this credit card charge.

salesTaxCodeIdstring

The sales-tax code for this credit card charge, determining whether it is taxable or non-taxable. If set, this overrides any sales-tax codes defined on the payee. This can be overridden on the credit card charge's individual lines.

Default codes include "Non" (non-taxable) and "Tax" (taxable), but custom codes can also be created in QuickBooks Desktop. If QuickBooks Desktop is not set up to charge sales tax (via the "Do You Charge Sales Tax?" preference), it assigns the default non-taxable sales-tax code configured in the company file to all sales.

exchangeRatenumber

The market exchange rate between this credit card charge's currency and the home currency in QuickBooks at the time of this transaction. Represented as a decimal value (e.g., 1.2345 for 1 EUR = 1.2345 USD if USD is the home currency).

clearExpenseLinesboolean

When true, removes all existing expense lines associated with this credit card charge. To modify or add individual expense lines, use the field expenseLines instead.

clearItemLinesboolean

When true, removes all existing item lines associated with this credit card charge. To modify or add individual item lines, use the field itemLines instead.

Example request

{
  "revisionNumber": "1721172183",
  "accountId": "80000001-1234567890",
  "payeeId": "80000001-1234567890",
  "transactionDate": "2024-10-01",
  "refNumber": "CARD-1234",
  "memo": "Office supplies for Q3 marketing campaign",
  "salesTaxCodeId": "80000001-1234567890",
  "exchangeRate": 1.2345,
  "expenseLines": [
    {
      "id": "456DEF-1234567890",
      "accountId": "80000001-1234567890",
      "amount": "1000.00",
      "memo": "New office chair",
      "payeeId": "80000001-1234567890",
      "classId": "80000001-1234567890",
      "salesTaxCodeId": "80000001-1234567890",
      "billingStatus": "billable",
      "salesRepresentativeId": "80000001-1234567890"
    }
  ],
  "itemLines": [
    {
      "id": "456DEF-1234567890",
      "itemId": "80000001-1234567890",
      "inventorySiteId": "80000001-1234567890",
      "inventorySiteLocationId": "80000001-1234567890",
      "serialNumber": "SN1234567890",
      "lotNumber": "LOT2023-001",
      "expirationDate": "2025-12-31",
      "description": "High-quality widget with custom engraving",
      "quantity": 5,
      "unitOfMeasure": "Each",
      "overrideUnitOfMeasureSetId": "80000001-1234567890",
      "cost": "1000.00",
      "amount": "1000.00",
      "customerId": "80000001-1234567890",
      "classId": "80000001-1234567890",
      "salesTaxCodeId": "80000001-1234567890",
      "billingStatus": "billable",
      "overrideItemAccountId": "80000001-1234567890",
      "salesRepresentativeId": "80000001-1234567890"
    }
  ],
  "itemGroupLines": [
    {
      "id": "456DEF-1234567890",
      "itemGroupId": "80000001-1234567890",
      "quantity": 5,
      "unitOfMeasure": "Each",
      "overrideUnitOfMeasureSetId": "80000001-1234567890",
      "itemLines": [
        {
          "id": "456DEF-1234567890",
          "itemId": "80000001-1234567890",
          "inventorySiteId": "80000001-1234567890",
          "inventorySiteLocationId": "80000001-1234567890",
          "serialNumber": "SN1234567890",
          "lotNumber": "LOT2023-001",
          "expirationDate": "2025-12-31",
          "description": "High-quality widget with custom engraving",
          "quantity": 5,
          "unitOfMeasure": "Each",
          "overrideUnitOfMeasureSetId": "80000001-1234567890",
          "cost": "1000.00",
          "amount": "1000.00",
          "customerId": "80000001-1234567890",
          "classId": "80000001-1234567890",
          "salesTaxCodeId": "80000001-1234567890",
          "billingStatus": "billable",
          "overrideItemAccountId": "80000001-1234567890",
          "salesRepresentativeId": "80000001-1234567890"
        }
      ]
    }
  ]
}

Response

Returns the updated credit card charge.

idstring required

The unique identifier assigned by QuickBooks to this credit card charge. This ID is unique across all transaction types.

objectType'qbd_credit_card_charge' required

The type of object. This value is always "qbd_credit_card_charge".

createdAtstring required

The date and time when this credit card charge was created, in ISO 8601 format (YYYY-MM-DDThh:mm:ss±hh:mm), which QuickBooks Desktop interprets in the local timezone of the end-user's computer.

updatedAtstring required

The date and time when this credit card charge was last updated, in ISO 8601 format (YYYY-MM-DDThh:mm:ss±hh:mm), which QuickBooks Desktop interprets in the local timezone of the end-user's computer.

revisionNumberstring required

The current QuickBooks-assigned revision number of this credit card charge object, which changes each time the object is modified. When updating this object, you must provide the most recent revisionNumber to ensure you're working with the latest data; otherwise, the update will return an error.

transactionDatestring date required

The date of this credit card charge, in ISO 8601 format (YYYY-MM-DD).

amountstring required

The total monetary amount of this credit card charge, represented as a decimal string. This equals the sum of the amounts in the credit card charge's expense lines, item lines, and item group lines.

exchangeRatenumber nullable required

The market exchange rate between this credit card charge's currency and the home currency in QuickBooks at the time of this transaction. Represented as a decimal value (e.g., 1.2345 for 1 EUR = 1.2345 USD if USD is the home currency).

amountInHomeCurrencystring nullable required

The monetary amount of this credit card charge converted to the home currency of the QuickBooks company file. Represented as a decimal string.

refNumberstring nullable required

The case-sensitive user-defined reference number for this credit card charge, which can be used to identify the transaction in QuickBooks. This value is not required to be unique and can be arbitrarily changed by the QuickBooks user.

memostring nullable required

A memo or note for this credit card charge.

externalIdstring nullable required

A globally unique identifier (GUID) you, the developer, can provide for tracking this object in your external system. This field is immutable and can only be set during object creation.

Example response

{
  "id": "123ABC-1234567890",
  "objectType": "qbd_credit_card_charge",
  "createdAt": "2025-01-01T12:34:56+00:00",
  "updatedAt": "2025-02-01T12:34:56+00:00",
  "revisionNumber": "1721172183",
  "account": {
    "id": "80000001-1234567890",
    "fullName": "Visa"
  },
  "payee": {
    "id": "80000001-1234567890",
    "fullName": "Office Depot"
  },
  "transactionDate": "2024-10-01",
  "amount": "1000.00",
  "currency": {
    "id": "80000001-1234567890",
    "fullName": "USD"
  },
  "exchangeRate": 1.2345,
  "amountInHomeCurrency": "1234.56",
  "refNumber": "CARD-1234",
  "memo": "Office supplies for Q3 marketing campaign",
  "salesTaxCode": {
    "id": "80000001-1234567890",
    "fullName": "Non"
  },
  "externalId": "12345678-abcd-1234-abcd-1234567890ab",
  "expenseLines": [
    {
      "id": "456DEF-1234567890",
      "objectType": "qbd_expense_line",
      "account": {
        "id": "80000001-1234567890",
        "fullName": "Expenses:Office Supplies"
      },
      "amount": "1000.00",
      "memo": "New office chair",
      "payee": {
        "id": "80000001-1234567890",
        "fullName": "Acme Corporation"
      },
      "class": {
        "id": "80000001-1234567890",
        "fullName": "Office Supplies"
      },
      "salesTaxCode": {
        "id": "80000001-1234567890",
        "fullName": "Non"
      },
      "billingStatus": "billable",
      "salesRepresentative": {
        "id": "80000001-1234567890",
        "fullName": "Jane Doe"
      },
      "customFields": [
        {
          "ownerId": "0",
          "name": "Customer Rating",
          "type": "string_1024_type",
          "value": "Premium"
        }
      ]
    }
  ],
  "itemLines": [
    {
      "id": "456DEF-1234567890",
      "objectType": "qbd_item_line",
      "item": {
        "id": "80000001-1234567890",
        "fullName": "Widget A"
      },
      "inventorySite": {
        "id": "80000001-1234567890",
        "fullName": "Main Warehouse"
      },
      "inventorySiteLocation": {
        "id": "80000001-1234567890",
        "fullName": "Aisle 3, Shelf B"
      },
      "serialNumber": "SN1234567890",
      "lotNumber": "LOT2023-001",
      "expirationDate": "2025-12-31",
      "description": "High-quality widget with custom engraving",
      "quantity": 5,
      "unitOfMeasure": "Each",
      "overrideUnitOfMeasureSet": {
        "id": "80000001-1234567890",
        "fullName": "Volume Units"
      },
      "cost": "1000.00",
      "amount": "1000.00",
      "customer": {
        "id": "80000001-1234567890",
        "fullName": "Acme Corporation"
      },
      "class": {
        "id": "80000001-1234567890",
        "fullName": "Installation:Residential"
      },
      "salesTaxCode": {
        "id": "80000001-1234567890",
        "fullName": "Non"
      },
      "billingStatus": "billable",
      "salesRepresentative": {
        "id": "80000001-1234567890",
        "fullName": "Jane Doe"
      },
      "customFields": [
        {
          "ownerId": "0",
          "name": "Customer Rating",
          "type": "string_1024_type",
          "value": "Premium"
        }
      ]
    }
  ],
  "itemGroupLines": [
    {
      "id": "456DEF-1234567890",
      "objectType": "qbd_item_group_line",
      "itemGroup": {
        "id": "80000001-1234567890",
        "fullName": "Office Supplies Bundle"
      },
      "description": "Standard widget bulk package",
      "quantity": 5,
      "unitOfMeasure": "Each",
      "overrideUnitOfMeasureSet": {
        "id": "80000001-1234567890",
        "fullName": "Volume Units"
      },
      "totalAmount": "1000.00",
      "itemLines": [
        {
          "id": "456DEF-1234567890",
          "objectType": "qbd_item_line",
          "item": {
            "id": "80000001-1234567890",
            "fullName": "Widget A"
          },
          "inventorySite": {
            "id": "80000001-1234567890",
            "fullName": "Main Warehouse"
          },
          "inventorySiteLocation": {
            "id": "80000001-1234567890",
            "fullName": "Aisle 3, Shelf B"
          },
          "serialNumber": "SN1234567890",
          "lotNumber": "LOT2023-001",
          "expirationDate": "2025-12-31",
          "description": "High-quality widget with custom engraving",
          "quantity": 5,
          "unitOfMeasure": "Each",
          "overrideUnitOfMeasureSet": {
            "id": "80000001-1234567890",
            "fullName": "Volume Units"
          },
          "cost": "1000.00",
          "amount": "1000.00",
          "customer": {
            "id": "80000001-1234567890",
            "fullName": "Acme Corporation"
          },
          "class": {
            "id": "80000001-1234567890",
            "fullName": "Installation:Residential"
          },
          "salesTaxCode": {
            "id": "80000001-1234567890",
            "fullName": "Non"
          },
          "billingStatus": "billable",
          "salesRepresentative": {
            "id": "80000001-1234567890",
            "fullName": "Jane Doe"
          },
          "customFields": [
            {
              "ownerId": "0",
              "name": "Customer Rating",
              "type": "string_1024_type",
              "value": "Premium"
            }
          ]
        }
      ],
      "customFields": [
        {
          "ownerId": "0",
          "name": "Customer Rating",
          "type": "string_1024_type",
          "value": "Premium"
        }
      ]
    }
  ],
  "customFields": [
    {
      "ownerId": "0",
      "name": "Customer Rating",
      "type": "string_1024_type",
      "value": "Premium"
    }
  ]
}