quickbooksquickbooks-online

Quickbooks Online API, How to Post Negative Journal Items


I am posting data to QBO API from my system, and all transactions are posted to as a JournalEntry. In normal accounting it is common to post negative journal entries, but when I attempt to do that through the API, I get Error 2290, Negative amount not supported on transaction line. How can I bypass this as it seems like a very common use case?

You can reproduce the error from the QBO API here: https://developer.intuit.com/app/developer/qbo/docs/api/accounting/all-entities/journalentry

{
  "Line": [
    {
      "JournalEntryLineDetail": {
        "PostingType": "Debit", 
        "AccountRef": {
          "name": "Opening Bal Equity", 
          "value": "39"
        }
      }, 
      "DetailType": "JournalEntryLineDetail", 
      "Amount": "-100.0", 
      "Id": "0", 
      "Description": "nov portion of rider insurance"
    }, 
    {
      "JournalEntryLineDetail": {
        "PostingType": "Credit", 
        "AccountRef": {
          "name": "Notes Payable", 
          "value": "44"
        }
      }, 
      "DetailType": "JournalEntryLineDetail", 
      "Amount": 100.0, 
      "Description": "nov portion of rider insurance"
    }
  ]
}

The error:

{
 "responseHeader": {
  "status": 400,
  "message": "",
  "intuitTid": "1-653f9b94-4d7cf9f5129c893b74025b8c",
  "realmID": "4620816365234297530"
 },
 "response": {
  "Fault": {
   "Error": [
    {
     "Message": "Amount is invalid",
     "Detail": "Negative amount -100 not supported on a transaction line",
     "code": "2290",
     "element": "Line.Amount"
    }
   ],
   "type": "ValidationFault"
  },
  "time": "2023-10-30T05:03:32.257-07:00"
 }
}

Solution

  • I'm writing this answer because I have not found a different solution, and after manually going to my QBO dev account and posting a negative Journal Entry, here is what happens.

    I am creating a Journal Entry in Quickbooks that has 4 line items that are all negative. The accounts I use are "Undeposited Funds" for the Credits and "Prepaid Expenses" for the Debits.

    image showing negative journal entries

    Then, when I click "Save" at the bottom, the values are updated in the Quickbooks Journal Entry to show that the negative Credits for "Undeposited Funds" are now positive Debits and vice-versa for "Prepaid Expenses".

    image showing swap of debit and credit

    So what is apparent here is that in Quickbooks Online, for whatever reason, negative Journal Entries are posted as swapped Debit/Credit entries.

    This seems off to me as nearly every accounting team I have spoken with needs negative journal entries, not just swapped credit/debits (although I suppose it equates to the same total). I think this is the only way with Quickbooks Online though.