Tag Archives: billing

The Invoice Service of Google Ads API is out of beta

The InvoiceService is now available for all API users starting with version 6 of the Google Ads API. Earlier API versions will continue to only support this service for allowlisted accounts.

This service retrieves the monthly invoices of Google Ads accounts. Each returned Invoice comes loaded with data (for example: adjustments, regulatory costs, taxes, account budgets) and can be downloaded as a PDF file. Google Ads manager accounts can use the data to automatically reconcile customer invoices. To get started, read through our dedicated guide.

If you have any questions or need additional help, contact us through the forum or at [email protected].

Listening to developer feedback to improve Google Play

Developers are our partners and by pairing their creativity and innovation with our platforms and tools, together we create delightful experiences for billions of people around the world. Listening carefully to their feedback is an important part of how we continue to make Android better with each release and improve how mobile app stores work. In an April 2019 blog post we shared some updates we made to Android APIs and Play Policies based on developer feedback. And today, we wanted to share some additional insights we’ve gained from developer feedback and how we’re taking that input to improve Google Play and Android. Some of the key themes we’ve heard include:

  • Supporting developers’ ability to choose how they distribute their apps through multiple app stores on different platforms (mobile, PC, and console), each with their own business model competing in a healthy marketplace;

  • Clarifying our policies regarding who needs to use Google Play’s billing system and who does not;

  • Ensuring equal treatment for all apps, including first-party and third-party apps, on our platforms;

  • Allowing developers to connect and communicate directly with their customers;

  • Enabling innovation and ensuring our policies embrace new technologies that can help drive the consumer experience forward.

We’d like to share our perspective on each of these points.

Choice of stores

We believe that developers should have a choice in how they distribute their apps and that stores should compete for the consumer’s and the developer’s business. Choice has always been a core tenet of Android, and it’s why consumers have always had control over which apps they use, be it their keyboard, messaging app, phone dialer, or app store.

Android has always allowed people to get apps from multiple app stores. In fact, most Android devices ship with at least two app stores preinstalled, and consumers are able to install additional app stores. Each store is able to decide its own business model and consumer features. This openness means that even if a developer and Google do not agree on business terms the developer can still distribute on the Android platform. This is why Fortnite, for example, is available directly from Epic's store or from other app stores including Samsung's Galaxy App store.

That said, some developers have given us feedback on how we can make the user experience for installing another app store on their device even better. In response to that feedback, we will be making changes in Android 12 (next year’s Android release) to make it even easier for people to use other app stores on their devices while being careful not to compromise the safety measures Android has in place. We are designing all this now and look forward to sharing more in the future!

Clarity on billing policies

As we mentioned, each Android app store is able to decide its own business model and consumer features. For Google Play, users expect a safe, secure and seamless experience, and developers come to Play for powerful tools and services that help them build and grow their businesses. Our developer policies are designed to help us deliver on these expectations and Google Play's billing system is a cornerstone of our ongoing commitment. Consumers get the benefit of a trusted system that allows them to safely, securely, and seamlessly buy from developers worldwide. Google protects consumers’ payment info with multiple layers of security, using one of the world’s most advanced security infrastructures. For developers, Google Play’s billing system provides an easy way for billions of Android users to transact with them using their local, preferred method of payment.

We’ve always required developers who distribute their apps on Play to use Google Play’s billing system if they offer in-app purchases of digital goods, and pay a service fee from a percentage of the purchase. To be clear, this policy is only applicable to less than 3% of developers with apps on Google Play. We only collect a service fee if the developer charges users to download their app or they sell in-app digital items, and we think that is fair. Not only does this approach allow us to continuously reinvest in the platform, this business model aligns our success directly with the success of developers.

But we have heard feedback that our policy language could be more clear regarding which types of transactions require the use of Google Play’s billing system, and that the current language was causing confusion. We want to be sure our policies are clear and up to date so they can be applied consistently and fairly to all developers, and so we have clarified the language in our Payments Policy to be more explicit that all developers selling digital goods in their apps are required to use Google Play’s billing system.

