background preloader

Billing

Facebook Twitter

Android - In-app purchase with multiple user accounts. In-App Billing Version 3. Posted by Bruno Oliveira of the Android Developer Relations Team In-app Billing has come a long way since it was first announced on Google Play (then Android Market). One year and a half later, the vast majority of top-grossing apps on Google Play use In-app Billing and thousands of developers monetize apps through try-and-buy, virtual goods, as well as subscriptions.

In-app Billing is expanding again, making it even more powerful and flexible so you can continue to build successful applications. Version 3 introduces the following new features: An improved design that makes applications simpler to write, debug and maintain. In-app Billing version 3 is available now and lets you sell both in-app items and (since February 2013) subscriptions, including subscriptions with free trials. Easier to Implement To launch a purchase, simply obtain a buy Intent from the API and start it: Bundle bundle = mService.getBuyIntent(3, "com.example.myapp", MY_SKU, ITEM_TYPE_INAPP, developerPayload); Subscriptions. Subscriptions let you sell content, services, or features in your app with automated, recurring billing. You can easily adapt an existing In-app Billing implementation to sell subscriptions.

This document is focused on highlighting implementation details that are specific to subscriptions, along with some strategies for the associated billing and business models. Overview of Subscriptions A subscription is a product type offered in In-app Billing that lets you sell content, services, or features to users from inside your app with recurring monthly or annual billing. You can sell subscriptions to almost any type of digital content, from any type of app or game.

As with other in-app products, you configure and publish subscriptions using the Developer Console and then sell them from inside apps installed on Android devices. When users purchase subscriptions in your apps, Google Play handles all checkout details so your apps never have to directly process any financial transactions. Refunds.

In-app Subscriptions in Google Play. [This post is by Ibrahim Elbouchikhi, Product Manager on the Google Play team. —Dirk Dougherty] We launched In-app Billing on Google Play a year ago to give developers more ways to sell and engage users over the lifetime of their apps. Since the launch, In-app Billing has been extremely successful in helping developers monetize their apps through try-and-buy, virtual goods, upgrades, and other popular business models. Today, 23 of the 24 top-grossing apps in Google Play use In-app Billing, and the total revenue generated from in-app purchases exceeds revenue from traditional app purchases. We’re now taking In-app Billing further by adding another important business model — subscriptions.

Starting today, developers can use In-app Billing to sell monthly or annual subscriptions from inside of their apps. All subscriptions are auto-renewing, for every app and game and every type of subscription product. You can publish your updated apps and subscription products as soon as you are ready. I/O 2011. Google Play In-app Billing. In-app Billing is a Google Play service that lets you sell digital content from inside your applications. You can use the service to sell a wide range of content, including downloadable content such as media files or photos, virtual content such as game levels or potions, premium services and features, and more. You can use In-app Billing to sell products as Subscription Upgrade/Downgrade—A user can subscribe to a higher or lower tier of subscription while their current subscription is active. The old subscription is canceled, and the unused portion is applied on a pro-rated basis to the new subscription.

Standard in-app products (one-time billing), orSubscriptions (recurring, automated billing) When you use the in-app billing service to sell an item, whether it's an in-app product or a subscription, Google Play handles all checkout details so your application never has to directly process any financial transactions. Overview Version 3 API Security and Design Testing In-app Billing. Subscriptions or recurring charges - Android Developer Help. In-app billing API now supports recurring charges and subscription billing. The new subscription feature will allow you to charge users on a monthly or annual basis for content or services. You can also offer subscription trials to your users.

The subscription feature may be configured within the Google Play Developer Console, and available for purchase on all Google Play clients above version 3.5+. Subscriptions are only available in countries which support in-app billing. If user cancels a subscription, they are not granted a refund. Create a Subscription for your App The in-app billing version 3 API has been expanded to support in-app subscriptions. Adding a subscription is very similar to a regular in-app product, except the price is set to be per month or per year, and the type of in-app item is Subscription. Subscription Trials If you would like to offer subscription trials to your users, you would need to set a trial duration per subscription SKU.

Additional Resources. Security and Design. As you design your In-app Billing implementation, be sure to follow the security and design guidelines that are discussed in this document. These guidelines are recommended best practices for anyone who is using Google Play's In-app Billing service. Security Best Practices Perform signature verification tasks on a server If practical, you should perform signature verification on a remote server and not on a device. Implementing the verification process on a server makes it difficult for attackers to break the verification process by reverse engineering your .apk file. If you do offload security processing to a remote server, be sure that the device-server handshake is secure. Protect your unlocked content To prevent malicious users from redistributing your unlocked content, do not bundle it in your .apk file. Use a real-time service to deliver your content, such as a content feed. Obfuscate your code Inline methods into other methods.

-keep class com.android.vending.billing. Testing In-app Billing. The Google Play Developer Console provides several tools that help you test your In-app Billing implementation: Test purchases, which let license-test users purchase your published in-app items, without any actual charges to their accounts.Static billing responses from Google Play, for testing in early development To test in-app billing, you need to publish your app to an alpha or beta channel in Google Play.

After you publish an app to an alpha or beta channel, it can take a few hours for the app to be available for testers. The version code of an APK on a test device must match the version currently uploaded to the alpha or beta channel on Google Play. Important: To test in-app products or make in-app purchases in your alpha or beta channel app, each tester needs to opt-in to your app’s alpha or beta test. You can test on any Android-powered hardware device running Android 1.6 or higher. Testing In-app Purchases Test Purchases (In-app Billing Sandbox) Setting up test purchases. Implementing In-app Billing <span style="font-size:16px;">(IAB Version 3)</span> In-app Billing on Google Play provides a straightforward, simple interface for sending In-app Billing requests and managing In-app Billing transactions using Google Play. The information below covers the basics of how to make calls from your application to the In-app Billing service using the Version 3 API.

Note: To see a complete implementation and learn how to test your application, see the Selling In-app Products training class. The training class provides a complete sample In-app Billing application, including convenience classes to handle key tasks related to setting up your connection, sending billing requests and processing responses from Google Play, and managing background threading so that you can make In-app Billing calls from your main activity. Before you start, be sure that you read the In-app Billing Overview to familiarize yourself with concepts that will make it easier for you to implement In-app Billing. Add the In-app Billing library to your project. Purchasing an Item.