StoreKit.RestoreCompletedTransactions
-------------------------------------

Asks the payment queue to restore previously completed purchases.

| Component | Version | macOS | Windows | Linux | Server | iOS SDK |
|---|---|---|---|---|---|---|
| [StoreKit](component_StoreKit.md) | [8.2](newinversion82.md) | ✅ Yes | ❌ No | ❌ No | ❌ No | ✅ Yes |

MBS( "StoreKit.RestoreCompletedTransactions" { ; UserName } ) 

**MBS**( **"StoreKit.RestoreCompletedTransactions";** /\* Asks the payment queue to restore previously completed purchases. \*/  
**$UserName**) /\* Optional; An opaque identifier for the user’s account on your system. \*/ 

### Parameters

| Parameter | Description | Example | Flags |
|---|---|---|---|
| UserName | An opaque identifier for the user’s account on your system. |  | Optional |

### Result

Returns OK or error.

### Description

Asks the payment queue to restore previously completed purchases.  
Your application calls this method to restore transactions that were previously finished so that you can process them again. For example, your application would use this to allow a user to unlock previously purchased content onto a new device.  
When you create a new product to be sold in your store, you choose whether that product can be restored or not. See the In-App Purchase Programming Guide for more information.  
  
The payment queue will deliver a new transaction for each previously completed transaction that can be restored. Each transaction includes a copy of the original transaction.  
  
Clears last error state. Later when answer is received, we update last error.  
### See also

- [StoreKit.SetRestoreCompletedTransactionsTrigger](StoreKitSetRestoreCompletedTransactionsTrigger.md)

This function checks for a license.

Created 22nd April 2018 , last changed 13th December 2024

  
[StoreKit.RequestReview](StoreKitRequestReview.md) - [StoreKit.SetProductViewFinishedTrigger](StoreKitSetProductViewFinishedTrigger.md)

[HTML Version](StoreKitRestoreCompletedTransactions.shtml)