Console sviluppatore
Ti ringraziamo per la visita. Questa pagina è per il momento disponibile solo in inglese.

Pull Integration

Overview

The Prime Gaming pull integration links a customer's Amazon ID to a game or platform ID that you control, and provides a simple web API where you can retrieve new entitlements for that customer. Whenever the Prime Gaming API reports a new entitlement, you'll fulfill it in your code. (An "entitlement" is the receipt or proof of a user's entitlement to a digital good. "Fulfillment" is the process of delivering that digital good.) If you have experience with in-app purchasing on mobile platforms, you'll find this flow somewhat familiar.

After delivering a new reward to one of your players, you'll make one more API call to Prime Gaming to report the fulfillment. This ensures that we don't keep returning that entitlement on subsequent responses. Exactly how you manage entitlements and fulfillments will be unique to your game or studio, but may involve several different web services depending on your infrastructure. At least one of your services will need to accept requests from your game, and at least one will need to make external API calls.

As the name suggests, this type of integration requires "pulling" information from a Prime Gaming API. This means that you'll need to request a player's entitlements often enough for a timely fulfillment, but not so often that you're putting excess load on the servers involved. Here are a few examples of game events that might trigger an entitlement check:

  • On startup
  • When resuming the game after loss of app/window focus, returning from a device-level sleep mode, etc.
  • When the player visits an in-game store or marketplace

Ideally, a player should be able to return to your game right after claiming a Prime Gaming reward and use their new content immediately—or at least very soon.

Prerequisites

The following things are required to implement a Prime Gaming pull integration:

  • A web backend or game server for your title(s) that can be updated with your own code, make external API calls, and add new content to a player's account or inventory
    • Note: It is possible, but not recommended, to implement a pull integration with only your game's client-side code and a "black box" cloud service as your backend. This approach requires more client-side coding and comes with certain security and fraud risks.
  • An account or profile system that can uniquely identify your players
  • A data or persistence layer, such as a database, where you can save additional metadata for your players and each of your Prime Gaming offers
  • Basic working knowledge of the OAuth 2.0 specification, especially Authorization Code Grants, for account linking via Login with Amazon (LWA)

User Flow

A diagram showing the steps of the Prime Gaming pull integration user flow

Next: Set Up LWA Account Linking