Again, this isn’t new. This has always been the intention of this long standing policy and this clarification will not affect the vast majority of developers with apps on Google Play. Less than 3% of developers with apps on Play sold digital goods over the last 12 months, and of this 3%, the vast majority (nearly 97%) already use Google Play's billing. But for those who already have an app on Google Play that requires technical work to integrate our billing system, we do not want to unduly disrupt their roadmaps and are giving a year (until September 30, 2021) to complete any needed updates. And of course we will require Google’s apps that do not already use Google Play’s billing system to make the necessary updates as well.

Equal treatment

Our policies apply equally to all apps distributed on Google Play, including Google’s own apps. We use the same standards to decide which apps to promote on Google Play, whether they're third-party apps or our own apps. In fact, we regularly promote apps by Google’s competitors in our Editors Choice picks when they provide a great user experience. Similarly, our algorithms rank third-party apps and games using the same criteria as for ranking Google's own apps.

Communicating with customers

Developers have told us it is very important to be able to speak directly with their customers without significant restrictions. As app developers ourselves, we agree wholeheartedly and our policies have always allowed this.

That said, developers have asked whether they can communicate with their customers directly about pricing, offers, and alternative ways to pay beyond their app via email or other channels. To clarify, Google Play does not have any limitations here on this kind of communication outside of a developer’s app. For example, they might have an offering on another Android app store or through their website at a lower cost than on Google Play.

We understand the importance of maintaining the customer relationship. As such, we have also always allowed developers to issue refunds to their customers and provide other customer support directly.

Enabling innovation

Developers are coming up with cool things all the time. Using their feedback, we are always trying to adjust our approach to ensure that we continue to help enable new forms of innovation. For example, recent innovations in game streaming have generated new game experiences that are available on Google Play, including Microsoft’s recent launch of Xbox cloud gaming in the Xbox Game Pass Android app.

Keep the feedback coming

We really appreciate all the feedback we have received from our developer community and believe the Android ecosystem has never been a more exciting place to be.

It is exciting to see developers such as Duolingo, Truecaller, Hyperconnect, Any.do, and Viber be so successful and grow their business on Android and reach a diverse audience. These kinds of services delight consumers and we are thrilled to have built a platform that can support them.

We’ve also published some additional frequently asked developer questions here.

Posted by Sameer Samat, Vice President, Product Management


Listening to developer feedback to improve Google Play

Developers are our partners and by pairing their creativity and innovation with our platforms and tools, together we create delightful experiences for billions of people around the world. Listening carefully to their feedback is an important part of how we continue to make Android better with each release and improve how mobile app stores work. In an April 2019 blog post we shared some updates we made to Android APIs and Play Policies based on developer feedback. And today, we wanted to share some additional insights we’ve gained from developer feedback and how we’re taking that input to improve Google Play and Android. Some of the key themes we’ve heard include:

  • Supporting developers’ ability to choose how they distribute their apps through multiple app stores on different platforms (mobile, PC, and console), each with their own business model competing in a healthy marketplace;

  • Clarifying our policies regarding who needs to use Google Play’s billing system and who does not;

  • Ensuring equal treatment for all apps, including first-party and third-party apps, on our platforms;

  • Allowing developers to connect and communicate directly with their customers;

  • Enabling innovation and ensuring our policies embrace new technologies that can help drive the consumer experience forward.

We’d like to share our perspective on each of these points.

Choice of stores

We believe that developers should have a choice in how they distribute their apps and that stores should compete for the consumer’s and the developer’s business. Choice has always been a core tenet of Android, and it’s why consumers have always had control over which apps they use, be it their keyboard, messaging app, phone dialer, or app store.

Android has always allowed people to get apps from multiple app stores. In fact, most Android devices ship with at least two app stores preinstalled, and consumers are able to install additional app stores. Each store is able to decide its own business model and consumer features. This openness means that even if a developer and Google do not agree on business terms the developer can still distribute on the Android platform. This is why Fortnite, for example, is available directly from Epic's store or from other app stores including Samsung's Galaxy App store.

That said, some developers have given us feedback on how we can make the user experience for installing another app store on their device even better. In response to that feedback, we will be making changes in Android 12 (next year’s Android release) to make it even easier for people to use other app stores on their devices while being careful not to compromise the safety measures Android has in place. We are designing all this now and look forward to sharing more in the future!

