---
title: code
framework: storekit
role: symbol
role_heading: Type Property
path: storekit/transaction/offertype-swift.struct/code
---

# code

An offer code.

## Declaration

```swift
static let code: Transaction.OfferType
```

## Mentioned in

Supporting offer codes in your app Supporting subscription offer codes in your app

## Discussion

Discussion You create and define offer codes in App Store Connect. Offer codes are available for any In-App Purchase product type. For more information about offer codes, see Set up offer codes. The raw value of the code offer type is 3.

## See Also

### Getting offer types

- [introductory](storekit/transaction/offertype-swift.struct/introductory.md)
- [promotional](storekit/transaction/offertype-swift.struct/promotional.md)
- [winBack](storekit/transaction/offertype-swift.struct/winback.md)
