Can I purchase with Google In-App but refund via Google Checkout API?

172 views
Skip to first unread message

Matt Au

unread,
Apr 27, 2012, 5:36:57 AM4/27/12
to in-app-...@googlegroups.com, m...@livegamer.com, ds...@livegamer.com
Hi,
 
Is it possible to use the google checkout API to refund, when the purchase is made via Google In-App API?  We want an integrated solution for refund and notification, but also want the look-and-feel of the Google-InApp purchase flow.  Since Google In-App is just a wrapper around Google checkout (the merchant console is the same), i would imagine it is possible.  I was going down this path, and it seems that the Google In-App "seller secret" is the same as the Google checkout "merchant key", so that would appear to be further proof there is some sort of relationship between the two API.
 
Unfortunately, this is where I am stuck.  On the purchase notification from Google in app, I get back the order id inside the decoded json. See: https://developers.google.com/in-app-payments/docs/tutorial#5
 
Specifically, this is sample json i get back from a callback:
{"iss":"Google","request":{"price":"1.2","currencyCode":"USD","name":"1 to 10 Scoobies","description":"","sellerData":"dT0xMDA1JmM9MTAwNiZwPTEwMTUmc2lnPTg2NWFmOGNlZTc3ZjUwYTc2ZjY0MDRkMzA2NjhkOGE1","sku":""},"response":{"orderId":"07743248137569471886.C.1604292102195591"},"typ":"google/payments/inapp/item/v1/postback/buy","aud":"00281938835127256767","iat":1335518818,"exp":1335518838}
 
It appears that this "orderId" is not the google order number that is shown in the Google Merchant tool, and I would guess it will not be the google order number needed for refund using the google checkout api, specifically the order processing api. See: https://developers.google.com/checkout/developer/Google_Checkout_XML_API_Financial_Commands#Refund_Order
 
I've attached a screen capture of what I see in the merchant tool.  In the order, I've boxed the 2 numbers.  The Google order number, which is needed for Google checkout order processing api, does not seem to be returned in the notification from google in app purchase.  The order id that is returned in the jwt json, seems to have no direct relationship with the Google order number, and is labeled "Live Gamer order number" in the screen shot.
 
So is what I am trying to do possible?  Is there a way to go from this in-app order id to the google order number?  Why are the 2 order numbers different?  Are there other ways to do what I'm trying to do, which is to programmatically refund a purchase made via in-app purchase?
 
Thanks,
-Matt
google_checkout_order_ids.png

Mihai Ionescu

unread,
Apr 27, 2012, 12:17:49 PM4/27/12
to in-app-...@googlegroups.com, m...@livegamer.com, ds...@livegamer.com
Hi Matt,

Right now In-App refunds can be processed manually through the Merchant Center. 
As you point out, an automated refund solution is an important feature and it is on our todo list.

Thanks,
Mihai

Raymond Wilson

unread,
Oct 22, 2012, 1:51:14 PM10/22/12
to in-app-...@googlegroups.com, William Cross

We need to automatically get the data from In-App Purchases into our database.  How would we go about doing this?

Mihai Ionescu

unread,
Oct 22, 2012, 5:36:10 PM10/22/12
to in-app-...@googlegroups.com, William Cross
Hi Raymond, 

You can keep your internal transactions database in sync in a couple of ways.

1. When you receive the postback (after each successful in-app transaction) save the transaction info and the order id in your internal database.

2. You can retrieve previous order information in CSV format from the Merchant Center. Under the Orders tab, click on "Download data to spreadsheet" and select the date range.

Thanks,
Mihai

Vitaly Smyk

unread,
Oct 22, 2012, 5:37:41 PM10/22/12
to in-app-...@googlegroups.com

Hi.
Does this download data will contains developer payload?

Mihai Ionescu

unread,
Oct 22, 2012, 5:48:03 PM10/22/12
to in-app-...@googlegroups.com
Hi Vitaly,

The private merchant data (i.e. sellerData field) is not cached and thus not available for later download. 
It is available only in the postback:

Thanks,
Mihai

Vitaly Smyk

unread,
Oct 22, 2012, 5:52:13 PM10/22/12
to in-app-...@googlegroups.com

Yes! But what more stupid for android app In post back URL can not be specified.

Mihai Ionescu

unread,
Oct 22, 2012, 6:44:03 PM10/22/12
to in-app-...@googlegroups.com
Hi Bill,

We are in the process of adding Analytics support for in-app merchants. The video below has more insights:


You can sign up for the beta at: http://goo.gl/Z4HvI

Thanks,
Mihai

On Mon, Oct 22, 2012 at 3:24 PM, William Cross <wcros...@gmail.com> wrote:

Do data elements generated by In-App purchase transactions automatically populate into Google Analytics and of not how so we get the data into Google Analytics?

Thanks much!

-Bill Cross

Reply all
Reply to author
Forward
0 new messages