<!--
{
  "availability" : [
    "iOS: 7.0.0 - 18.0.0",
    "iPadOS: 7.0.0 - 18.0.0",
    "macCatalyst: 13.1.0 - 18.0.0",
    "macOS: 10.9.0 - 15.0.0",
    "tvOS: -",
    "visionOS: 1.0.0 - 2.0.0",
    "watchOS: 6.2.0 - 11.0.0"
  ],
  "documentType" : "symbol",
  "framework" : "StoreKit",
  "identifier" : "/documentation/StoreKit/SKMutablePayment/applicationUsername",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "StoreKit"
    ],
    "preciseIdentifier" : "c:objc(cs)SKMutablePayment(py)applicationUsername"
  },
  "title" : "applicationUsername"
}
-->

# applicationUsername

A string that associates the transaction with a user account on your service.

```
var applicationUsername: String? { get set }
```

## Discussion

Consider assigning a UUID to the [`applicationUsername`](/documentation/StoreKit/SKMutablePayment/applicationUsername) property. When this value is a UUID, the App Store server stores it as an [`appAccountToken`](/documentation/StoreKit/Transaction/appAccountToken). In this scenario, the following happens:

- In the <doc://com.apple.documentation/documentation/AppStoreServerAPI>, the <doc://com.apple.documentation/documentation/AppStoreServerAPI/JWSTransactionDecodedPayload> object returns the [`applicationUsername`](/documentation/StoreKit/SKMutablePayment/applicationUsername) value in the <doc://com.apple.documentation/documentation/AppStoreServerAPI/appAccountToken> field.
- In <doc://com.apple.documentation/documentation/AppStoreServerNotifications>, the <doc://com.apple.documentation/documentation/AppStoreServerNotifications/JWSTransactionDecodedPayload> object returns the [`applicationUsername`](/documentation/StoreKit/SKMutablePayment/applicationUsername) value in the <doc://com.apple.documentation/documentation/AppStoreServerNotifications/appAccountToken> field.
- When you call the <doc://com.apple.documentation/documentation/AppStoreReceipts/Verify-Receipt> endpoint to verify an App Store receipt, the App Store server returns the [`applicationUsername`](/documentation/StoreKit/SKMutablePayment/applicationUsername) value in the <doc://com.apple.documentation/documentation/AppStoreReceipts/app_account_token> field of the <doc://com.apple.documentation/documentation/AppStoreReceipts/responseBody/Latest_receipt_info-data.dictionary>.

The sample code below shows how to assign a UUID value to [`applicationUsername`](/documentation/StoreKit/SKMutablePayment/applicationUsername). You may choose to generate the UUID on your server. Assign the value before adding the payment to the payment queue.

```swift
let payment = SKMutablePayment(product: product)
payment.applicationUsername = uuidString

SKPaymentQueue.default().add(payment)
```

If you don’t assign a UUID string value to [`applicationUsername`](/documentation/StoreKit/SKMutablePayment/applicationUsername), the App Store server doesn’t persist the value. The value won’t appear in the <doc://com.apple.documentation/documentation/AppStoreReceipts/app_account_token> fields in notifications or receipts.

> Important:
> An ``doc://com.apple.storekit/documentation/StoreKit/SKMutablePayment/applicationUsername`` property that isn’t a UUID isn’t guaranteed to persist between the time when you add the payment transaction to the queue and when the queue updates the transaction.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)