How To Quickly Monetize Your Chrome Browser Extension (Google Wallet In-App Payments Implementation)

So you finished your app or browser extension and now would like to implement a payment system for in-app purchases. You want to sell extra features or virtual goods, but you don’t know where to start. There are many choices and a lot of the implementation seems daunting.

No worries. Google Payments to the rescue! With it, you can immediately start accepting in-app purchases. Furthermore, Google Payments and the Chrome Web Store will keep track of the user for you, so no matter which computer your user uses, your extension will always be able to recognize what he has already bought!

Below we will walk through the basic steps.

image

First, the prerequisites.

  • Your extension has been uploaded to the Chrome Web Store Developer Dashboard.
  • You have a Google Wallet Merchant account connected (it is automatically connected when you create a merchant account using the same login as the one you use for the Developer Dashboard).

Now let’s get to the steps.

Step 1) In the EDIT page of the app/extension in your dashboard, add the items to the “In-app products” tab (and make sure they are activated).

You can set the items as one-time purchase or subscription items.

Step 2) include the buy.js JS file in your app/extension package and remember to include it in the manifest.
To get a list of the items within your app/extension, call the getSkuDetails method and to initiate a buy, call the buy method.

Step 3) To check if your user has already purchased the item, call the getPurchases and see if the item is still listed and is “ACTIVE”. If it is a virtual good like a game item and your user uses the purchase up, you can call

the consumePurchase method

to remove the item from the user.

For more detailed explanation of the steps and parameters, see this page (I’m including the URL as this page is hard to find): https://developer.chrome.com/webstore/payments-iap

Here is a complete working sample code provided by Google Chrome: https://github.com/GoogleChrome/chrome-app-samples/tree/master/samples/managed-in-app-payments

See the payment flow in action now!

Our recent Chrome browser extension Twinword Finder implements this payment method. Users can easily pay through Google Payments to upgrade our extension to a PRO Paid version. We don’t handle any payments (whew!), Google does it all.

To see the payment flow in action, after installing the extension, open it, click on the settings icon, and click PRO Paid in the Upgrade options to see the Google Wallet window invoked.

 

image

 

One Response to “How To Quickly Monetize Your Chrome Browser Extension (Google Wallet In-App Payments Implementation)

  • Thank you for this article…

    I found it because my own Extension’s purchase flow (in-app subscription) isn’t working…I spent a day or more trying to figure out what has changed…then thought to find other apps…

    I didn’t realize that most Extensions are free…so maybe there aren’t a lot of in-app purchase solutions out there.

    Anyway, you’re seeing the same issue – a 401 error when a user tries to go to a paid subscription.

    I have a ticket into CWS, but I was alerted to this about 5 days ago by a customer trying to make a purchase. So it doesn’t look like it’s receiving much love from Google. Totally irresponsible and horrible on their part…

Comment Below

Your email address will not be published. Required fields are marked *