In-app Billing Overview

Source: Internet
Author: User

This document explains the basic components and functions of the In-app billing, which you need to understand in order to be able to add In-app billing functionality to your program.

Note : Ensure that your application complies with the laws of the country where it is posted. For example, in countries such as the European Union, the Unfair Commercial practices Directive laws prohibit direct referral to children for advertising, as well as persuading their parents or other adults to buy the advertised goods for children. To learn more about this and other things you can refer to position of the EU consumer protection authorities.

In-app Billing API

Your app accesses the In-app billing service via the API provided by the Google Play program installed on your device. The Google Play app delivers your purchase request and response between your app and Google Play server. In fact, your app never communicates directly with Google Play servers. Instead of managing any network connection between it and Google Play server, your application sends billing requests and receives responses to Google Play programs through interprocess communication (IPC).

In-app billing can only be implemented with apps published on Google Play. In order to complete the In-app purchase request, the Google Play program must be able to access the Google Play server over the network.

In-app Billing version 3 is the latest version and has been widely compatible with many Android devices. Devices that run Android 2.2 and above and that have the latest Google Play store (a vast majority activation device) support In-app billing version 3.

Version 3 feature features
    • Sending requests through a streamlined API makes it easy to get product details from Google Play, In-app items, and quickly store items based on what users have. Note 1
    • The order information is transferred to the device synchronously after the purchase is completed.
    • All purchases are "managed" (that is, Google play keeps track of user ownership of In-app products). The user may not have more than one In-app item, and at any time the user can only have one item. NOTE 2
    • Purchased items can be consumed. When consumed, this item reverts to the "not owned" status and can be purchased again from Google Play.
    • Provides support for subscribing to product subscriptions.

For more information about other versions of In-app billing, refer to version Notes.

In-app Products

In-app merchandise is a digital product that you provide within your program to sell to your users. For example, digital goods include in-game currency, enhanced app feature upgrades for user experience, and new content for your app.

You can only sell digital content with In-app billing, you can't sell other physical items, personal services, or anything else that needs to be physically transported. Unlike charging applications, once a user buys a In-app product, the refund window does not appear in the program.

Google Play does not provide any form of content delivery, and you are responsible for delivering the digital content of your in-app sales. In-app products are usually explicitly associated with one and only one application. In other words, an application cannot purchase In-app items that are posted on other applications, even if they are from the same developer.

Product Type

Supporting multiple commodity types provides a great flexibility for how your program makes money. In any case, you'll need to set up your product on the Google Play developer console (Google Play Developer console).

For your In-app billing program, you can specify the type of merchandise-managed In-app goods and subscription items (managed In-app products and subscriptions). Google Play processes and tracks the ownership of each user account for In-app items and subscription items on your program. Learn more about the types of products supported by In-app billing Version 3.

Google Play Developer Console

You can publish your In-app billing app in the developer console and manage a variety of items that you can buy in your program.

You can create a list of items associated with your app, including items that can be purchased at once and subscriptions that can be purchased multiple times. For each item, you can define such information as the item's unique Product ID (also known as SKU), commodity type, price, description and how Google Play handles and tracks purchases of items.

You can also create a test account to authorize the test account to enter your unpublished app.

To find out how to use the developer console to configure your In-app merchandise and merchandise list, see administering In-app Billing.

Google Play Purchase Process

Google Play uses the same billing backend services as app purchases, so it will maintain a consistent and familiar user experience on the purchase process.

Important: using the In-app billing service on Google Play requires a Google Payment account (Google payments merchant accounts).

When you initialize a purchase, your app sends a billing request for a specified In-app product. Google Play then processes all settlement details of the transaction, including the way to request and confirm payment, and the processing of financial transactions.

When the checkout process was complete, Google Play sends your app purchase details such as order number, order date and time, and payment price when the settlement is completed. Your app doesn't have to deal with any financial transactions at all, and Google Play does it for you.

Example

To help you integrate In-app into your app, the Android SDK provides a sample program that demonstrates how to sell in-app goods and subscribe to a product in one app.

Trivialdrive Sample for the version 3 API example demonstrates how to use In-app billing Version 3 for a driving game to achieve In-app merchandise and subscribe to the purchase of goods. This app shows how to send a In-app billing request and handle a sync response from Google Play. The app also demonstrates how to use the API to record the consumption of items. This example, using version 3, includes easy-to-use classes for handling In-app billing operations, as well as automatic signature authentication. Note 3

recommendation : It's a good idea to confuse your code before publishing your app. For more information, refer to Security and Design.

Migration considerations

The In-app billing Version 2 API is deprecated and will be terminated in January 2015. (Translator Note: Now July, very early stop, the official this tutorial has not been updated) if you are currently using the V2 version of In-app or earlier, you must migrate to V3 In-app billing version 3.

If you have already published an app for selling in-store items, please note that:

    • The managed items and subscription items you previously set up in the developer console will be the same as before with V3 payments, without changes.
    • When you use V3 to pay for items that are not managed in an existing program, these items are treated as managed items and you do not have to create new items in the developer console for these items, and you can still purchase them using the same product ID. If you use V2 or an earlier payment to purchase these items, they will still be treated as non-managed items.

Note 1: Original requests is sent through a streamlined API that allows the request product details from Google Play, easily R In-app Products, and quickly restore items based on users ' product ownership this sentence is very bad, please guide.

Note 2: Original The user cannot own multiple copies of an IN-APP item; Only one copy can is owned at any point in time how to translate

Note 3: Original version 3 sample includes convenience classes for processing In-app billing operations as well as perform automa TIC Signature Verification.

Two trials first, plays in the back ~~~~~

In-app Billing Overview

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.