---
title: "restoreCompletedTransactions(withApplicationUsername:)"
framework: storekit
role: symbol
role_heading: Instance Method
path: "storekit/skpaymentqueue/restorecompletedtransactions(withapplicationusername:)"
---

# restoreCompletedTransactions(withApplicationUsername:)

Asks the payment queue to restore previously completed purchases, providing an opaque identifier for the user’s account.

## Declaration

```swift
func restoreCompletedTransactions(withApplicationUsername username: String?)
```

## Parameters

- `username`: An opaque identifier for the user’s account on your system.

## Mentioned in

Choosing a receipt validation technique Restoring purchased products Testing In-App Purchases in Xcode

## See Also

### Related Documentation

- [applicationUsername](storekit/skpayment/applicationusername.md)

### Restoring Purchases

- [restoreCompletedTransactions()](storekit/skpaymentqueue/restorecompletedtransactions().md)
