Get 50% OFF QuickBooks for 3 months*

Buy now
cancel
Showing results for 
Search instead for 
Did you mean: 
Announcements
Simplify payday and set payroll to run automatically on QuickBooks. Explore QuickBooks Payroll

Reply to message

View discussion in a popup

Replying to:
Aigars Lapins
Level 1

Apply Bank Deposit to and Invoice using API

Hi,

 

I am integrating an external system with Quickbooks Online, and I am struggling to make Quickbooks apply a deposit to an invoice through API. I followed this documentation article:

https://quickbooks.intuit.com/learn-support/en-uk/help-article/service-items/record-customer-prepaym...

I can do the application through the Quickbooks Online user interface using those instructions. The application is basically a 0 amount payment that has the invoice selected in the Outstanding Transactions and the Deposit in the Credit section. To see how this transaction looks I used Get Payment API call and I get this example:

{
  "Payment": {
    "CustomerRef": {
      "value": "69"
    },
  "TotalAmt": 0,
  "TxnDate": "2023-12-21",
  "CurrencyRef": {
    "value": "GBP",
    "name": "British Pound Sterling"
  },
  "Line": [
    {
      "Amount": 72.00,
      "LinkedTxn": [
        {
          "TxnId": "249",
          "TxnType": "Invoice"
        }
      ]
    },
    {
      "Amount": 72.00,
      "LinkedTxn": [
        {
          "TxnId": "248",
          "TxnType": "Deposit"
        }
      ]
    }
  ]
  }
}

 

When I try and send a similar Payment through the API I get this error: "A business validation error has occurred while processing your request - Business Validation Error: The Amount Received (plus credits) can't be less than the selected charges. Also, the selected charges can't be less than the selected credits."

By poking around, I discovered that the API is ignoring the TxnType=Deposit Line and when I checked the Payments documentation I didn't see Deposit as a valid TxnType option there. So technically, I understand that it could ignore the Deposit application line.

The question then is - how can I do the application between Deposit and Invoice through the API?

If there is no way, then my suggestion would be to make the API handle the same scenario as the documentation suggests and as the user interface can handle - process the Deposit transaction type in the Lines of the Payment.

 

This deposit application setback is the last thing for me to launch the integration so hoping for a quick response.

 

Aigars Lapins

Garage Hive

 

PS: Some text because of error: Post flooding detected (community received posts of a unique message more than 1 times within 3,600 seconds)

Need to get in touch?

Contact us