Migrate from Google Play Billing
This page discusses the differences between Google Play Billing and Amazon's In-App Purchasing (IAP) solutions, and compares Amazon's available solutions.
- What are Google Play Billing and IAP?
- Amazon IAP solutions versus Google Play Billing
- Comparison of Amazon's IAP solutions
- Port your code
What are Google Play Billing and IAP?
The Google Play Billing feature allows users to purchase digital content directly from your app. For example, a user can purchase additional levels in a game. Amazon In-App Purchasing (IAP) is the equivalent feature for the Amazon Appstore. If your app uses Google Play Billing, you can modify your code to use the one of Amazon's IAP solutions. Both Google and Amazon APIs have similar functionality with some differences in naming and terminology.
If your app implements Google Play Billing and you want to keep in-app purchases as a feature in your app on the Amazon Appstore, you must implement one of Amazon's IAP solutions to submit your app.
Amazon IAP solutions versus Google Play Billing
This section discusses the similarities and differences between Google Play Billing and the Amazon's IAP solutions. Amazon offers two IAP solutions, the Appstore SDK IAP and the Appstore Billing Compatibility SDK.
Feature comparison
The table below shows a comparison between the Appstore SDK, the Appstore Billing Compatibility SDK, and Google Play Billing API.
Feature | Appstore SDK | Appstore Billing Compatibility | Google Play | Comments |
---|---|---|---|---|
Purchases | ||||
Intents handled by API. | Yes | No | No | The Appstore Billing Compatibilty SDK uses the same API signatures as Google Play Billing. |
Consumables | ||||
Individual consumables may be purchased multiple times. | Yes | Yes | Yes | |
Entitlements | ||||
Purchased once. Users notified if they try to purchase an entitlement they already own. | Yes | Yes | Yes | |
Subscriptions | ||||
Variety of options for time period that a subscription runs. | Yes | Yes | Yes | Amazon IAP options: Weekly, Bi-weekly, Monthly, Bi-monthly, Quarterly, Semi-annually, Annually Google Play options: Monthly, Annually, Seasonal (custom) |
Supports free trial periods. | Yes | Yes | Yes | |
Auto-renew option. | Yes | Yes | Yes | |
Deferred billing option. | No | No | Yes | |
Receipt verification | ||||
Receipt verification service for purchases | Yes | Yes | Yes | Although Google Play does provide receipt verification, Google Play receipt verification process is not automated. |
Google Play managed objects versus Amazon consumables and entitlements
Google Play Billing and Amazon IAP both let your customers make the same types of in-app purchases. However, Google Play and Amazon use different terminology for their purchase types. The following table notes the Google Play equivalent for each Amazon purchase type:
Amazon | Description | Google Play Equivalent | Examples |
---|---|---|---|
Consumable | Purchase that is made, then consumed within the app, typically a game. May be purchased multiple times. | Managed product | Extra lives or moves (within a game), extra ammunition for an in-game character. |
Entitlement | One-time purchase to unlock access to features or content within an app or game. | Managed product | Unlock extra levels within a game or "premium member only" features within an app. |
Subscription | Offers access to a premium set of content or features for a limited period of time. | Subscription | Online magazine subscription, fantasy football league access. |
As you can see, Google Play Billing treats all non-subscription purchases similarly; an item is purchased, then consumed by a user. Once an item has been consumed, the item is provisioned in the app and the consumption is recorded. For items that are likely to be one-time purchases, such as unlocking new game levels, you have the option as a developer of treating the item as a consumable or non-consumable and introducing logic to ensure that the purchase of that item only occurs once. With Amazon IAP, one-time purchases (entitlements) are separated by design from purchases that app users can purchase multiple times (consumables).
Comparison of Amazon's IAP solutions
When porting your app to the Amazon Appstore, you can choose the Appstore SDK IAP or the Appstore Billing Compatibility SDK. The Appstore Billing Compatibility SDK mirrors Google Play Billing Library and allows you to port an existing app with minimal changes to your code. The Appstore SDK IAP solution has a slightly broader feature set and requires more code changes to migrate. The following table compares the two solutions.
Feature required by app | Supported by Appstore SDK | Supported by Appstore Billing Compatibility SDK |
---|---|---|
Subscriptions | Yes | Yes |
Entitlements | Yes | Yes |
Consumables | Yes | Yes |
Digital Rights Management (DRM) | Yes | Yes |
Pending Purchases | Yes | No |
Promotional Pricing | Yes | No |
Receipt Verification | Yes | Yes |
Amazon App Tester support | Yes | No |
Uses the same API signatures as Google Play Billing | No | Yes |
Review the following table to help you choose a migration path based on the features you currently use in your app.
Feature used in app | Migration path | Comments |
---|---|---|
Google Play Billing Library version 2 | Not supported | |
Google Play Billing Library version 3 | Upgrade to Billing Library 4 and use Appstore Billing Compatibility SDK
or Use Appstore SDK IAP |
|
Google Play Billing Library version 4 or 5 | Use Appstore Billing Compatibility SDK | |
Java or Kotlin | Use Appstore Billing Compatibility SDK or Appstore SDK IAP | |
Unity | Use Appstore SDK Plugin for Unity | |
Connection management | Use Appstore Billing Compatibility SDK which uses stubs to always get a connected return value | Amazon IAP solutions don't need connection management. |
Refunds | Handle refund manually | Amazon IAP solutions don't support automatic refunds. |
Server-side transaction verification | Use Appstore Billing Compatibility SDK or Appstore SDK IAP | |
Client-side transaction verification | Not supported | Amazon IAP solutions don't support client-side validation. |
Purchase management API on server | Not supported | |
In-app product management API on server | Not supported | |
Real-time developer notifications | Use Appstore Billing Compatibility SDK or Appstore SDK IAP | |
Promo codes | If required, use Appstore SDK IAP, otherwise use Appstore Billing Compatibility SDK |
Port your code
To get guidance for which Amazon solution matches your app's needs, review the information in the previous section.
Migrate to the Appstore Billing Compatibilty SDK
If you choose the Appstore Billing Compatibility SDK, follow the instructions in Appstore Billing Compatibility SDK to port your code.
Migrate to the Appstore SDK
If you choose the Appstore SDK, follow the instructions in Migrate from Google Play Billing to Appstore SDK to port your code.
Last updated: May 22, 2024