<!--
{
  "availability" : [
    "iOS: 17.2.0 -",
    "iPadOS: 17.2.0 -",
    "macOS: 14.2.0 -",
    "tvOS: 17.2.0 -",
    "visionOS: 1.1.0 -",
    "watchOS: 10.2.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "StoreKit",
  "identifier" : "/documentation/StoreKit/Transaction/Offer-swift.struct/id",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "StoreKit"
    ],
    "preciseIdentifier" : "s:8StoreKit11TransactionV5OfferV2idSSSgvp"
  },
  "title" : "id"
}
-->

# id

A string that identifies an offer that applies to the transaction.

```
let id: String?
```

## Discussion

The [`id`](/documentation/StoreKit/Transaction/Offer-swift.struct/id) is the offer identifier that you provide when you set up an offer in App Store Connect.

This value is `nil` if the offer is an [`introductory`](/documentation/StoreKit/Transaction/OfferType-swift.struct/introductory) offer for an auto-renewable subscription.

If the offer type is [`code`](/documentation/StoreKit/Transaction/OfferType-swift.struct/code), the [`id`](/documentation/StoreKit/Transaction/Offer-swift.struct/id) value contains the reference name of the offer code you set up in App Store Connect.  For more information, see [Set up offer codes](https://help.apple.com/app-store-connect/#/dev6a098e4b1).

---

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)