Clarity on billing policies

As we mentioned, each Android app store is able to decide its own business model and consumer features. For Google Play, users expect a safe, secure and seamless experience, and developers come to Play for powerful tools and services that help them build and grow their businesses. Our developer policies are designed to help us deliver on these expectations and Google Play's billing system is a cornerstone of our ongoing commitment. Consumers get the benefit of a trusted system that allows them to safely, securely, and seamlessly buy from developers worldwide. Google protects consumers’ payment info with multiple layers of security, using one of the world’s most advanced security infrastructures. For developers, Google Play’s billing system provides an easy way for billions of Android users to transact with them using their local, preferred method of payment.

We’ve always required developers who distribute their apps on Play to use Google Play’s billing system if they offer in-app purchases of digital goods, and pay a service fee from a percentage of the purchase. To be clear, this policy is only applicable to less than 3% of developers with apps on Google Play. We only collect a service fee if the developer charges users to download their app or they sell in-app digital items, and we think that is fair. Not only does this approach allow us to continuously reinvest in the platform, this business model aligns our success directly with the success of developers.

But we have heard feedback that our policy language could be more clear regarding which types of transactions require the use of Google Play’s billing system, and that the current language was causing confusion. We want to be sure our policies are clear and up to date so they can be applied consistently and fairly to all developers, and so we have clarified the language in our Payments Policy to be more explicit that all developers selling digital goods in their apps are required to use Google Play’s billing system.

Again, this isn’t new. This has always been the intention of this long standing policy and this clarification will not affect the vast majority of developers with apps on Google Play. Less than 3% of developers with apps on Play sold digital goods over the last 12 months, and of this 3%, the vast majority (nearly 97%) already use Google Play's billing. But for those who already have an app on Google Play that requires technical work to integrate our billing system, we do not want to unduly disrupt their roadmaps and are giving a year (until September 30, 2021) to complete any needed updates. And of course we will require Google’s apps that do not already use Google Play’s billing system to make the necessary updates as well.

Equal treatment

Our policies apply equally to all apps distributed on Google Play, including Google’s own apps. We use the same standards to decide which apps to promote on Google Play, whether they're third-party apps or our own apps. In fact, we regularly promote apps by Google’s competitors in our Editors Choice picks when they provide a great user experience. Similarly, our algorithms rank third-party apps and games using the same criteria as for ranking Google's own apps.

Communicating with customers

Developers have told us it is very important to be able to speak directly with their customers without significant restrictions. As app developers ourselves, we agree wholeheartedly and our policies have always allowed this.

That said, developers have asked whether they can communicate with their customers directly about pricing, offers, and alternative ways to pay beyond their app via email or other channels. To clarify, Google Play does not have any limitations here on this kind of communication outside of a developer’s app. For example, they might have an offering on another Android app store or through their website at a lower cost than on Google Play.

We understand the importance of maintaining the customer relationship. As such, we have also always allowed developers to issue refunds to their customers and provide other customer support directly.

Enabling innovation

Developers are coming up with cool things all the time. Using their feedback, we are always trying to adjust our approach to ensure that we continue to help enable new forms of innovation. For example, recent innovations in game streaming have generated new game experiences that are available on Google Play, including Microsoft’s recent launch of Xbox cloud gaming in the Xbox Game Pass Android app.

Keep the feedback coming

We really appreciate all the feedback we have received from our developer community and believe the Android ecosystem has never been a more exciting place to be.

It is exciting to see developers such as Duolingo, Truecaller, Hyperconnect, Any.do, and Viber be so successful and grow their business on Android and reach a diverse audience. These kinds of services delight consumers and we are thrilled to have built a platform that can support them.

We’ve also published some additional frequently asked developer questions here.

Posted by Sameer Samat, Vice President, Product Management


Restricting Payments account usage across manager account hierarchies

Starting September 9, 2019, we are rolling out a change to prevent the same Payments accounts in the Google Ads API (billing accounts in the AdWords API) from being used across manager account hierarchies. Only valid Payments accounts belonging to the Google Ads manager account hierarchy can be used to create and update billing setups in the Google Ads API.

