Documentation

ValidateAmazonIAPReceipt

Validates with Amazon that the receipt for an Amazon App Store in-app purchase is valid and that it matches the purchased catalog item

Request Details

ValidateAmazonReceiptRequest
Request Properties
CatalogVersion String

Catalog version to use when granting receipt item. If null, defaults to primary catalog.

CurrencyCode (required) String

Currency used for the purchase.

PurchasePrice (required) int32

Amount of the stated currency paid for the object.

ReceiptId (required) String

ReceiptId returned by the Amazon App Store in-app purchase API

UserId (required) String

AmazonId of the user making the purchase as returned by the Amazon App Store in-app purchase API

POST https://{{TitleID}}.playfabapi.com/Client/ValidateAmazonIAPReceipt
    Content-Type: application/json
    X-Authentication: <user_session_ticket_value>
{
  "ReceiptId": "q1YqVbJSyjH28DGPKChw9c0o8nd3vSstssQtzSkrzM8tCk43K6z0d_HOTcwwN8vxCrVV0lEqBmpJzs_VK8hJrExLTNLLTCzQK8_MSUnJTy8LSpcoWRnoKKUAFRmaGBtZmBqCCFMzpVoA",
  "UserId": "l3HL7XppEMhrOGDgur9-ulvqomrSg6qyODKmah72lJU="
}
        

Response Details

Once verified, the catalog item matching the Amazon item name will be added to the user's inventory.

ValidateAmazonReceiptResult
Result Properties

Sample Response

HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8
{
  "code": 200,
  "status": "OK",
  "data": {}
}

Authentication

SessionTicket

Possible Error Codes

Name Code
AmazonValidationError 1150
InvalidReceipt 1021
InvalidTitleId 1004
MissingAmazonSharedKey 1149
NoMatchingCatalogItemForReceipt 1178
ReceiptAlreadyUsed 1022