Sunday, November 22, 2009

Checkout Check

I'm just finishing up a new app that's probably the first one I've designed and built specifically for my own personal needs. It's called Checkout Check and it's an interface to Google Checkout that lets you generate simple sales reports. Here are some screens:

Here was the problem: If I want to see what my sales in the Android Market are for a given day or date range, I can log in either from the browser on my PC or on my G1. On the browser, the cookies make the login a two-step process. On the phone it's an additional step and each page that loads is quite slow. Either way, there is no way to sort sales for a given day based on the name of the app. You can export a summary to an .xsl file, but get can't export orders with the name of the app!

Let's say I sold 45 apps on a given day and I want to record the sales. If I want to know how many copies of each app I sold, I have to load up the market interface in the browser and manually count them. And like I said, you can't even sort them by app name. As my sales continue to increase, this becomes increasingly tedious.

So I've developed an app that let's me select a date range and an order state and generate a simple report that details the name of each app, the number sold, the gross revenue, and net revenue, and totals for everything. It's kind of amazing to me that I'm not able to generate such a report through the official market interface.

And let me tell you, it wasn't easy using the Google Checkout API, either. There's a Notification API, which works in real time to notify you of any changes to your account, a Notification History API, which allows you to get information on past notifications, and an Order Report API, which generates reports on orders.

But here's the thing...from what I could tell, only new order notifications contain information regarding item name. So what I had to do was send a query to the server for all the new orders for a given time range, returning order number and item name, then send another query for an order report for the given time range, which contained order number, status (CHARGED, CANCELLED, etc.), and cross-index the two to generate a report with the information I wanted. Sounds fun, huh? Because who would actually want to generate a report with the name of the items they're selling, right?

Anyway, it works. Sort of. It's a bit slow, but right now it's reliably fetching sales information for a single day for charged transactions. I'm still having some issues with other order states, and I'm also getting errors when I search for time ranges over a day.

Another fun property of the Notification History API is that you can only fetch 50 orders at a time. If a query return is longer than 50 orders, what you get is an XML response with 50 orders and a next-page-token. You have to send another query using that token to get the next page, and so on for every 50 orders. I'm probably either getting a time-out error or an issue with memory for queries longer than a day, but hopefully I'll figure that out soon.

Anyway, I know I'll find it useful, and I hope other Android devs do as well. I'm sticking ads in it to hopefully generate a little revenue. If the ad revenue just isn't worth it, I'll likely just open-source it and see if other devs can help make it better. Also, right now it only supports transaction fee structures for Android merchants. Google takes 30% per transaction for Android apps, but the normal cut for Google Checkout is a tiered structure, depending on your monthly revenue. For non-Android transactions they take a small percentage and a flat fee for every transactions, and the fee gets smaller the larger your monthly transaction total. If there's enough interest and demand I'll probably augment the app to handle non-Android app transactions, but there's no need to do that right now. Besides, non-Android merchants can still use the app to get a summary of units sold and gross revenue.

1 comment:

  1. Hi Derek,
    Great app! I appreciate it. I have been looking for something just like this. I was going to knock something together too until I dug into the Google checkout API and my eyes glazed over :)

    Anyway, the only suggestion I would make is for it to remember the last status (I prefer to look at Chargeable). Also possibly have an alternate search that it remembered so you could just have something like "last 3 days" rather than a date range.

    Finally, the ultimate would be to throw the results onto a widget.

    Keep up the good work, this really is a most helpful app.