How does this affect you?
For your authenticated Google Ads client account Therefore, you may get fewer results from those API calls than before.

What do you need to do?
Google Ads API
When creating/updating a new billing setup, you will need to select a valid Payments account returned by PaymentsAccountService.ListPaymentsAccounts(). If you use an invalid Payments account during the above processes, the INVALID_PAYMENTS_ACCOUNT error will be thrown.


AdWords API
When creating a new budget order, you will need to specify a valid billingAccountId (the ID of a valid billing account returned by BudgetOrderService.getBillingAccounts()). If you use an invalid billingAccountId during the above process, the BudgetOrderError.INVALID_BILLING_ACCOUNT error will be thrown.

As always, if you have any questions, feel free to post your questions on the Google Ads API forum.

Advanced in-app billing: handling alternative purchase flows

Posted by Oscar Rodriguez, Developer Advocate

When designing and developing an app or game, at some point you may ask yourself if you want to monetize it.

If you choose to do so by selling products via Google Play, you will most likely have a store screen that shows available items for sale, and use the Google Play Billing Library to display dialogs that allow your users to complete their purchase.

While there is a more detailed explanation in the documentation and in the Billing Library TrivialDrive samples, the general flow is as follows:

  1. Call the launchBillingFlow() method from the UI thread to launch the Google Play purchase dialog.
  2. If the purchase was successful, Google Play calls the onPurchasesUpdated() method to deliver the result of the purchase operation.
  3. If your app has a server, we strongly recommend that you verify the purchase from your server by using the Subscriptions and In-App Purchases API.
  4. Acknowledge the purchase either with consumeAsync() for consumable items or with acknowledgePurchase() for non-consumable items.
  5. Finally, grant entitlement to the purchased item inside the app.

If your app is still using the Google Play Billing AIDL API, it is also possible to perform the same task. Keep in mind that the AIDL API is now deprecated, so we strongly recommend you migrate to the Google Play Billing Library as soon as possible.

If you are using the AIDL API, the flow is very similar:

  1. Send a getBuyIntent() or getBuyIntentExtraParams() request to specify the item to purchase, and then call startIntentSenderForResult() to launch the Google Play purchase dialog.
  2. When the purchase dialog finishes, Google Play sends a response Intent to your onActivityResult() method, where you can verify if the purchase was successful.
  3. If your app has a server, we strongly recommend that you verify the purchase from your server by using the Subscriptions and In-App Purchases API.
  4. If the purchase was successful, call the getPurchases() method to retrieve a list of owned items that are still not consumed. For consumable items, call the consumePurchase() method to make the item available for purchase again.
  5. Finally, grant entitlement to the purchased item inside the app.

Nevertheless, just implementing the above mentioned flow is not enough to correctly handle all types of purchases. There are two main cases in which purchases will not be correctly handled by this flow.

The first case happens when the purchase flow is interrupted before it finishes. The app may have crashed, the user may have killed the app, or the user’s Internet connection may have been lost. In any case, it is possible for the app not to have delivered the item to the user even though Google Play has already processed the payment. In this case, the item is in limbo, because Google Play will not allow an item to be re-purchased until it is consumed, but the app or game won’t consume the item outside of the flow mentioned above.

The second case happens during alternative purchase flows, such as in-app promotions, the recently announced out-of-app subscription surfaces, promo codes for subscriptions, or other promotions in collaboration with Google. In these cases, a user gets an item directly on the Play Store app, while the target app or game may be paused, not running, or even not installed.

For these cases, the Google Play Billing Library and the Google Play Billing AIDL API offer a mechanism to detect purchases that are not acknowledged or consumed.

When using the Google Play Billing API, do the following:

  1. In your app’s onResume() callback, call the queryPurchases() method to retrieve a list of items, so you can determine which ones are unacknowledged.
  2. If your app has a server, we strongly recommend that you verify the purchase from your server by using the Subscriptions and In-App Purchases API.
  3. If there are owned but unacknowledged items, acknowledge the purchase either with consumeAsync() for consumable items or with acknowledgePurchase() for non-consumable items.
  4. Grant entitlement to the purchased item inside the app.

