7

With Google retiring the old iframe version in March 2015 we have to switch to the in-app payment route for our extension.

How can we implement repeated purchases of the same product? I see you use the

google.payments.inapp.getPurchases({...

However in our case the user should be able to purchase the same product multiple times. The thought here was just relying on the server postback but it looks like they are removing that too?

{
  "response": {
    "details": [
      {
        "kind": "chromewebstore#payment",
        "itemId": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
        "sku": "giant_tv",
        "createdTime": "1387221267248",
        "state": "ACTIVE"
      }
    ]
  }
}

I must be missing something here, why would Google not implement a way to allow repeated purchases of the same sku or at least allow us to tag the purchase with additional information?

Xan
  • 74,770
  • 16
  • 179
  • 206
artfulhacker
  • 4,823
  • 1
  • 37
  • 31
  • 2
    Last month I was called by the Google Wallet team. They offered help for finding alternatives to Google Wallet for digital goods. If you want assistance from them, call +1 855-492-5538 . – Rob W Dec 06 '14 at 22:34

1 Answers1

1

For complete information on the new payments API see: https://developer.chrome.com/webstore/payments-iap

To answer your question, purchases for the same SKU will only be accepted if you first call

google.payments.inapp.consumePurchase and pass in the SKU that matches a product the profile/user already owns. This is similar to how the Google Play API works.

Steve B
  • 212
  • 1
  • 8
  • really glad to see this was finally added. it should have been done before dropping wallet though. we switched to stripe and couldn't be happier with it. – artfulhacker Feb 08 '16 at 14:13