Restore IOS Purchases
NOTE: This is a Legacy Economy API, and is in bugfix-only mode. All new Economy features are being developed only for version 2. Restores all in-app purchases based on the given restore receipt
Error codes
This operation may return the following PlayFab errors:
| Error | Code |
|---|---|
| InvalidBundleID | 1098 |
| InvalidCurrencyCode | 1179 |
| InvalidEnvironmentForReceipt | 1300 |
| InvalidReceipt | 1021 |
| InvalidVirtualCurrency | 1051 |
| NoMatchingCatalogItemForReceipt | 1178 |
| ProductDisabledForTitle | 1609 |
| ReceiptAlreadyUsed | 1022 |
| ReceiptContainsMultipleInAppItems | 1097 |
| ReceiptDoesNotContainInAppItems | 1096 |
Authorizations
This API requires a client session ticket, available from any Client Login function.
Body
The title should obtain a refresh receipt via restoreCompletedTransactions in the SKPaymentQueue of the Apple StoreKit and pass that in to this call. The resultant receipt contains new receipt instances for all non-consumable goods previously purchased by the user. This API call iterates through every purchase in the receipt and restores the items if they still exist in the catalog and can be validated.
The title should obtain a refresh receipt via restoreCompletedTransactions in the SKPaymentQueue of the Apple StoreKit and pass that in to this call. The resultant receipt contains new receipt instances for all non-consumable goods previously purchased by the user. This API call iterates through every purchase in the receipt and restores the items if they still exist in the catalog and can be validated.
Base64 encoded receipt data, passed back by the App Store as a result of a successful purchase.
Catalog version of the restored items. If null, defaults to primary catalog.
The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.).
Response
Once verified, the valid items will be restored into 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.
The Http status code. If X-ReportErrorAsSuccess header is set to true, this will report the actual http error code.
The Http status code as a string.
Once verified, the valid items will be restored into 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.
