Passer au contenu principal
POST
Validate Google Play Purchase

Autorisations

X-Authorization
string
header
requis

This API requires a client session ticket, available from any Client Login function.

Corps

application/json

The packageName and productId are defined in the GooglePlay store. The productId must match the ItemId of the inventory item in the PlayFab catalog for the title. This enables the PlayFab service to securely validate that the purchase is for the correct item, in order to prevent uses from passing valid receipts as being for more expensive items (passing a receipt for a 99-cent purchase as being for a $19.99 purchase, for example). Each receipt may be validated only once to avoid granting the same item over and over from a single purchase.

The packageName and productId are defined in the GooglePlay store. The productId must match the ItemId of the inventory item in the PlayFab catalog for the title. This enables the PlayFab service to securely validate that the purchase is for the correct item, in order to prevent uses from passing valid receipts as being for more expensive items (passing a receipt for a 99-cent purchase as being for a $19.99 purchase, for example). Each receipt may be validated only once to avoid granting the same item over and over from a single purchase.

ReceiptJson
string
requis

Original JSON string returned by the Google Play IAB API.

Signature
string
requis

Signature returned by the Google Play IAB API.

CatalogVersion
string

Catalog version of the fulfilled items. If null, defaults to the primary catalog.

CurrencyCode
string

Currency used to pay for the purchase (ISO 4217 currency code).

CustomTags
object

The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.).

PurchasePrice
number

Amount of the stated currency paid, in centesimal units.

Réponse

Once verified, the catalog item (ItemId) matching the GooglePlay store item (productId) will be added to the user's inventory. This result should be used for immediate updates to the local client game state as opposed to the GetUserInventory API which can have an up to half second delay.

code
integer

The Http status code. If X-ReportErrorAsSuccess header is set to true, this will report the actual http error code.

status
string

The Http status code as a string.

data
object

Once verified, the catalog item (ItemId) matching the GooglePlay store item (productId) will be added to the user's inventory. This result should be used for immediate updates to the local client game state as opposed to the GetUserInventory API which can have an up to half second delay.

Exemple:
Dernière modification le 6 octobre 2026