---
title: "restoreCompletedTransactions(withApplicationUsername:)"
framework: StoreKit
role: symbol
role_heading: Instance Method
platforms: [iOS 7.0+, iPadOS 7.0+, Mac Catalyst 13.1+, macOS 10.9+, tvOS 7.0+, visionOS 1.0+, watchOS 6.2+]
path: storekit/skpaymentqueue/1505992-restorecompletedtransactions
---

# 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.

## See Also

### Related Documentation

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

### Restoring Purchases

- [restoreCompletedTransactions()](restorecompletedtransactions().md)
