Home > Services & APIs > Earn > In-App Purchasing

Understanding In-App Purchasing

Introduction

Introduction

The In-App Purchasing (IAP) API allows your app to present, process, and fulfill purchases of digital content and subscriptions within your app. This page gives a high-level introduction to this feature, so that you can learn how the feature works.

What is In-App Purchasing (IAP)?

With In-App Purchasing (IAP), your app’s users can purchase various types of digital items within your app, such as extra lives for a game or a subscription to premium content.

The following scenarios describe potential use cases for IAP:

  • Create a “freemium” model for your app where the app itself is free but you charge a premium for advanced services or functionality.
  • Allow your customers to purchase items to enhance their gaming experience, such as currency, extra moves, or lives.
  • Unlock bonus levels or mini-games by allowing users to purchase access to this content.
  • Enable customers to subscribe to content available within your app.

The IAP API handles details about purchase flow, payment processing, providing a receipt to your app, and managing rights to the purchasable content, so that you do not have to code these things yourself.

Amazon’s Role in IAP

The Amazon Appstore plays an integral part of the IAP API worklfow. Amazon executes the purchase workflow, starting when the customer decides to purchase an item and ending when Amazon provides the app either a receipt for the purchase or a status code, in the case of a failed purchase. You do not need to provide purchase dialogs, transaction timeout logic, or “Thank You” dialogs. The Amazon Appstore provides all of these pieces of a transaction.

Once a user initiates a purchase, the Amazon Appstore client app surfaces and presents an Amazon-branded user interface to complete the transaction. This app presents the user interface for all aspects of the purchase workflow:

  • Logic to display the purchasable item.
  • Perform the purchase.
  • Handle any preconditions or error scenarios.

If a purchase is unsuccessful, the Amazon Appstore presents the relevant messaging to the customer; your app should not message the customer. For example, if the customer does not have a valid credit card on file, the Amazon Appstore redirects the customer to a page where they can update their payment information. Do not provide a confirmation or other interstitial dialog to the customer regarding the purchase flow.

The following table summarizes the separation of responsibility between your app and the Amazon Appstore when implementing IAP:

Responsibility
Your App
Amazon
Presents the catalog of in-app items to the customer for purchase.


Unlocks purchasable functionality.


Manages the purchase flow.

Performs payment processing.

Handles secure communication with the Amazon platform, including payment security.

Verifies entitlements and validates purchase receipts.


Manages billing for auto-renewing subscriptions.

Manages billing for revoking of entitlements.

Verifies receipts for subscriptions and entitlements before providing content to user.


Downloads remotely delivered content.


Displays and uses downloaded digital goods.


Tracks customer purchases and consumable inventory.


IAP Components

If you are new to working with IAP, familiarize yourself with the following components, which are all involved in implementing this feature:

Name Description Documentation Link
IAP SDK Leveraged by your app to execute and fulfill in-app purchases. In-App Purchasing API 2.0 Reference
Amazon Appstore Handles payment processing, alerts, fulfillment, and other back-end functionality. Not applicable
App Tester Test your app locally before publishing to the Amazon Appstore. Testing In-App Purchasing
Receipt Verification Service (RVS) Verify the validity of transaction receipts in a sandbox and production environment. Receipt Verification Service (RVS)
Live App Testing Service Beta test your app with a select group of users in a production environment. Live App Testing

Types of Purchases

As you plan your IAP implementation, you will need to define what types of items your app will make available to its users. You will also need to determine how you want to deliver those purchased items. This section gives a brief introduction to the types of purchases supported by IAP.

Types of Purchasable Items

IAP includes three different categories of purchasable items:

  • Consumables: Purchase that is made, then consumed within the app, such as extra lives, extra moves, or in-game currency. May be purchased multiple times.
  • Entitlements: One-time purchase to unlock access to features or content within an app or game.
  • Subscriptions: Offers access to a premium set of content or features for a limited period of time.

Instantly Available Content vs. Deliverable Content

IAP supports two basic delivery flows: Instantly available content and deliverable content:

  • Instantly Available Content: Instantly available content is unlocked or otherwise made available to the customer upon purchase. Under this model, your app already has everything it needs for the customer to use the purchasable item immediately upon purchase. You can use all three types of purchasable items with this model.
  • Deliverable content: Deliverable content allows you to make new content available to the customer. Under this model, your app will download the new content from your servers and make it available to the customer. Deliverable items typically are subscription items.

App Submission Process

When you are ready to submit your app to the Amazon Appstore, you will also need to create your purchasable items. If you decide to add or edit your purchasable items after submitting your app, you will need to re-submit both the new/changed items and the app itself to the Amazon Appstore.