Skip to content

Latest commit

 

History

History
21 lines (11 loc) · 1.6 KB

File metadata and controls

21 lines (11 loc) · 1.6 KB

Overview of Chrome In App Payments API

You can use the Chrome In-App Payments API (Chrome IAP API) to sell digital and virtual goods within a Chrome App. When you use the Chrome IAP API, the Chrome In-App Payments Service (embedded in Chrome) communicates with the Google Wallet servers and handles all the required checkout details so your app does not have to process any financial transactions. The actual integration work to enable in app payments is similar to using the Google Wallet digital goods API for websites except that the Chrome IAP API requires you to embed a piece of JavaScript (buy.js) within your app to trigger the payment flow.

Sample app

Here’s a sample app that calls into the Chrome IAP API and provides options to trigger payments via the sandbox server as well as the production server:

https://github.com/GoogleChrome/chrome-app-samples/tree/master/in-app-payments

The above sample app has been published on the webstore - you can install it on Chrome Canary or Dev channel and try out the in-app-payment flows:

https://chrome.google.com/webstore/detail/moldiohggmfllblgmikpeoagipenlcae

When testing with the sandbox, you can use the following credit card numbers, which pass basic checks by the Google Wallet for digital goods system:

https://developers.google.com/commerce/wallet/digital/docs/testing

Screenshot

screenshot