For the Google Play Billing AIDL API, do the following:

  1. In your app’s onResume() callback, call the getPurchases() method to retrieve a list of owned items that are still not consumed.
  2. If your app has a server, we strongly recommend that you verify the purchase from your server by using the Subscriptions and In-App Purchases API.
  3. For consumable items, call the consumePurchase() method to make the item available for purchase again.
  4. Finally, grant entitlement to the purchased item inside the app.

In either case, when you detect and process an unconsumed item in this manner, users will expect the app or game to communicate about it. We suggest that you display a dialog, message box, or notification that tells the user that they have successfully received their item.

Keep in mind that your app’s onResume() callback will be called when its process is started, as well as when it is brought to the foreground, regardless of which screen the app or game was in before it was paused. For example, a game with a home screen, a store screen, and a game screen might get its onResume() called from any of those screens. For an optimal user experience, we suggest you make it so your app or game handles unacknowledged or unconsumed items regardless of the screen you display when onResume() gets called. Thorough testing of this process in each screen is crucial to deliver a great user experience.

Finally, there is one more case your app must handle: when a user acquires an item from the Play Store app, and both the Play Store app and your app are visible at the same time with multi-window mode.

To support this scenario with the Google Play Billing Library, do the following:

  1. Google Play calls the onPurchasesUpdated() method to notify your app that there is a new pending item.
  2. If your app has a server, we strongly recommend that you verify the purchase from your server by using the Subscriptions and In-App Purchases API.
  3. Acknowledge the purchase either with consumeAsync() for consumable items or with acknowledgePurchase() for non-consumable items.
  4. Finally, grant entitlement to the purchased item inside the app.

For the Google Play Billing AIDL API, do the following:

  1. In your app’s onResume() callback, register a PurchasesUpdatedListener to receive the com.android.vending.billing.PURCHASES_UPDATED intent. Also, in your app’s onPause() callback, unregister the listener.
  2. If your app has a server, we strongly recommend that you verify the purchase from your server by using the Subscriptions and In-App Purchases API.
  3. Google Play calls your listener to notify your app that there is a new pending item. Inside it, call the getPurchases() method to retrieve a list of owned items that are still not consumed. For consumable items, call the consumePurchase() method to make the item available for purchase again.
  4. Finally, grant entitlement to the purchased item inside the app.

Just as before, you should display a dialog, message box, or notification that tells the user that they have successfully received their item.

If you follow these steps, your app or game will be better prepared to robustly handle purchase flow interruptions and alternative purchase flows.

A better way to track your promotions on Google Play Billing

Posted by Neto Marin, Developer Advocate

Promotions can be a valuable tool to increase user engagement or attract new users by offering content or features to a limited number of users free of charge.

We are happy to share an improvement in the Google Play Developer API that makes it easier to track your promotions from your own backend. Starting today, the API for Purchases.products will return "Promo" as a new value for the field purchaseType when the user redeems a promo code. Now, the possible values are:

  • 0. Test (test purchases)
  • 1. Promo (Promo code redemption purchase)

For purchases made using the standard in-app billing flow, the field will continue to not be set in the API response.

Please note: This state is only returned by the Purchases.products API. For subscriptions you may use Free Trials to offer free of charge subscription periods.

For more details about how to create and redeem promo codes, check the In-app Promotions documentation. For more details about the server-side API, check the Google Play Developer API documentation.

Read-only access for BudgetOrderService in AdWords API

Starting this week BudgetOrderService get requests are available for all users, regardless of API version.

Previously, usage of this service was allowed on a whitelist-only basis. Now, you can retrieve your budget orders without being added to the whitelist. This enables you to view the account-level spending limit.

You still need to be whitelisted to modify your budget orders via the API; this new access applies only to viewing existing budget orders. Keep in mind that BudgetOrderService will only work on accounts that have been set up for consolidated billing; otherwise you will get an error.

To get started, check out the BudgetOrderService guide. If you have any questions about this change or other API features, please post on the forum.