Jump to content

Which query to use for getting a customer's credit balance


This topic is 980 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Can someone please steer me in the right direction for getting the current available credits balance of a customer?

I have Credit Memos and Invoices being created in QB Desktop via the plugin and the next step is to apply any balance of available credits or partial payments to an invoice when generating it. I think I figured out how to do that but after looking at Intuits Developers API documentation online I'm not sure how to just request a balance. Is the General Summary Report query where I need to start?

Thanks in advance!

-Kent

Link to comment
Share on other sites

Interesting question. GeneralSummaryReport won't have the detail you need, and I don't have a definitive answer on whether a GeneralDetailReport can address this. I suspect it would because it's really flexible, and might well be the answer if you're good at setting up the query and even better at parsing the response. Last time I checked, the plug-in functions that would simplify parsing a General Report response didn't work as expected. If you know how to use xPath filtering, however, the General Reports are amazingly useful and might well fit the bill.

You can't use the CreditMemoQueryRq and ReceivePaymentQueryRq to get you there directly because neither query allows you to filter for a balance—CreditRemaining and UnusedPayment elements, respectively. You could, however, run the CreditMemoQueryRq and ReceivePaymentQueryRq queries and parse the XML response using xPath filtering to identify only the CreditMemos and ReceivePayments where CreditRemaining and UnusedPayment values are > 0. That would have a shorter learning curve than parsing a General Report Response.

Regardless of your method for identifying unused credits and payments, you'd then create a ReceivePaymentModRq or ReceivePaymentAddRq request to applied the ReceivePayment and/or CM ( you can't apply the CM directly, it's done via ReceivePayment ) to the new Invoice(s). Applying payments via the API requires some skilled juggling, as there are potentially a lot of balls in the air—think about discounts, CreditMemos, short pays, etc.

HTH!

Geoffrey Gerhard
Creative Solutions Incorporated
14000 Creekside Drive
Matthews, NC 28105
704.814.6852

Link to comment
Share on other sites

Thanks Geoffrey, that's very helpful in getting me started. Intuit's QB Desktop API Reference documentation on getting balances is not very helpful.

Cheers! -Kent

Link to comment
Share on other sites

This topic is 980 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.